diff --git a/OAT.xml b/OAT.xml index af9f8562b5e0d50df12cdb4839ed2669ee325dd6..cf0ea9c1cdd54902b93db4a968d1d6aac1c90856 100644 --- a/OAT.xml +++ b/OAT.xml @@ -90,10 +90,10 @@ used to filter file path. desc="app resource files" /> - - + + + + diff --git a/attachment/repos/build0.bin b/attachment/repos/build0.bin new file mode 100644 index 0000000000000000000000000000000000000000..98180eaf49bf506cbc44ae238bf8109d0fa20a3f --- /dev/null +++ b/attachment/repos/build0.bin @@ -0,0 +1,182616 @@ +diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn +index 4e62965..ea49a53 100644 +--- a/build/config/BUILD.gn ++++ b/build/config/BUILD.gn +@@ -146,6 +146,8 @@ config("default_libs") { + "dl", + "m", + ] ++ } else if (is_ohos) { ++ libs = [ "dl","hilog_ndk.z" ] + } else if (is_linux) { + libs = [ "dl" ] + } +diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn +index b8d0f47..301b014 100644 +--- a/build/config/BUILDCONFIG.gn ++++ b/build/config/BUILDCONFIG.gn +@@ -34,8 +34,12 @@ + # When writing build files, to do something only for the host: + # if (current_toolchain == host_toolchain) { ... + ++print("11target_os:"+target_os) ++print("11target_cpu:"+target_cpu) ++ + if (target_os == "") { +- target_os = host_os ++ #target_os = host_os ++ target_os = "ohos" + } + + if (target_cpu == "") { +@@ -57,10 +61,15 @@ if (current_os == "") { + if (host_os == "win") { + current_os = "win" + } else { +- current_os = target_os ++ #current_os = target_os ++ current_os = host_os + } + } + ++print("current_os:"+current_os) ++print("current_cpu:"+current_cpu) ++print("target_os:"+target_os) ++print("target_cpu:"+target_cpu) + # ============================================================================= + # BUILD FLAGS + # ============================================================================= +@@ -190,6 +199,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = false ++ is_ohos = false + is_mac = false + is_posix = false + is_win = true +@@ -198,6 +208,7 @@ if (current_os == "win") { + is_android = false + is_chromeos = false + is_fuchsia = false ++ is_ohos = false + is_fuchsia_host = false + is_ios = false + is_linux = false +@@ -212,6 +223,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = false ++ is_ohos = false + is_mac = false + is_posix = true + is_win = false +@@ -223,6 +235,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = true ++ is_ohos = false + is_mac = false + is_posix = true + is_win = false +@@ -237,6 +250,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = false ++ is_ohos = false + is_mac = false + is_posix = true + is_win = false +@@ -252,6 +266,19 @@ if (current_os == "win") { + is_posix = true + is_win = false + is_wasm = false ++} else if (current_os == "linux" && target_os == "ohos") { ++ target_os="linux" ++ is_android = false ++ is_chromeos = false ++ is_fuchsia = false ++ is_fuchsia_host = false ++ is_ios = false ++ is_linux = true ++ is_ohos = true ++ is_mac = false ++ is_posix = true ++ is_win = false ++ is_wasm = false + } else if (current_os == "linux") { + is_android = false + is_chromeos = false +@@ -259,6 +286,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = true ++ is_ohos = false + is_mac = false + is_posix = true + is_win = false +@@ -270,6 +298,7 @@ if (current_os == "win") { + is_fuchsia_host = false + is_ios = false + is_linux = false ++ is_ohos = false + is_mac = false + is_posix = true + is_win = false +@@ -313,7 +342,7 @@ if (!is_clang && using_sanitizer) { + is_clang = true + } + +-use_flutter_cxx = is_clang && (is_linux || is_android || is_mac || is_ios) ++use_flutter_cxx = is_clang && (is_linux || is_android || is_mac || is_ios || is_ohos ) + + if (is_msan && !is_linux) { + assert(false, "Memory sanitizer is only available on Linux.") +@@ -365,7 +394,9 @@ if (is_posix) { + ] + } + +-if (is_linux) { ++if( is_ohos){ ++ _native_compiler_configs += [ "//build/config/ohos:sdk" ] ++ }else if (is_linux) { + _native_compiler_configs += [ "//build/config/linux:sdk" ] + } else if (is_mac) { + _native_compiler_configs += [ "//build/config/mac:sdk" ] +@@ -544,6 +575,17 @@ if (custom_toolchain != "") { + } else { + set_default_toolchain("//build/toolchain/android:$current_cpu") + } ++} else if (is_ohos) { ++ if (is_clang) { ++ host_toolchain = "//build/toolchain/linux:clang_$host_cpu" ++ set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") ++ } else { ++ host_toolchain = "//build/toolchain/linux:$host_cpu" ++ set_default_toolchain("//build/toolchain/linux:$current_cpu") ++ } ++ if (is_chromeos && cros_use_custom_toolchain) { ++ set_default_toolchain("//build/toolchain/cros:target") ++ } + } else if (is_linux) { + if (is_clang) { + host_toolchain = "//build/toolchain/linux:clang_$host_cpu" +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +index ba20010..53dc22d 100644 +--- a/build/config/compiler/BUILD.gn ++++ b/build/config/compiler/BUILD.gn +@@ -191,11 +191,18 @@ config("compiler") { + # CPU architecture. We may or may not be doing a cross compile now, so for + # simplicity we always explicitly set the architecture. + if (current_cpu == "x64") { +- cflags += [ +- "-m64", +- "-march=x86-64", +- ] ++ if ( is_ohos ){ ++ cflags += [ ++ "-m64", ++ ] ++ }else { ++ cflags += [ ++ "-m64", ++ "-march=x86-64", ++ ] ++ } + ldflags += [ "-m64" ] ++ + } else if (current_cpu == "x86") { + cflags += [ "-m32" ] + ldflags += [ "-m32" ] +@@ -315,7 +322,7 @@ config("compiler") { + + # Linux/Android common flags setup. + # --------------------------------- +- if (is_linux || is_android) { ++ if (is_linux || is_android || is_ohos ) { + cflags += [ + "-fPIC", + "-pipe", # Use pipes for communicating between sub-processes. Faster. +@@ -334,7 +341,16 @@ config("compiler") { + + # Linux-specific compiler flags setup. + # ------------------------------------ +- if (is_linux) { ++ if (is_ohos ) { ++ cflags += [ "-pthread" ] ++ ldflags += [ "-pthread" ] ++ ++ if (current_cpu == "arm64") { ++ cflags += [ "--target=aarch64-linux-ohos" ] ++ ldflags += [ "--target=aarch64-linux-ohos" ] ++ cflags += [ "-DBORINGSSL_CLANG_SUPPORTS_DOT_ARCH" ] ++ } ++ }else if (is_linux ) { + cflags += [ "-pthread" ] + ldflags += [ "-pthread" ] + +diff --git a/build/config/ohos/BUILD.gn b/build/config/ohos/BUILD.gn +new file mode 100644 +index 0000000..8f0cf5e +--- /dev/null ++++ b/build/config/ohos/BUILD.gn +@@ -0,0 +1,33 @@ ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/ohos/pkg_config.gni") ++import("//build/config/features.gni") ++import("//build/config/sysroot.gni") ++import("//build/config/ui.gni") ++ ++config("sdk") { ++ if (sysroot != "") { ++ cflags = [ "--sysroot=" + sysroot ] ++ ldflags = [ "--sysroot=" + sysroot ] ++ ++ # Need to get some linker flags out of the sysroot. ++ ldflags += [ exec_script("sysroot_ld_path.py", ++ [ ++ rebase_path("//build/ohos/sysroot_ld_path.sh", ++ root_build_dir), ++ sysroot, ++ ], ++ "value") ] ++ } ++} ++ ++config("fontconfig") { ++ #libs = [ "fontconfig" ] ++ libs = [ ] ++} ++ ++#pkg_config("freetype2") { ++# packages = [ "freetype2" ] ++#} +diff --git a/build/config/ohos/pkg-config.py b/build/config/ohos/pkg-config.py +new file mode 100644 +index 0000000..b4a6aff +--- /dev/null ++++ b/build/config/ohos/pkg-config.py +@@ -0,0 +1,249 @@ ++#!/usr/bin/env python3 ++# ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++ ++ ++import json ++import os ++import subprocess ++import sys ++import re ++from optparse import OptionParser ++ ++# This script runs pkg-config, optionally filtering out some results, and ++# returns the result. ++# ++# The result will be [ , , , , ] ++# where each member is itself a list of strings. ++# ++# You can filter out matches using "-v " where all results from ++# pkgconfig matching the given regular expression will be ignored. You can ++# specify more than one regular expression my specifying "-v" more than once. ++# ++# You can specify a sysroot using "-s " where sysroot is the absolute ++# system path to the sysroot used for compiling. This script will attempt to ++# generate correct paths for the sysroot. ++# ++# When using a sysroot, you must also specify the architecture via ++# "-a " where arch is either "x86" or "x64". ++# ++# CrOS systemroots place pkgconfig files at /usr/share/pkgconfig ++# and one of /usr/lib/pkgconfig or /usr/lib64/pkgconfig ++# depending on whether the systemroot is for a 32 or 64 bit architecture. They ++# specify the 'lib' or 'lib64' of the pkgconfig path by defining the ++# 'system_libdir' variable in the args.gn file. pkg_config.gni communicates this ++# variable to this script with the "--system_libdir " flag. If no ++# flag is provided, then pkgconfig files are assumed to come from ++# /usr/lib/pkgconfig. ++# ++# Additionally, you can specify the option --atleast-version. This will skip ++# the normal outputting of a dictionary and instead print true or false, ++# depending on the return value of pkg-config for the given package. ++ ++ ++def SetConfigPath(options): ++ """Set the PKG_CONFIG_LIBDIR environment variable. ++ ++ This takes into account any sysroot and architecture specification from the ++ options on the given command line. ++ """ ++ ++ sysroot = options.sysroot ++ assert sysroot ++ ++ # Compute the library path name based on the architecture. ++ arch = options.arch ++ if sysroot and not arch: ++ print("You must specify an architecture via -a if using a sysroot.") ++ sys.exit(1) ++ ++ libdir = sysroot + '/usr/' + options.system_libdir + '/pkgconfig' ++ libdir += ':' + sysroot + '/usr/share/pkgconfig' ++ os.environ['PKG_CONFIG_LIBDIR'] = libdir ++ return libdir ++ ++ ++def GetPkgConfigPrefixToStrip(options, args): ++ """Returns the prefix from pkg-config where packages are installed. ++ ++ This returned prefix is the one that should be stripped from the beginning of ++ directory names to take into account sysroots. ++ """ ++ # Some sysroots, like the Chromium OS ones, may generate paths that are not ++ # relative to the sysroot. For example, ++ # /path/to/chroot/build/x86-generic/usr/lib/pkgconfig/pkg.pc may have all ++ # paths relative to /path/to/chroot (i.e. prefix=/build/x86-generic/usr) ++ # instead of relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr). ++ # To support this correctly, it's necessary to extract the prefix to strip ++ # from pkg-config's |prefix| variable. ++ prefix = subprocess.check_output([options.pkg_config, ++ "--variable=prefix"] + args, env=os.environ).decode('utf-8') ++ if prefix[-4] == '/usr': ++ return prefix[4:] ++ return prefix ++ ++ ++def MatchesAnyRegexp(flag, list_of_regexps): ++ """Returns true if the first argument matches any regular expression in the ++ given list.""" ++ for regexp in list_of_regexps: ++ if regexp.search(flag) != None: ++ return True ++ return False ++ ++ ++def RewritePath(path, strip_prefix, sysroot): ++ """Rewrites a path by stripping the prefix and prepending the sysroot.""" ++ if os.path.isabs(path) and not path.startswith(sysroot): ++ if path.startswith(strip_prefix): ++ path = path[len(strip_prefix):] ++ path = path.lstrip('/') ++ return os.path.join(sysroot, path) ++ else: ++ return path ++ ++ ++def main(): ++ # If this is run on non-Linux platforms, just return nothing and indicate ++ # success. This allows us to "kind of emulate" a Linux build from other ++ # platforms. ++ if "linux" not in sys.platform: ++ print("[[],[],[],[],[]]") ++ return 0 ++ ++ parser = OptionParser() ++ parser.add_option('-d', '--debug', action='store_true') ++ parser.add_option('-p', action='store', dest='pkg_config', type='string', ++ default='pkg-config') ++ parser.add_option('-v', action='append', dest='strip_out', type='string') ++ parser.add_option('-s', action='store', dest='sysroot', type='string') ++ parser.add_option('-a', action='store', dest='arch', type='string') ++ parser.add_option('--system_libdir', action='store', dest='system_libdir', ++ type='string', default='lib') ++ parser.add_option('--atleast-version', action='store', ++ dest='atleast_version', type='string') ++ parser.add_option('--libdir', action='store_true', dest='libdir') ++ parser.add_option('--dridriverdir', action='store_true', dest='dridriverdir') ++ parser.add_option('--version-as-components', action='store_true', ++ dest='version_as_components') ++ (options, args) = parser.parse_args() ++ ++ # Make a list of regular expressions to strip out. ++ strip_out = [] ++ if options.strip_out != None: ++ for regexp in options.strip_out: ++ strip_out.append(re.compile(regexp)) ++ ++ if options.sysroot: ++ libdir = SetConfigPath(options) ++ if options.debug: ++ sys.stderr.write('PKG_CONFIG_LIBDIR=%s\n' % libdir) ++ prefix = GetPkgConfigPrefixToStrip(options, args) ++ else: ++ prefix = '' ++ ++ if options.atleast_version: ++ # When asking for the return value, just run pkg-config and print the return ++ # value, no need to do other work. ++ if not subprocess.call([options.pkg_config, ++ "--atleast-version=" + options.atleast_version] + ++ args): ++ print("true") ++ else: ++ print("false") ++ return 0 ++ ++ if options.version_as_components: ++ cmd = [options.pkg_config, "--modversion"] + args ++ try: ++ version_string = subprocess.check_output(cmd).decode('utf-8') ++ except: ++ sys.stderr.write('Error from pkg-config.\n') ++ return 1 ++ print(json.dumps(list(map(int, version_string.strip().split("."))))) ++ return 0 ++ ++ ++ if options.libdir: ++ cmd = [options.pkg_config, "--variable=libdir"] + args ++ if options.debug: ++ sys.stderr.write('Running: %s\n' % cmd) ++ try: ++ libdir = subprocess.check_output(cmd).decode('utf-8') ++ except: ++ print("Error from pkg-config.") ++ return 1 ++ sys.stdout.write(libdir.strip()) ++ return 0 ++ ++ if options.dridriverdir: ++ cmd = [options.pkg_config, "--variable=dridriverdir"] + args ++ if options.debug: ++ sys.stderr.write('Running: %s\n' % cmd) ++ try: ++ dridriverdir = subprocess.check_output(cmd).decode('utf-8') ++ except: ++ print("Error from pkg-config.") ++ return 1 ++ sys.stdout.write(dridriverdir.strip()) ++ return ++ ++ cmd = [options.pkg_config, "--cflags", "--libs"] + args ++ if options.debug: ++ sys.stderr.write('Running: %s\n' % ' '.join(cmd)) ++ ++ try: ++ flag_string = subprocess.check_output(cmd).decode('utf-8') ++ except: ++ sys.stderr.write('Could not run pkg-config.\n') ++ return 1 ++ ++ # For now just split on spaces to get the args out. This will break if ++ # pkgconfig returns quoted things with spaces in them, but that doesn't seem ++ # to happen in practice. ++ all_flags = flag_string.strip().split(' ') ++ ++ ++ sysroot = options.sysroot ++ if not sysroot: ++ sysroot = '' ++ ++ includes = [] ++ cflags = [] ++ libs = [] ++ lib_dirs = [] ++ ++ for flag in all_flags[:]: ++ if len(flag) == 0 or MatchesAnyRegexp(flag, strip_out): ++ continue; ++ ++ if flag[:2] == '-l': ++ libs.append(RewritePath(flag[2:], prefix, sysroot)) ++ elif flag[:2] == '-L': ++ lib_dirs.append(RewritePath(flag[2:], prefix, sysroot)) ++ elif flag[:2] == '-I': ++ includes.append(RewritePath(flag[2:], prefix, sysroot)) ++ elif flag[:3] == '-Wl': ++ # Don't allow libraries to control ld flags. These should be specified ++ # only in build files. ++ pass ++ elif flag == '-pthread': ++ # Many libs specify "-pthread" which we don't need since we always include ++ # this anyway. Removing it here prevents a bunch of duplicate inclusions ++ # on the command line. ++ pass ++ else: ++ cflags.append(flag) ++ ++ # Output a GN array, the first one is the cflags, the second are the libs. The ++ # JSON formatter prints GN compatible lists when everything is a list of ++ # strings. ++ print(json.dumps([includes, cflags, libs, lib_dirs])) ++ return 0 ++ ++ ++if __name__ == '__main__': ++ sys.exit(main()) +diff --git a/build/config/ohos/pkg_config.gni b/build/config/ohos/pkg_config.gni +new file mode 100644 +index 0000000..cb7a4b3 +--- /dev/null ++++ b/build/config/ohos/pkg_config.gni +@@ -0,0 +1,133 @@ ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/sysroot.gni") ++ ++# Defines a config specifying the result of running pkg-config for the given ++# packages. Put the package names you want to query in the "packages" variable ++# inside the template invocation. ++# ++# You can also add defines via the "defines" variable. This can be useful to ++# add this to the config to pass defines that the library expects to get by ++# users of its headers. ++# ++# Example: ++# pkg_config("mything") { ++# packages = [ "mything1", "mything2" ] ++# defines = [ "ENABLE_AWESOME" ] ++# } ++# ++# You can also use "extra args" to filter out results (see pkg-config.py): ++# extra_args = [ "-v, "foo" ] ++# To ignore libs and ldflags (only cflags/defines will be set, which is useful ++# when doing manual dynamic linking), set: ++# ignore_libs = true ++ ++declare_args() { ++ # A pkg-config wrapper to call instead of trying to find and call the right ++ # pkg-config directly. Wrappers like this are common in cross-compilation ++ # environments. ++ # Leaving it blank defaults to searching PATH for 'pkg-config' and relying on ++ # the sysroot mechanism to find the right .pc files. ++ pkg_config = "" ++ ++ # A optional pkg-config wrapper to use for tools built on the host. ++ host_pkg_config = "" ++ ++ # CrOS systemroots place pkgconfig files at /usr/share/pkgconfig ++ # and one of /usr/lib/pkgconfig or /usr/lib64/pkgconfig ++ # depending on whether the systemroot is for a 32 or 64 bit architecture. ++ # ++ # When build under GYP, CrOS board builds specify the 'system_libdir' variable ++ # as part of the GYP_DEFINES provided by the CrOS emerge build or simple ++ # chrome build scheme. This variable permits controlling this for GN builds ++ # in similar fashion by setting the `system_libdir` variable in the build's ++ # args.gn file to 'lib' or 'lib64' as appropriate for the target architecture. ++ system_libdir = "lib" ++} ++ ++pkg_config_script = "//build/config/ohos/pkg-config.py" ++ ++# Define the args we pass to the pkg-config script for other build files that ++# need to invoke it manually. ++pkg_config_args = [] ++ ++if (sysroot != "") { ++ # Pass the sysroot if we're using one (it requires the CPU arch also). ++ pkg_config_args += [ ++ "-s", ++ rebase_path(sysroot), ++ "-a", ++ current_cpu, ++ ] ++} ++ ++if (pkg_config != "") { ++ pkg_config_args += [ ++ "-p", ++ pkg_config, ++ ] ++} ++ ++# Only use the custom libdir when building with the target sysroot. ++if (target_sysroot != "" && sysroot == target_sysroot) { ++ pkg_config_args += [ ++ "--system_libdir", ++ system_libdir, ++ ] ++} ++ ++if (host_pkg_config != "") { ++ host_pkg_config_args = [ ++ "-p", ++ host_pkg_config, ++ ] ++} else { ++ host_pkg_config_args = pkg_config_args ++} ++ ++template("pkg_config") { ++ assert(defined(invoker.packages), ++ "Variable |packages| must be defined to be a list in pkg_config.") ++ config(target_name) { ++ if (host_toolchain == current_toolchain) { ++ args = host_pkg_config_args + invoker.packages ++ } else { ++ args = pkg_config_args + invoker.packages ++ } ++ if (defined(invoker.extra_args)) { ++ args += invoker.extra_args ++ } ++ ++ pkgresult = exec_script(pkg_config_script, args, "value") ++ cflags = pkgresult[1] ++ ++ foreach(include, pkgresult[0]) { ++ if (sysroot != "") { ++ # We want the system include paths to use -isystem instead of -I to ++ # suppress warnings in those headers. ++ include_relativized = rebase_path(include, root_build_dir) ++ cflags += [ "-isystem$include_relativized" ] ++ } else { ++ cflags += [ "-I$include" ] ++ } ++ } ++ ++ if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) { ++ libs = pkgresult[2] ++ lib_dirs = pkgresult[3] ++ } ++ ++ forward_variables_from(invoker, ++ [ ++ "defines", ++ "visibility", ++ ]) ++ } ++} ++ ++#OHOS_NDK_ROOT = "//third_party/ohos_tools/ndk/linux/4.0/native" ++#OHOS_NDK_ROOT = "//third_party/ohos_tools/ndk/linux/4.0/native" ++OHOS_NDK_ROOT = "//build/ohos/ohos-sysroot" ++OHOS_NDK_LIB = "$OHOS_NDK_ROOT/usr/aarch64-linux-ohos" +diff --git a/build/config/ohos/sysroot_ld_path.py b/build/config/ohos/sysroot_ld_path.py +new file mode 100644 +index 0000000..2cde6e2 +--- /dev/null ++++ b/build/config/ohos/sysroot_ld_path.py +@@ -0,0 +1,21 @@ ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# This file takes two arguments, the relative location of the shell script that ++# does the checking, and the name of the sysroot. ++ ++# TODO(brettw) the build/linux/sysroot_ld_path.sh script should be rewritten in ++# Python in this file. ++ ++import subprocess ++import sys ++ ++if len(sys.argv) != 3: ++ print("Need two arguments") ++ sys.exit(1) ++ ++result = subprocess.check_output([sys.argv[1], sys.argv[2]], ++ universal_newlines=True).strip() ++ ++print('"%s"' % result) +diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni +index 7987e51..1ee5d9c 100644 +--- a/build/config/sysroot.gni ++++ b/build/config/sysroot.gni +@@ -22,7 +22,20 @@ if (current_toolchain == default_toolchain && target_sysroot != "") { + } else if (is_android) { + import("//build/config/android/config.gni") + sysroot = rebase_path("$llvm_android_toolchain_root/sysroot") +-} else if (is_linux && !is_chromeos) { ++} else if (is_ohos) { ++ if (use_default_linux_sysroot && !is_fuchsia) { ++ if (current_cpu == "x64") { ++ sysroot = rebase_path("//build/ohos/ohos-sysroot") ++ } else { ++ sysroot = rebase_path("//build/ohos/ohos-sysroot") ++ } ++ assert( ++ exec_script("//build/dir_exists.py", [ sysroot ], "string") == "True", ++ "Missing sysroot ($sysroot). To fix, run: build/ohos/sysroot_scripts/install-sysroot.py --arch=$current_cpu") ++ } else { ++ sysroot = "" ++ } ++ } else if (is_linux && !is_chromeos) { + if (use_default_linux_sysroot && !is_fuchsia) { + if (current_cpu == "x64") { + sysroot = rebase_path("//build/linux/debian_sid_amd64-sysroot") +diff --git a/build/ohos/bin/eu-strip.sha1 b/build/ohos/bin/eu-strip.sha1 +new file mode 100644 +index 0000000..43f290a +--- /dev/null ++++ b/build/ohos/bin/eu-strip.sha1 +@@ -0,0 +1 @@ ++0a9b8f68615ce388b65201e6d22da7a9cf2e729c +\ No newline at end of file +diff --git a/build/ohos/chrome_linux.croc b/build/ohos/chrome_linux.croc +new file mode 100644 +index 0000000..f400306 +--- /dev/null ++++ b/build/ohos/chrome_linux.croc +@@ -0,0 +1,29 @@ ++# -*- python -*- ++# Crocodile config file for Chromium linux ++ ++# TODO(jhawkins): We'll need to add a chromeos.croc once we get a coverage bot ++# for that platform. ++ ++{ ++ # List of rules, applied in order ++ 'rules' : [ ++ # Specify inclusions before exclusions, since rules are in order. ++ ++ # Don't include non-Linux platform dirs ++ { ++ 'regexp' : '.*/(chromeos|views)/', ++ 'include' : 0, ++ }, ++ # Don't include chromeos, windows, or mac specific files ++ { ++ 'regexp' : '.*(_|/)(chromeos|mac|win|views)(\\.|_)', ++ 'include' : 0, ++ }, ++ ++ # Groups ++ { ++ 'regexp' : '.*_test_linux\\.', ++ 'group' : 'test', ++ }, ++ ], ++} +diff --git a/build/ohos/dump_app_syms.py b/build/ohos/dump_app_syms.py +new file mode 100644 +index 0000000..f5c2c54 +--- /dev/null ++++ b/build/ohos/dump_app_syms.py +@@ -0,0 +1,29 @@ ++# Copyright 2015 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# Helper script to run dump_syms on Chrome Linux executables and strip ++# them if needed. ++ ++import os ++import subprocess ++import sys ++ ++if len(sys.argv) != 5: ++ print("dump_app_syms.py ") ++ print(" ") ++ sys.exit(1) ++ ++dumpsyms = sys.argv[1] ++strip_binary = sys.argv[2] ++infile = sys.argv[3] ++outfile = sys.argv[4] ++ ++# Dump only when the output file is out-of-date. ++if not os.path.isfile(outfile) or \ ++ os.stat(outfile).st_mtime > os.stat(infile).st_mtime: ++ with open(outfile, 'w') as outfileobj: ++ subprocess.check_call([dumpsyms, '-r', infile], stdout=outfileobj) ++ ++if strip_binary != '0': ++ subprocess.check_call(['strip', infile]) +diff --git a/build/ohos/install-chromeos-fonts.py b/build/ohos/install-chromeos-fonts.py +new file mode 100755 +index 0000000..c182e7b +--- /dev/null ++++ b/build/ohos/install-chromeos-fonts.py +@@ -0,0 +1,74 @@ ++#!/usr/bin/env python3 ++# ++# Copyright 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# Script to install the Chrome OS fonts on Linux. ++# This script can be run manually (as root), but is also run as part ++# install-build-deps.sh. ++ ++import os ++import shutil ++import subprocess ++import sys ++ ++# Taken from the media-fonts/notofonts ebuild in chromiumos-overlay. ++VERSION = '20140815' ++URL = ('https://commondatastorage.googleapis.com/chromeos-localmirror/' ++ 'distfiles/notofonts-%s.tar.bz2') % (VERSION) ++FONTS_DIR = '/usr/local/share/fonts' ++ ++def main(args): ++ if not sys.platform.startswith('linux'): ++ print("Error: %s must be run on Linux." % __file__) ++ return 1 ++ ++ if os.getuid() != 0: ++ print("Error: %s must be run as root." % __file__) ++ return 1 ++ ++ if not os.path.isdir(FONTS_DIR): ++ print("Error: Destination directory does not exist: %s" % FONTS_DIR) ++ return 1 ++ ++ dest_dir = os.path.join(FONTS_DIR, 'chromeos') ++ ++ stamp = os.path.join(dest_dir, ".stamp02") ++ if os.path.exists(stamp): ++ with open(stamp) as s: ++ if s.read() == URL: ++ print("Chrome OS fonts already up-to-date in %s." % dest_dir) ++ return 0 ++ ++ if os.path.isdir(dest_dir): ++ shutil.rmtree(dest_dir) ++ os.mkdir(dest_dir) ++ os.chmod(dest_dir, 0o755) ++ ++ print("Installing Chrome OS fonts to %s." % dest_dir) ++ tarball = os.path.join(dest_dir, os.path.basename(URL)) ++ subprocess.check_call(['curl', '-L', URL, '-o', tarball]) ++ subprocess.check_call(['tar', '--no-same-owner', '--no-same-permissions', ++ '-xf', tarball, '-C', dest_dir]) ++ os.remove(tarball) ++ ++ readme = os.path.join(dest_dir, "README") ++ with open(readme, 'w') as s: ++ s.write("This directory and its contents are auto-generated.\n") ++ s.write("It may be deleted and recreated. Do not modify.\n") ++ s.write("Script: %s\n" % __file__) ++ ++ with open(stamp, 'w') as s: ++ s.write(URL) ++ ++ for base, dirs, files in os.walk(dest_dir): ++ for dir in dirs: ++ os.chmod(os.path.join(base, dir), 0o755) ++ for file in files: ++ os.chmod(os.path.join(base, file), 0o644) ++ ++ return 0 ++ ++if __name__ == '__main__': ++ sys.exit(main(sys.argv[1:])) +diff --git a/build/ohos/ohos-sysroot/usr/include/EGL/egl.h b/build/ohos/ohos-sysroot/usr/include/EGL/egl.h +new file mode 100644 +index 0000000..b9ec7c1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/EGL/egl.h +@@ -0,0 +1,342 @@ ++#ifndef __egl_h_ ++#define __egl_h_ 1 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** Copyright 2013-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: Apache-2.0 ++** ++** This header is generated from the Khronos EGL XML API Registry. ++** The current version of the Registry, generator scripts ++** used to make the header, and the header can be found at ++** http://www.khronos.org/registry/egl ++** ++** Khronos $Git commit SHA1: 76c9410321 $ on $Git commit date: 2022-01-04 20:51:44 +0800 $ ++*/ ++ ++#include ++ ++#ifndef EGL_EGL_PROTOTYPES ++#define EGL_EGL_PROTOTYPES 1 ++#endif ++ ++/* Generated on date 20220105 */ ++ ++/* Generated C header for: ++ * API: egl ++ * Versions considered: .* ++ * Versions emitted: .* ++ * Default extensions included: None ++ * Additional extensions included: _nomatch_^ ++ * Extensions removed: _nomatch_^ ++ */ ++ ++#ifndef EGL_VERSION_1_0 ++#define EGL_VERSION_1_0 1 ++typedef unsigned int EGLBoolean; ++typedef void *EGLDisplay; ++#include ++#include ++typedef void *EGLConfig; ++typedef void *EGLSurface; ++typedef void *EGLContext; ++typedef void (*__eglMustCastToProperFunctionPointerType)(void); ++#define EGL_ALPHA_SIZE 0x3021 ++#define EGL_BAD_ACCESS 0x3002 ++#define EGL_BAD_ALLOC 0x3003 ++#define EGL_BAD_ATTRIBUTE 0x3004 ++#define EGL_BAD_CONFIG 0x3005 ++#define EGL_BAD_CONTEXT 0x3006 ++#define EGL_BAD_CURRENT_SURFACE 0x3007 ++#define EGL_BAD_DISPLAY 0x3008 ++#define EGL_BAD_MATCH 0x3009 ++#define EGL_BAD_NATIVE_PIXMAP 0x300A ++#define EGL_BAD_NATIVE_WINDOW 0x300B ++#define EGL_BAD_PARAMETER 0x300C ++#define EGL_BAD_SURFACE 0x300D ++#define EGL_BLUE_SIZE 0x3022 ++#define EGL_BUFFER_SIZE 0x3020 ++#define EGL_CONFIG_CAVEAT 0x3027 ++#define EGL_CONFIG_ID 0x3028 ++#define EGL_CORE_NATIVE_ENGINE 0x305B ++#define EGL_DEPTH_SIZE 0x3025 ++#define EGL_DONT_CARE EGL_CAST(EGLint,-1) ++#define EGL_DRAW 0x3059 ++#define EGL_EXTENSIONS 0x3055 ++#define EGL_FALSE 0 ++#define EGL_GREEN_SIZE 0x3023 ++#define EGL_HEIGHT 0x3056 ++#define EGL_LARGEST_PBUFFER 0x3058 ++#define EGL_LEVEL 0x3029 ++#define EGL_MAX_PBUFFER_HEIGHT 0x302A ++#define EGL_MAX_PBUFFER_PIXELS 0x302B ++#define EGL_MAX_PBUFFER_WIDTH 0x302C ++#define EGL_NATIVE_RENDERABLE 0x302D ++#define EGL_NATIVE_VISUAL_ID 0x302E ++#define EGL_NATIVE_VISUAL_TYPE 0x302F ++#define EGL_NONE 0x3038 ++#define EGL_NON_CONFORMANT_CONFIG 0x3051 ++#define EGL_NOT_INITIALIZED 0x3001 ++#define EGL_NO_CONTEXT EGL_CAST(EGLContext,0) ++#define EGL_NO_DISPLAY EGL_CAST(EGLDisplay,0) ++#define EGL_NO_SURFACE EGL_CAST(EGLSurface,0) ++#define EGL_PBUFFER_BIT 0x0001 ++#define EGL_PIXMAP_BIT 0x0002 ++#define EGL_READ 0x305A ++#define EGL_RED_SIZE 0x3024 ++#define EGL_SAMPLES 0x3031 ++#define EGL_SAMPLE_BUFFERS 0x3032 ++#define EGL_SLOW_CONFIG 0x3050 ++#define EGL_STENCIL_SIZE 0x3026 ++#define EGL_SUCCESS 0x3000 ++#define EGL_SURFACE_TYPE 0x3033 ++#define EGL_TRANSPARENT_BLUE_VALUE 0x3035 ++#define EGL_TRANSPARENT_GREEN_VALUE 0x3036 ++#define EGL_TRANSPARENT_RED_VALUE 0x3037 ++#define EGL_TRANSPARENT_RGB 0x3052 ++#define EGL_TRANSPARENT_TYPE 0x3034 ++#define EGL_TRUE 1 ++#define EGL_VENDOR 0x3053 ++#define EGL_VERSION 0x3054 ++#define EGL_WIDTH 0x3057 ++#define EGL_WINDOW_BIT 0x0004 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCHOOSECONFIGPROC) (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOPYBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); ++typedef EGLContext (EGLAPIENTRYP PFNEGLCREATECONTEXTPROC) (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERSURFACEPROC) (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGATTRIBPROC) (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCONFIGSPROC) (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); ++typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETCURRENTDISPLAYPROC) (void); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLGETCURRENTSURFACEPROC) (EGLint readdraw); ++typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETDISPLAYPROC) (EGLNativeDisplayType display_id); ++typedef EGLint (EGLAPIENTRYP PFNEGLGETERRORPROC) (void); ++typedef __eglMustCastToProperFunctionPointerType (EGLAPIENTRYP PFNEGLGETPROCADDRESSPROC) (const char *procname); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLINITIALIZEPROC) (EGLDisplay dpy, EGLint *major, EGLint *minor); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLMAKECURRENTPROC) (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYCONTEXTPROC) (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); ++typedef const char *(EGLAPIENTRYP PFNEGLQUERYSTRINGPROC) (EGLDisplay dpy, EGLint name); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSPROC) (EGLDisplay dpy, EGLSurface surface); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLTERMINATEPROC) (EGLDisplay dpy); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITGLPROC) (void); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITNATIVEPROC) (EGLint engine); ++#if EGL_EGL_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig (EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config); ++EGLAPI EGLBoolean EGLAPIENTRY eglCopyBuffers (EGLDisplay dpy, EGLSurface surface, EGLNativePixmapType target); ++EGLAPI EGLContext EGLAPIENTRY eglCreateContext (EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferSurface (EGLDisplay dpy, EGLConfig config, const EGLint *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurface (EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface (EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext (EGLDisplay dpy, EGLContext ctx); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface (EGLDisplay dpy, EGLSurface surface); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigs (EGLDisplay dpy, EGLConfig *configs, EGLint config_size, EGLint *num_config); ++EGLAPI EGLDisplay EGLAPIENTRY eglGetCurrentDisplay (void); ++EGLAPI EGLSurface EGLAPIENTRY eglGetCurrentSurface (EGLint readdraw); ++EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay (EGLNativeDisplayType display_id); ++EGLAPI EGLint EGLAPIENTRY eglGetError (void); ++EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress (const char *procname); ++EGLAPI EGLBoolean EGLAPIENTRY eglInitialize (EGLDisplay dpy, EGLint *major, EGLint *minor); ++EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryContext (EGLDisplay dpy, EGLContext ctx, EGLint attribute, EGLint *value); ++EGLAPI const char *EGLAPIENTRY eglQueryString (EGLDisplay dpy, EGLint name); ++EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint *value); ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers (EGLDisplay dpy, EGLSurface surface); ++EGLAPI EGLBoolean EGLAPIENTRY eglTerminate (EGLDisplay dpy); ++EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL (void); ++EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative (EGLint engine); ++#endif ++#endif /* EGL_VERSION_1_0 */ ++ ++#ifndef EGL_VERSION_1_1 ++#define EGL_VERSION_1_1 1 ++#define EGL_BACK_BUFFER 0x3084 ++#define EGL_BIND_TO_TEXTURE_RGB 0x3039 ++#define EGL_BIND_TO_TEXTURE_RGBA 0x303A ++#define EGL_CONTEXT_LOST 0x300E ++#define EGL_MIN_SWAP_INTERVAL 0x303B ++#define EGL_MAX_SWAP_INTERVAL 0x303C ++#define EGL_MIPMAP_TEXTURE 0x3082 ++#define EGL_MIPMAP_LEVEL 0x3083 ++#define EGL_NO_TEXTURE 0x305C ++#define EGL_TEXTURE_2D 0x305F ++#define EGL_TEXTURE_FORMAT 0x3080 ++#define EGL_TEXTURE_RGB 0x305D ++#define EGL_TEXTURE_RGBA 0x305E ++#define EGL_TEXTURE_TARGET 0x3081 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDTEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETEXIMAGEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint buffer); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSURFACEATTRIBPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPINTERVALPROC) (EGLDisplay dpy, EGLint interval); ++#if EGL_EGL_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglBindTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); ++EGLAPI EGLBoolean EGLAPIENTRY eglReleaseTexImage (EGLDisplay dpy, EGLSurface surface, EGLint buffer); ++EGLAPI EGLBoolean EGLAPIENTRY eglSurfaceAttrib (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLint value); ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval (EGLDisplay dpy, EGLint interval); ++#endif ++#endif /* EGL_VERSION_1_1 */ ++ ++#ifndef EGL_VERSION_1_2 ++#define EGL_VERSION_1_2 1 ++typedef unsigned int EGLenum; ++typedef void *EGLClientBuffer; ++#define EGL_ALPHA_FORMAT 0x3088 ++#define EGL_ALPHA_FORMAT_NONPRE 0x308B ++#define EGL_ALPHA_FORMAT_PRE 0x308C ++#define EGL_ALPHA_MASK_SIZE 0x303E ++#define EGL_BUFFER_PRESERVED 0x3094 ++#define EGL_BUFFER_DESTROYED 0x3095 ++#define EGL_CLIENT_APIS 0x308D ++#define EGL_COLORSPACE 0x3087 ++#define EGL_COLORSPACE_sRGB 0x3089 ++#define EGL_COLORSPACE_LINEAR 0x308A ++#define EGL_COLOR_BUFFER_TYPE 0x303F ++#define EGL_CONTEXT_CLIENT_TYPE 0x3097 ++#define EGL_DISPLAY_SCALING 10000 ++#define EGL_HORIZONTAL_RESOLUTION 0x3090 ++#define EGL_LUMINANCE_BUFFER 0x308F ++#define EGL_LUMINANCE_SIZE 0x303D ++#define EGL_OPENGL_ES_BIT 0x0001 ++#define EGL_OPENVG_BIT 0x0002 ++#define EGL_OPENGL_ES_API 0x30A0 ++#define EGL_OPENVG_API 0x30A1 ++#define EGL_OPENVG_IMAGE 0x3096 ++#define EGL_PIXEL_ASPECT_RATIO 0x3092 ++#define EGL_RENDERABLE_TYPE 0x3040 ++#define EGL_RENDER_BUFFER 0x3086 ++#define EGL_RGB_BUFFER 0x308E ++#define EGL_SINGLE_BUFFER 0x3085 ++#define EGL_SWAP_BEHAVIOR 0x3093 ++#define EGL_UNKNOWN EGL_CAST(EGLint,-1) ++#define EGL_VERTICAL_RESOLUTION 0x3091 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDAPIPROC) (EGLenum api); ++typedef EGLenum (EGLAPIENTRYP PFNEGLQUERYAPIPROC) (void); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPBUFFERFROMCLIENTBUFFERPROC) (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLRELEASETHREADPROC) (void); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITCLIENTPROC) (void); ++#if EGL_EGL_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI (EGLenum api); ++EGLAPI EGLenum EGLAPIENTRY eglQueryAPI (void); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePbufferFromClientBuffer (EGLDisplay dpy, EGLenum buftype, EGLClientBuffer buffer, EGLConfig config, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglReleaseThread (void); ++EGLAPI EGLBoolean EGLAPIENTRY eglWaitClient (void); ++#endif ++#endif /* EGL_VERSION_1_2 */ ++ ++#ifndef EGL_VERSION_1_3 ++#define EGL_VERSION_1_3 1 ++#define EGL_CONFORMANT 0x3042 ++#define EGL_CONTEXT_CLIENT_VERSION 0x3098 ++#define EGL_MATCH_NATIVE_PIXMAP 0x3041 ++#define EGL_OPENGL_ES2_BIT 0x0004 ++#define EGL_VG_ALPHA_FORMAT 0x3088 ++#define EGL_VG_ALPHA_FORMAT_NONPRE 0x308B ++#define EGL_VG_ALPHA_FORMAT_PRE 0x308C ++#define EGL_VG_ALPHA_FORMAT_PRE_BIT 0x0040 ++#define EGL_VG_COLORSPACE 0x3087 ++#define EGL_VG_COLORSPACE_sRGB 0x3089 ++#define EGL_VG_COLORSPACE_LINEAR 0x308A ++#define EGL_VG_COLORSPACE_LINEAR_BIT 0x0020 ++#endif /* EGL_VERSION_1_3 */ ++ ++#ifndef EGL_VERSION_1_4 ++#define EGL_VERSION_1_4 1 ++#define EGL_DEFAULT_DISPLAY EGL_CAST(EGLNativeDisplayType,0) ++#define EGL_MULTISAMPLE_RESOLVE_BOX_BIT 0x0200 ++#define EGL_MULTISAMPLE_RESOLVE 0x3099 ++#define EGL_MULTISAMPLE_RESOLVE_DEFAULT 0x309A ++#define EGL_MULTISAMPLE_RESOLVE_BOX 0x309B ++#define EGL_OPENGL_API 0x30A2 ++#define EGL_OPENGL_BIT 0x0008 ++#define EGL_SWAP_BEHAVIOR_PRESERVED_BIT 0x0400 ++typedef EGLContext (EGLAPIENTRYP PFNEGLGETCURRENTCONTEXTPROC) (void); ++#if EGL_EGL_PROTOTYPES ++EGLAPI EGLContext EGLAPIENTRY eglGetCurrentContext (void); ++#endif ++#endif /* EGL_VERSION_1_4 */ ++ ++#ifndef EGL_VERSION_1_5 ++#define EGL_VERSION_1_5 1 ++typedef void *EGLSync; ++typedef intptr_t EGLAttrib; ++typedef khronos_utime_nanoseconds_t EGLTime; ++typedef void *EGLImage; ++#define EGL_CONTEXT_MAJOR_VERSION 0x3098 ++#define EGL_CONTEXT_MINOR_VERSION 0x30FB ++#define EGL_CONTEXT_OPENGL_PROFILE_MASK 0x30FD ++#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY 0x31BD ++#define EGL_NO_RESET_NOTIFICATION 0x31BE ++#define EGL_LOSE_CONTEXT_ON_RESET 0x31BF ++#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT 0x00000001 ++#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT 0x00000002 ++#define EGL_CONTEXT_OPENGL_DEBUG 0x31B0 ++#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE 0x31B1 ++#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS 0x31B2 ++#define EGL_OPENGL_ES3_BIT 0x00000040 ++#define EGL_CL_EVENT_HANDLE 0x309C ++#define EGL_SYNC_CL_EVENT 0x30FE ++#define EGL_SYNC_CL_EVENT_COMPLETE 0x30FF ++#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE 0x30F0 ++#define EGL_SYNC_TYPE 0x30F7 ++#define EGL_SYNC_STATUS 0x30F1 ++#define EGL_SYNC_CONDITION 0x30F8 ++#define EGL_SIGNALED 0x30F2 ++#define EGL_UNSIGNALED 0x30F3 ++#define EGL_SYNC_FLUSH_COMMANDS_BIT 0x0001 ++#define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull ++#define EGL_TIMEOUT_EXPIRED 0x30F5 ++#define EGL_CONDITION_SATISFIED 0x30F6 ++#define EGL_NO_SYNC EGL_CAST(EGLSync,0) ++#define EGL_SYNC_FENCE 0x30F9 ++#define EGL_GL_COLORSPACE 0x309D ++#define EGL_GL_COLORSPACE_SRGB 0x3089 ++#define EGL_GL_COLORSPACE_LINEAR 0x308A ++#define EGL_GL_RENDERBUFFER 0x30B9 ++#define EGL_GL_TEXTURE_2D 0x30B1 ++#define EGL_GL_TEXTURE_LEVEL 0x30BC ++#define EGL_GL_TEXTURE_3D 0x30B2 ++#define EGL_GL_TEXTURE_ZOFFSET 0x30BD ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x30B3 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x30B4 ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x30B5 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x30B6 ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x30B7 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x30B8 ++#define EGL_IMAGE_PRESERVED 0x30D2 ++#define EGL_NO_IMAGE EGL_CAST(EGLImage,0) ++typedef EGLSync (EGLAPIENTRYP PFNEGLCREATESYNCPROC) (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCPROC) (EGLDisplay dpy, EGLSync sync); ++typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBPROC) (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); ++typedef EGLImage (EGLAPIENTRYP PFNEGLCREATEIMAGEPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEPROC) (EGLDisplay dpy, EGLImage image); ++typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYPROC) (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLWAITSYNCPROC) (EGLDisplay dpy, EGLSync sync, EGLint flags); ++#if EGL_EGL_PROTOTYPES ++EGLAPI EGLSync EGLAPIENTRY eglCreateSync (EGLDisplay dpy, EGLenum type, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroySync (EGLDisplay dpy, EGLSync sync); ++EGLAPI EGLint EGLAPIENTRY eglClientWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags, EGLTime timeout); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttrib (EGLDisplay dpy, EGLSync sync, EGLint attribute, EGLAttrib *value); ++EGLAPI EGLImage EGLAPIENTRY eglCreateImage (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImage (EGLDisplay dpy, EGLImage image); ++EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplay (EGLenum platform, void *native_display, const EGLAttrib *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurface (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLAttrib *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurface (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglWaitSync (EGLDisplay dpy, EGLSync sync, EGLint flags); ++#endif ++#endif /* EGL_VERSION_1_5 */ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/EGL/eglext.h b/build/ohos/ohos-sysroot/usr/include/EGL/eglext.h +new file mode 100644 +index 0000000..14e6902 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/EGL/eglext.h +@@ -0,0 +1,1489 @@ ++#ifndef __eglext_h_ ++#define __eglext_h_ 1 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** Copyright 2013-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: Apache-2.0 ++** ++** This header is generated from the Khronos EGL XML API Registry. ++** The current version of the Registry, generator scripts ++** used to make the header, and the header can be found at ++** http://www.khronos.org/registry/egl ++** ++** Khronos $Git commit SHA1: 76c9410321 $ on $Git commit date: 2022-01-04 20:51:44 +0800 $ ++*/ ++ ++#include ++ ++#define EGL_EGLEXT_VERSION 20220105 ++ ++/* Generated C header for: ++ * API: egl ++ * Versions considered: .* ++ * Versions emitted: _nomatch_^ ++ * Default extensions included: egl ++ * Additional extensions included: _nomatch_^ ++ * Extensions removed: _nomatch_^ ++ */ ++ ++#ifndef EGL_KHR_cl_event ++#define EGL_KHR_cl_event 1 ++#define EGL_CL_EVENT_HANDLE_KHR 0x309C ++#define EGL_SYNC_CL_EVENT_KHR 0x30FE ++#define EGL_SYNC_CL_EVENT_COMPLETE_KHR 0x30FF ++#endif /* EGL_KHR_cl_event */ ++ ++#ifndef EGL_KHR_cl_event2 ++#define EGL_KHR_cl_event2 1 ++typedef void *EGLSyncKHR; ++typedef intptr_t EGLAttribKHR; ++typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNC64KHRPROC) (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSync64KHR (EGLDisplay dpy, EGLenum type, const EGLAttribKHR *attrib_list); ++#endif ++#endif /* EGL_KHR_cl_event2 */ ++ ++#ifndef EGL_KHR_client_get_all_proc_addresses ++#define EGL_KHR_client_get_all_proc_addresses 1 ++#endif /* EGL_KHR_client_get_all_proc_addresses */ ++ ++#ifndef EGL_KHR_config_attribs ++#define EGL_KHR_config_attribs 1 ++#define EGL_CONFORMANT_KHR 0x3042 ++#define EGL_VG_COLORSPACE_LINEAR_BIT_KHR 0x0020 ++#define EGL_VG_ALPHA_FORMAT_PRE_BIT_KHR 0x0040 ++#endif /* EGL_KHR_config_attribs */ ++ ++#ifndef EGL_KHR_context_flush_control ++#define EGL_KHR_context_flush_control 1 ++#define EGL_CONTEXT_RELEASE_BEHAVIOR_NONE_KHR 0 ++#define EGL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x2097 ++#define EGL_CONTEXT_RELEASE_BEHAVIOR_FLUSH_KHR 0x2098 ++#endif /* EGL_KHR_context_flush_control */ ++ ++#ifndef EGL_KHR_create_context ++#define EGL_KHR_create_context 1 ++#define EGL_CONTEXT_MAJOR_VERSION_KHR 0x3098 ++#define EGL_CONTEXT_MINOR_VERSION_KHR 0x30FB ++#define EGL_CONTEXT_FLAGS_KHR 0x30FC ++#define EGL_CONTEXT_OPENGL_PROFILE_MASK_KHR 0x30FD ++#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_KHR 0x31BD ++#define EGL_NO_RESET_NOTIFICATION_KHR 0x31BE ++#define EGL_LOSE_CONTEXT_ON_RESET_KHR 0x31BF ++#define EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR 0x00000001 ++#define EGL_CONTEXT_OPENGL_FORWARD_COMPATIBLE_BIT_KHR 0x00000002 ++#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_BIT_KHR 0x00000004 ++#define EGL_CONTEXT_OPENGL_CORE_PROFILE_BIT_KHR 0x00000001 ++#define EGL_CONTEXT_OPENGL_COMPATIBILITY_PROFILE_BIT_KHR 0x00000002 ++#define EGL_OPENGL_ES3_BIT_KHR 0x00000040 ++#endif /* EGL_KHR_create_context */ ++ ++#ifndef EGL_KHR_create_context_no_error ++#define EGL_KHR_create_context_no_error 1 ++#define EGL_CONTEXT_OPENGL_NO_ERROR_KHR 0x31B3 ++#endif /* EGL_KHR_create_context_no_error */ ++ ++#ifndef EGL_KHR_debug ++#define EGL_KHR_debug 1 ++typedef void *EGLLabelKHR; ++typedef void *EGLObjectKHR; ++typedef void (EGLAPIENTRY *EGLDEBUGPROCKHR)(EGLenum error,const char *command,EGLint messageType,EGLLabelKHR threadLabel,EGLLabelKHR objectLabel,const char* message); ++#define EGL_OBJECT_THREAD_KHR 0x33B0 ++#define EGL_OBJECT_DISPLAY_KHR 0x33B1 ++#define EGL_OBJECT_CONTEXT_KHR 0x33B2 ++#define EGL_OBJECT_SURFACE_KHR 0x33B3 ++#define EGL_OBJECT_IMAGE_KHR 0x33B4 ++#define EGL_OBJECT_SYNC_KHR 0x33B5 ++#define EGL_OBJECT_STREAM_KHR 0x33B6 ++#define EGL_DEBUG_MSG_CRITICAL_KHR 0x33B9 ++#define EGL_DEBUG_MSG_ERROR_KHR 0x33BA ++#define EGL_DEBUG_MSG_WARN_KHR 0x33BB ++#define EGL_DEBUG_MSG_INFO_KHR 0x33BC ++#define EGL_DEBUG_CALLBACK_KHR 0x33B8 ++typedef EGLint (EGLAPIENTRYP PFNEGLDEBUGMESSAGECONTROLKHRPROC) (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEBUGKHRPROC) (EGLint attribute, EGLAttrib *value); ++typedef EGLint (EGLAPIENTRYP PFNEGLLABELOBJECTKHRPROC) (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLint EGLAPIENTRY eglDebugMessageControlKHR (EGLDEBUGPROCKHR callback, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDebugKHR (EGLint attribute, EGLAttrib *value); ++EGLAPI EGLint EGLAPIENTRY eglLabelObjectKHR (EGLDisplay display, EGLenum objectType, EGLObjectKHR object, EGLLabelKHR label); ++#endif ++#endif /* EGL_KHR_debug */ ++ ++#ifndef EGL_KHR_display_reference ++#define EGL_KHR_display_reference 1 ++#define EGL_TRACK_REFERENCES_KHR 0x3352 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBKHRPROC) (EGLDisplay dpy, EGLint name, EGLAttrib *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribKHR (EGLDisplay dpy, EGLint name, EGLAttrib *value); ++#endif ++#endif /* EGL_KHR_display_reference */ ++ ++#ifndef EGL_KHR_fence_sync ++#define EGL_KHR_fence_sync 1 ++typedef khronos_utime_nanoseconds_t EGLTimeKHR; ++#ifdef KHRONOS_SUPPORT_INT64 ++#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_KHR 0x30F0 ++#define EGL_SYNC_CONDITION_KHR 0x30F8 ++#define EGL_SYNC_FENCE_KHR 0x30F9 ++typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESYNCKHRPROC) (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync); ++typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateSyncKHR (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncKHR (EGLDisplay dpy, EGLSyncKHR sync); ++EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint attribute, EGLint *value); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_KHR_fence_sync */ ++ ++#ifndef EGL_KHR_get_all_proc_addresses ++#define EGL_KHR_get_all_proc_addresses 1 ++#endif /* EGL_KHR_get_all_proc_addresses */ ++ ++#ifndef EGL_KHR_gl_colorspace ++#define EGL_KHR_gl_colorspace 1 ++#define EGL_GL_COLORSPACE_KHR 0x309D ++#define EGL_GL_COLORSPACE_SRGB_KHR 0x3089 ++#define EGL_GL_COLORSPACE_LINEAR_KHR 0x308A ++#endif /* EGL_KHR_gl_colorspace */ ++ ++#ifndef EGL_KHR_gl_renderbuffer_image ++#define EGL_KHR_gl_renderbuffer_image 1 ++#define EGL_GL_RENDERBUFFER_KHR 0x30B9 ++#endif /* EGL_KHR_gl_renderbuffer_image */ ++ ++#ifndef EGL_KHR_gl_texture_2D_image ++#define EGL_KHR_gl_texture_2D_image 1 ++#define EGL_GL_TEXTURE_2D_KHR 0x30B1 ++#define EGL_GL_TEXTURE_LEVEL_KHR 0x30BC ++#endif /* EGL_KHR_gl_texture_2D_image */ ++ ++#ifndef EGL_KHR_gl_texture_3D_image ++#define EGL_KHR_gl_texture_3D_image 1 ++#define EGL_GL_TEXTURE_3D_KHR 0x30B2 ++#define EGL_GL_TEXTURE_ZOFFSET_KHR 0x30BD ++#endif /* EGL_KHR_gl_texture_3D_image */ ++ ++#ifndef EGL_KHR_gl_texture_cubemap_image ++#define EGL_KHR_gl_texture_cubemap_image 1 ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_X_KHR 0x30B3 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_X_KHR 0x30B4 ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Y_KHR 0x30B5 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Y_KHR 0x30B6 ++#define EGL_GL_TEXTURE_CUBE_MAP_POSITIVE_Z_KHR 0x30B7 ++#define EGL_GL_TEXTURE_CUBE_MAP_NEGATIVE_Z_KHR 0x30B8 ++#endif /* EGL_KHR_gl_texture_cubemap_image */ ++ ++#ifndef EGL_KHR_image ++#define EGL_KHR_image 1 ++typedef void *EGLImageKHR; ++#define EGL_NATIVE_PIXMAP_KHR 0x30B0 ++#define EGL_NO_IMAGE_KHR EGL_CAST(EGLImageKHR,0) ++typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEIMAGEKHRPROC) (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYIMAGEKHRPROC) (EGLDisplay dpy, EGLImageKHR image); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLImageKHR EGLAPIENTRY eglCreateImageKHR (EGLDisplay dpy, EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroyImageKHR (EGLDisplay dpy, EGLImageKHR image); ++#endif ++#endif /* EGL_KHR_image */ ++ ++#ifndef EGL_KHR_image_base ++#define EGL_KHR_image_base 1 ++#define EGL_IMAGE_PRESERVED_KHR 0x30D2 ++#endif /* EGL_KHR_image_base */ ++ ++#ifndef EGL_KHR_image_pixmap ++#define EGL_KHR_image_pixmap 1 ++#endif /* EGL_KHR_image_pixmap */ ++ ++#ifndef EGL_KHR_lock_surface ++#define EGL_KHR_lock_surface 1 ++#define EGL_READ_SURFACE_BIT_KHR 0x0001 ++#define EGL_WRITE_SURFACE_BIT_KHR 0x0002 ++#define EGL_LOCK_SURFACE_BIT_KHR 0x0080 ++#define EGL_OPTIMAL_FORMAT_BIT_KHR 0x0100 ++#define EGL_MATCH_FORMAT_KHR 0x3043 ++#define EGL_FORMAT_RGB_565_EXACT_KHR 0x30C0 ++#define EGL_FORMAT_RGB_565_KHR 0x30C1 ++#define EGL_FORMAT_RGBA_8888_EXACT_KHR 0x30C2 ++#define EGL_FORMAT_RGBA_8888_KHR 0x30C3 ++#define EGL_MAP_PRESERVE_PIXELS_KHR 0x30C4 ++#define EGL_LOCK_USAGE_HINT_KHR 0x30C5 ++#define EGL_BITMAP_POINTER_KHR 0x30C6 ++#define EGL_BITMAP_PITCH_KHR 0x30C7 ++#define EGL_BITMAP_ORIGIN_KHR 0x30C8 ++#define EGL_BITMAP_PIXEL_RED_OFFSET_KHR 0x30C9 ++#define EGL_BITMAP_PIXEL_GREEN_OFFSET_KHR 0x30CA ++#define EGL_BITMAP_PIXEL_BLUE_OFFSET_KHR 0x30CB ++#define EGL_BITMAP_PIXEL_ALPHA_OFFSET_KHR 0x30CC ++#define EGL_BITMAP_PIXEL_LUMINANCE_OFFSET_KHR 0x30CD ++#define EGL_LOWER_LEFT_KHR 0x30CE ++#define EGL_UPPER_LEFT_KHR 0x30CF ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNLOCKSURFACEKHRPROC) (EGLDisplay dpy, EGLSurface surface); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglLockSurfaceKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglUnlockSurfaceKHR (EGLDisplay dpy, EGLSurface surface); ++#endif ++#endif /* EGL_KHR_lock_surface */ ++ ++#ifndef EGL_KHR_lock_surface2 ++#define EGL_KHR_lock_surface2 1 ++#define EGL_BITMAP_PIXEL_SIZE_KHR 0x3110 ++#endif /* EGL_KHR_lock_surface2 */ ++ ++#ifndef EGL_KHR_lock_surface3 ++#define EGL_KHR_lock_surface3 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACE64KHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurface64KHR (EGLDisplay dpy, EGLSurface surface, EGLint attribute, EGLAttribKHR *value); ++#endif ++#endif /* EGL_KHR_lock_surface3 */ ++ ++#ifndef EGL_KHR_mutable_render_buffer ++#define EGL_KHR_mutable_render_buffer 1 ++#define EGL_MUTABLE_RENDER_BUFFER_BIT_KHR 0x1000 ++#endif /* EGL_KHR_mutable_render_buffer */ ++ ++#ifndef EGL_KHR_no_config_context ++#define EGL_KHR_no_config_context 1 ++#define EGL_NO_CONFIG_KHR EGL_CAST(EGLConfig,0) ++#endif /* EGL_KHR_no_config_context */ ++ ++#ifndef EGL_KHR_partial_update ++#define EGL_KHR_partial_update 1 ++#define EGL_BUFFER_AGE_KHR 0x313D ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETDAMAGEREGIONKHRPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSetDamageRegionKHR (EGLDisplay dpy, EGLSurface surface, EGLint *rects, EGLint n_rects); ++#endif ++#endif /* EGL_KHR_partial_update */ ++ ++#ifndef EGL_KHR_platform_android ++#define EGL_KHR_platform_android 1 ++#define EGL_PLATFORM_ANDROID_KHR 0x3141 ++#endif /* EGL_KHR_platform_android */ ++ ++#ifndef EGL_KHR_platform_gbm ++#define EGL_KHR_platform_gbm 1 ++#define EGL_PLATFORM_GBM_KHR 0x31D7 ++#endif /* EGL_KHR_platform_gbm */ ++ ++#ifndef EGL_KHR_platform_ohos ++#define EGL_KHR_platform_ohos 1 ++#define EGL_PLATFORM_OHOS_KHR 0x34E0 ++#endif /* EGL_KHR_platform_ohos */ ++ ++#ifndef EGL_KHR_platform_wayland ++#define EGL_KHR_platform_wayland 1 ++#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 ++#endif /* EGL_KHR_platform_wayland */ ++ ++#ifndef EGL_KHR_platform_x11 ++#define EGL_KHR_platform_x11 1 ++#define EGL_PLATFORM_X11_KHR 0x31D5 ++#define EGL_PLATFORM_X11_SCREEN_KHR 0x31D6 ++#endif /* EGL_KHR_platform_x11 */ ++ ++#ifndef EGL_KHR_reusable_sync ++#define EGL_KHR_reusable_sync 1 ++#ifdef KHRONOS_SUPPORT_INT64 ++#define EGL_SYNC_STATUS_KHR 0x30F1 ++#define EGL_SIGNALED_KHR 0x30F2 ++#define EGL_UNSIGNALED_KHR 0x30F3 ++#define EGL_TIMEOUT_EXPIRED_KHR 0x30F5 ++#define EGL_CONDITION_SATISFIED_KHR 0x30F6 ++#define EGL_SYNC_TYPE_KHR 0x30F7 ++#define EGL_SYNC_REUSABLE_KHR 0x30FA ++#define EGL_SYNC_FLUSH_COMMANDS_BIT_KHR 0x0001 ++#define EGL_FOREVER_KHR 0xFFFFFFFFFFFFFFFFull ++#define EGL_NO_SYNC_KHR EGL_CAST(EGLSyncKHR,0) ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLenum mode); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_KHR_reusable_sync */ ++ ++#ifndef EGL_KHR_stream ++#define EGL_KHR_stream 1 ++typedef void *EGLStreamKHR; ++typedef khronos_uint64_t EGLuint64KHR; ++#ifdef KHRONOS_SUPPORT_INT64 ++#define EGL_NO_STREAM_KHR EGL_CAST(EGLStreamKHR,0) ++#define EGL_CONSUMER_LATENCY_USEC_KHR 0x3210 ++#define EGL_PRODUCER_FRAME_KHR 0x3212 ++#define EGL_CONSUMER_FRAME_KHR 0x3213 ++#define EGL_STREAM_STATE_KHR 0x3214 ++#define EGL_STREAM_STATE_CREATED_KHR 0x3215 ++#define EGL_STREAM_STATE_CONNECTING_KHR 0x3216 ++#define EGL_STREAM_STATE_EMPTY_KHR 0x3217 ++#define EGL_STREAM_STATE_NEW_FRAME_AVAILABLE_KHR 0x3218 ++#define EGL_STREAM_STATE_OLD_FRAME_AVAILABLE_KHR 0x3219 ++#define EGL_STREAM_STATE_DISCONNECTED_KHR 0x321A ++#define EGL_BAD_STREAM_KHR 0x321B ++#define EGL_BAD_STATE_KHR 0x321C ++typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMKHRPROC) (EGLDisplay dpy, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMU64KHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamKHR (EGLDisplay dpy, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroyStreamKHR (EGLDisplay dpy, EGLStreamKHR stream); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint value); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLint *value); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamu64KHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLuint64KHR *value); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_KHR_stream */ ++ ++#ifndef EGL_KHR_stream_attrib ++#define EGL_KHR_stream_attrib 1 ++#ifdef KHRONOS_SUPPORT_INT64 ++typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMATTRIBKHRPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEATTRIBKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamAttribKHR (EGLDisplay dpy, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib value); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLAttrib *value); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseAttribKHR (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_KHR_stream_attrib */ ++ ++#ifndef EGL_KHR_stream_consumer_gltexture ++#define EGL_KHR_stream_consumer_gltexture 1 ++#ifdef EGL_KHR_stream ++#define EGL_CONSUMER_ACQUIRE_TIMEOUT_USEC_KHR 0x321E ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERACQUIREKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERRELEASEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalKHR (EGLDisplay dpy, EGLStreamKHR stream); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerAcquireKHR (EGLDisplay dpy, EGLStreamKHR stream); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerReleaseKHR (EGLDisplay dpy, EGLStreamKHR stream); ++#endif ++#endif /* EGL_KHR_stream */ ++#endif /* EGL_KHR_stream_consumer_gltexture */ ++ ++#ifndef EGL_KHR_stream_cross_process_fd ++#define EGL_KHR_stream_cross_process_fd 1 ++typedef int EGLNativeFileDescriptorKHR; ++#ifdef EGL_KHR_stream ++#define EGL_NO_FILE_DESCRIPTOR_KHR EGL_CAST(EGLNativeFileDescriptorKHR,-1) ++typedef EGLNativeFileDescriptorKHR (EGLAPIENTRYP PFNEGLGETSTREAMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++typedef EGLStreamKHR (EGLAPIENTRYP PFNEGLCREATESTREAMFROMFILEDESCRIPTORKHRPROC) (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLNativeFileDescriptorKHR EGLAPIENTRY eglGetStreamFileDescriptorKHR (EGLDisplay dpy, EGLStreamKHR stream); ++EGLAPI EGLStreamKHR EGLAPIENTRY eglCreateStreamFromFileDescriptorKHR (EGLDisplay dpy, EGLNativeFileDescriptorKHR file_descriptor); ++#endif ++#endif /* EGL_KHR_stream */ ++#endif /* EGL_KHR_stream_cross_process_fd */ ++ ++#ifndef EGL_KHR_stream_fifo ++#define EGL_KHR_stream_fifo 1 ++#ifdef EGL_KHR_stream ++#define EGL_STREAM_FIFO_LENGTH_KHR 0x31FC ++#define EGL_STREAM_TIME_NOW_KHR 0x31FD ++#define EGL_STREAM_TIME_CONSUMER_KHR 0x31FE ++#define EGL_STREAM_TIME_PRODUCER_KHR 0x31FF ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMTIMEKHRPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamTimeKHR (EGLDisplay dpy, EGLStreamKHR stream, EGLenum attribute, EGLTimeKHR *value); ++#endif ++#endif /* EGL_KHR_stream */ ++#endif /* EGL_KHR_stream_fifo */ ++ ++#ifndef EGL_KHR_stream_producer_aldatalocator ++#define EGL_KHR_stream_producer_aldatalocator 1 ++#ifdef EGL_KHR_stream ++#endif /* EGL_KHR_stream */ ++#endif /* EGL_KHR_stream_producer_aldatalocator */ ++ ++#ifndef EGL_KHR_stream_producer_eglsurface ++#define EGL_KHR_stream_producer_eglsurface 1 ++#ifdef EGL_KHR_stream ++#define EGL_STREAM_BIT_KHR 0x0800 ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC) (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSurface EGLAPIENTRY eglCreateStreamProducerSurfaceKHR (EGLDisplay dpy, EGLConfig config, EGLStreamKHR stream, const EGLint *attrib_list); ++#endif ++#endif /* EGL_KHR_stream */ ++#endif /* EGL_KHR_stream_producer_eglsurface */ ++ ++#ifndef EGL_KHR_surfaceless_context ++#define EGL_KHR_surfaceless_context 1 ++#endif /* EGL_KHR_surfaceless_context */ ++ ++#ifndef EGL_KHR_swap_buffers_with_damage ++#define EGL_KHR_swap_buffers_with_damage 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageKHR (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects); ++#endif ++#endif /* EGL_KHR_swap_buffers_with_damage */ ++ ++#ifndef EGL_KHR_vg_parent_image ++#define EGL_KHR_vg_parent_image 1 ++#define EGL_VG_PARENT_IMAGE_KHR 0x30BA ++#endif /* EGL_KHR_vg_parent_image */ ++ ++#ifndef EGL_KHR_wait_sync ++#define EGL_KHR_wait_sync 1 ++typedef EGLint (EGLAPIENTRYP PFNEGLWAITSYNCKHRPROC) (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLint EGLAPIENTRY eglWaitSyncKHR (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags); ++#endif ++#endif /* EGL_KHR_wait_sync */ ++ ++#ifndef EGL_ANDROID_GLES_layers ++#define EGL_ANDROID_GLES_layers 1 ++#endif /* EGL_ANDROID_GLES_layers */ ++ ++#ifndef EGL_ANDROID_blob_cache ++#define EGL_ANDROID_blob_cache 1 ++typedef khronos_ssize_t EGLsizeiANDROID; ++typedef void (*EGLSetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, const void *value, EGLsizeiANDROID valueSize); ++typedef EGLsizeiANDROID (*EGLGetBlobFuncANDROID) (const void *key, EGLsizeiANDROID keySize, void *value, EGLsizeiANDROID valueSize); ++typedef void (EGLAPIENTRYP PFNEGLSETBLOBCACHEFUNCSANDROIDPROC) (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI void EGLAPIENTRY eglSetBlobCacheFuncsANDROID (EGLDisplay dpy, EGLSetBlobFuncANDROID set, EGLGetBlobFuncANDROID get); ++#endif ++#endif /* EGL_ANDROID_blob_cache */ ++ ++#ifndef EGL_ANDROID_create_native_client_buffer ++#define EGL_ANDROID_create_native_client_buffer 1 ++#define EGL_NATIVE_BUFFER_USAGE_ANDROID 0x3143 ++#define EGL_NATIVE_BUFFER_USAGE_PROTECTED_BIT_ANDROID 0x00000001 ++#define EGL_NATIVE_BUFFER_USAGE_RENDERBUFFER_BIT_ANDROID 0x00000002 ++#define EGL_NATIVE_BUFFER_USAGE_TEXTURE_BIT_ANDROID 0x00000004 ++typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLCREATENATIVECLIENTBUFFERANDROIDPROC) (const EGLint *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLClientBuffer EGLAPIENTRY eglCreateNativeClientBufferANDROID (const EGLint *attrib_list); ++#endif ++#endif /* EGL_ANDROID_create_native_client_buffer */ ++ ++#ifndef EGL_ANDROID_framebuffer_target ++#define EGL_ANDROID_framebuffer_target 1 ++#define EGL_FRAMEBUFFER_TARGET_ANDROID 0x3147 ++#endif /* EGL_ANDROID_framebuffer_target */ ++ ++#ifndef EGL_ANDROID_front_buffer_auto_refresh ++#define EGL_ANDROID_front_buffer_auto_refresh 1 ++#define EGL_FRONT_BUFFER_AUTO_REFRESH_ANDROID 0x314C ++#endif /* EGL_ANDROID_front_buffer_auto_refresh */ ++ ++#ifndef EGL_ANDROID_get_frame_timestamps ++#define EGL_ANDROID_get_frame_timestamps 1 ++typedef khronos_stime_nanoseconds_t EGLnsecsANDROID; ++#define EGL_TIMESTAMP_PENDING_ANDROID EGL_CAST(EGLnsecsANDROID,-2) ++#define EGL_TIMESTAMP_INVALID_ANDROID EGL_CAST(EGLnsecsANDROID,-1) ++#define EGL_TIMESTAMPS_ANDROID 0x3430 ++#define EGL_COMPOSITE_DEADLINE_ANDROID 0x3431 ++#define EGL_COMPOSITE_INTERVAL_ANDROID 0x3432 ++#define EGL_COMPOSITE_TO_PRESENT_LATENCY_ANDROID 0x3433 ++#define EGL_REQUESTED_PRESENT_TIME_ANDROID 0x3434 ++#define EGL_RENDERING_COMPLETE_TIME_ANDROID 0x3435 ++#define EGL_COMPOSITION_LATCH_TIME_ANDROID 0x3436 ++#define EGL_FIRST_COMPOSITION_START_TIME_ANDROID 0x3437 ++#define EGL_LAST_COMPOSITION_START_TIME_ANDROID 0x3438 ++#define EGL_FIRST_COMPOSITION_GPU_FINISHED_TIME_ANDROID 0x3439 ++#define EGL_DISPLAY_PRESENT_TIME_ANDROID 0x343A ++#define EGL_DEQUEUE_READY_TIME_ANDROID 0x343B ++#define EGL_READS_DONE_TIME_ANDROID 0x343C ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint name); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETCOMPOSITORTIMINGANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps, const EGLint *names, EGLnsecsANDROID *values); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETNEXTFRAMEIDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSUPPORTEDANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLint timestamp); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETFRAMETIMESTAMPSANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps, const EGLint *timestamps, EGLnsecsANDROID *values); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint name); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetCompositorTimingANDROID (EGLDisplay dpy, EGLSurface surface, EGLint numTimestamps, const EGLint *names, EGLnsecsANDROID *values); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetNextFrameIdANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR *frameId); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampSupportedANDROID (EGLDisplay dpy, EGLSurface surface, EGLint timestamp); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetFrameTimestampsANDROID (EGLDisplay dpy, EGLSurface surface, EGLuint64KHR frameId, EGLint numTimestamps, const EGLint *timestamps, EGLnsecsANDROID *values); ++#endif ++#endif /* EGL_ANDROID_get_frame_timestamps */ ++ ++#ifndef EGL_ANDROID_get_native_client_buffer ++#define EGL_ANDROID_get_native_client_buffer 1 ++struct AHardwareBuffer; ++typedef EGLClientBuffer (EGLAPIENTRYP PFNEGLGETNATIVECLIENTBUFFERANDROIDPROC) (const struct AHardwareBuffer *buffer); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLClientBuffer EGLAPIENTRY eglGetNativeClientBufferANDROID (const struct AHardwareBuffer *buffer); ++#endif ++#endif /* EGL_ANDROID_get_native_client_buffer */ ++ ++#ifndef EGL_ANDROID_image_native_buffer ++#define EGL_ANDROID_image_native_buffer 1 ++#define EGL_NATIVE_BUFFER_ANDROID 0x3140 ++#endif /* EGL_ANDROID_image_native_buffer */ ++ ++#ifndef EGL_ANDROID_native_fence_sync ++#define EGL_ANDROID_native_fence_sync 1 ++#define EGL_SYNC_NATIVE_FENCE_ANDROID 0x3144 ++#define EGL_SYNC_NATIVE_FENCE_FD_ANDROID 0x3145 ++#define EGL_SYNC_NATIVE_FENCE_SIGNALED_ANDROID 0x3146 ++#define EGL_NO_NATIVE_FENCE_FD_ANDROID -1 ++typedef EGLint (EGLAPIENTRYP PFNEGLDUPNATIVEFENCEFDANDROIDPROC) (EGLDisplay dpy, EGLSyncKHR sync); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLint EGLAPIENTRY eglDupNativeFenceFDANDROID (EGLDisplay dpy, EGLSyncKHR sync); ++#endif ++#endif /* EGL_ANDROID_native_fence_sync */ ++ ++#ifndef EGL_ANDROID_presentation_time ++#define EGL_ANDROID_presentation_time 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLPRESENTATIONTIMEANDROIDPROC) (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglPresentationTimeANDROID (EGLDisplay dpy, EGLSurface surface, EGLnsecsANDROID time); ++#endif ++#endif /* EGL_ANDROID_presentation_time */ ++ ++#ifndef EGL_ANDROID_recordable ++#define EGL_ANDROID_recordable 1 ++#define EGL_RECORDABLE_ANDROID 0x3142 ++#endif /* EGL_ANDROID_recordable */ ++ ++#ifndef EGL_ANGLE_d3d_share_handle_client_buffer ++#define EGL_ANGLE_d3d_share_handle_client_buffer 1 ++#define EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE 0x3200 ++#endif /* EGL_ANGLE_d3d_share_handle_client_buffer */ ++ ++#ifndef EGL_ANGLE_device_d3d ++#define EGL_ANGLE_device_d3d 1 ++#define EGL_D3D9_DEVICE_ANGLE 0x33A0 ++#define EGL_D3D11_DEVICE_ANGLE 0x33A1 ++#endif /* EGL_ANGLE_device_d3d */ ++ ++#ifndef EGL_ANGLE_query_surface_pointer ++#define EGL_ANGLE_query_surface_pointer 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSURFACEPOINTERANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQuerySurfacePointerANGLE (EGLDisplay dpy, EGLSurface surface, EGLint attribute, void **value); ++#endif ++#endif /* EGL_ANGLE_query_surface_pointer */ ++ ++#ifndef EGL_ANGLE_surface_d3d_texture_2d_share_handle ++#define EGL_ANGLE_surface_d3d_texture_2d_share_handle 1 ++#endif /* EGL_ANGLE_surface_d3d_texture_2d_share_handle */ ++ ++#ifndef EGL_ANGLE_sync_control_rate ++#define EGL_ANGLE_sync_control_rate 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETMSCRATEANGLEPROC) (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglGetMscRateANGLE (EGLDisplay dpy, EGLSurface surface, EGLint *numerator, EGLint *denominator); ++#endif ++#endif /* EGL_ANGLE_sync_control_rate */ ++ ++#ifndef EGL_ANGLE_window_fixed_size ++#define EGL_ANGLE_window_fixed_size 1 ++#define EGL_FIXED_SIZE_ANGLE 0x3201 ++#endif /* EGL_ANGLE_window_fixed_size */ ++ ++#ifndef EGL_ARM_image_format ++#define EGL_ARM_image_format 1 ++#define EGL_COLOR_COMPONENT_TYPE_UNSIGNED_INTEGER_ARM 0x3287 ++#define EGL_COLOR_COMPONENT_TYPE_INTEGER_ARM 0x3288 ++#endif /* EGL_ARM_image_format */ ++ ++#ifndef EGL_ARM_implicit_external_sync ++#define EGL_ARM_implicit_external_sync 1 ++#define EGL_SYNC_PRIOR_COMMANDS_IMPLICIT_EXTERNAL_ARM 0x328A ++#endif /* EGL_ARM_implicit_external_sync */ ++ ++#ifndef EGL_ARM_pixmap_multisample_discard ++#define EGL_ARM_pixmap_multisample_discard 1 ++#define EGL_DISCARD_SAMPLES_ARM 0x3286 ++#endif /* EGL_ARM_pixmap_multisample_discard */ ++ ++#ifndef EGL_EXT_bind_to_front ++#define EGL_EXT_bind_to_front 1 ++#define EGL_FRONT_BUFFER_EXT 0x3464 ++#endif /* EGL_EXT_bind_to_front */ ++ ++#ifndef EGL_EXT_buffer_age ++#define EGL_EXT_buffer_age 1 ++#define EGL_BUFFER_AGE_EXT 0x313D ++#endif /* EGL_EXT_buffer_age */ ++ ++#ifndef EGL_EXT_client_extensions ++#define EGL_EXT_client_extensions 1 ++#endif /* EGL_EXT_client_extensions */ ++ ++#ifndef EGL_EXT_client_sync ++#define EGL_EXT_client_sync 1 ++#define EGL_SYNC_CLIENT_EXT 0x3364 ++#define EGL_SYNC_CLIENT_SIGNAL_EXT 0x3365 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCLIENTSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglClientSignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list); ++#endif ++#endif /* EGL_EXT_client_sync */ ++ ++#ifndef EGL_EXT_compositor ++#define EGL_EXT_compositor 1 ++#define EGL_PRIMARY_COMPOSITOR_CONTEXT_EXT 0x3460 ++#define EGL_EXTERNAL_REF_ID_EXT 0x3461 ++#define EGL_COMPOSITOR_DROP_NEWEST_FRAME_EXT 0x3462 ++#define EGL_COMPOSITOR_KEEP_NEWEST_FRAME_EXT 0x3463 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTLISTEXTPROC) (const EGLint *external_ref_ids, EGLint num_entries); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETCONTEXTATTRIBUTESEXTPROC) (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWLISTEXTPROC) (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETWINDOWATTRIBUTESEXTPROC) (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORBINDTEXWINDOWEXTPROC) (EGLint external_win_id); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSETSIZEEXTPROC) (EGLint external_win_id, EGLint width, EGLint height); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLCOMPOSITORSWAPPOLICYEXTPROC) (EGLint external_win_id, EGLint policy); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextListEXT (const EGLint *external_ref_ids, EGLint num_entries); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetContextAttributesEXT (EGLint external_ref_id, const EGLint *context_attributes, EGLint num_entries); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowListEXT (EGLint external_ref_id, const EGLint *external_win_ids, EGLint num_entries); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetWindowAttributesEXT (EGLint external_win_id, const EGLint *window_attributes, EGLint num_entries); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorBindTexWindowEXT (EGLint external_win_id); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSetSizeEXT (EGLint external_win_id, EGLint width, EGLint height); ++EGLAPI EGLBoolean EGLAPIENTRY eglCompositorSwapPolicyEXT (EGLint external_win_id, EGLint policy); ++#endif ++#endif /* EGL_EXT_compositor */ ++ ++#ifndef EGL_EXT_config_select_group ++#define EGL_EXT_config_select_group 1 ++#define EGL_CONFIG_SELECT_GROUP_EXT 0x34C0 ++#endif /* EGL_EXT_config_select_group */ ++ ++#ifndef EGL_EXT_create_context_robustness ++#define EGL_EXT_create_context_robustness 1 ++#define EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT 0x30BF ++#define EGL_CONTEXT_OPENGL_RESET_NOTIFICATION_STRATEGY_EXT 0x3138 ++#define EGL_NO_RESET_NOTIFICATION_EXT 0x31BE ++#define EGL_LOSE_CONTEXT_ON_RESET_EXT 0x31BF ++#endif /* EGL_EXT_create_context_robustness */ ++ ++#ifndef EGL_EXT_device_base ++#define EGL_EXT_device_base 1 ++typedef void *EGLDeviceEXT; ++#define EGL_NO_DEVICE_EXT EGL_CAST(EGLDeviceEXT,0) ++#define EGL_BAD_DEVICE_EXT 0x322B ++#define EGL_DEVICE_EXT 0x322C ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEATTRIBEXTPROC) (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); ++typedef const char *(EGLAPIENTRYP PFNEGLQUERYDEVICESTRINGEXTPROC) (EGLDeviceEXT device, EGLint name); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC) (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBEXTPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceAttribEXT (EGLDeviceEXT device, EGLint attribute, EGLAttrib *value); ++EGLAPI const char *EGLAPIENTRY eglQueryDeviceStringEXT (EGLDeviceEXT device, EGLint name); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDevicesEXT (EGLint max_devices, EGLDeviceEXT *devices, EGLint *num_devices); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribEXT (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); ++#endif ++#endif /* EGL_EXT_device_base */ ++ ++#ifndef EGL_EXT_device_drm ++#define EGL_EXT_device_drm 1 ++#define EGL_DRM_DEVICE_FILE_EXT 0x3233 ++#define EGL_DRM_MASTER_FD_EXT 0x333C ++#endif /* EGL_EXT_device_drm */ ++ ++#ifndef EGL_EXT_device_drm_render_node ++#define EGL_EXT_device_drm_render_node 1 ++#define EGL_DRM_RENDER_NODE_FILE_EXT 0x3377 ++#endif /* EGL_EXT_device_drm_render_node */ ++ ++#ifndef EGL_EXT_device_enumeration ++#define EGL_EXT_device_enumeration 1 ++#endif /* EGL_EXT_device_enumeration */ ++ ++#ifndef EGL_EXT_device_openwf ++#define EGL_EXT_device_openwf 1 ++#define EGL_OPENWF_DEVICE_ID_EXT 0x3237 ++#define EGL_OPENWF_DEVICE_EXT 0x333D ++#endif /* EGL_EXT_device_openwf */ ++ ++#ifndef EGL_EXT_device_persistent_id ++#define EGL_EXT_device_persistent_id 1 ++#define EGL_DEVICE_UUID_EXT 0x335C ++#define EGL_DRIVER_UUID_EXT 0x335D ++#define EGL_DRIVER_NAME_EXT 0x335E ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDEVICEBINARYEXTPROC) (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDeviceBinaryEXT (EGLDeviceEXT device, EGLint name, EGLint max_size, void *value, EGLint *size); ++#endif ++#endif /* EGL_EXT_device_persistent_id */ ++ ++#ifndef EGL_EXT_device_query ++#define EGL_EXT_device_query 1 ++#endif /* EGL_EXT_device_query */ ++ ++#ifndef EGL_EXT_device_query_name ++#define EGL_EXT_device_query_name 1 ++#define EGL_RENDERER_EXT 0x335F ++#endif /* EGL_EXT_device_query_name */ ++ ++#ifndef EGL_EXT_gl_colorspace_bt2020_linear ++#define EGL_EXT_gl_colorspace_bt2020_linear 1 ++#define EGL_GL_COLORSPACE_BT2020_LINEAR_EXT 0x333F ++#endif /* EGL_EXT_gl_colorspace_bt2020_linear */ ++ ++#ifndef EGL_EXT_gl_colorspace_bt2020_pq ++#define EGL_EXT_gl_colorspace_bt2020_pq 1 ++#define EGL_GL_COLORSPACE_BT2020_PQ_EXT 0x3340 ++#endif /* EGL_EXT_gl_colorspace_bt2020_pq */ ++ ++#ifndef EGL_EXT_gl_colorspace_display_p3 ++#define EGL_EXT_gl_colorspace_display_p3 1 ++#define EGL_GL_COLORSPACE_DISPLAY_P3_EXT 0x3363 ++#endif /* EGL_EXT_gl_colorspace_display_p3 */ ++ ++#ifndef EGL_EXT_gl_colorspace_display_p3_linear ++#define EGL_EXT_gl_colorspace_display_p3_linear 1 ++#define EGL_GL_COLORSPACE_DISPLAY_P3_LINEAR_EXT 0x3362 ++#endif /* EGL_EXT_gl_colorspace_display_p3_linear */ ++ ++#ifndef EGL_EXT_gl_colorspace_display_p3_passthrough ++#define EGL_EXT_gl_colorspace_display_p3_passthrough 1 ++#define EGL_GL_COLORSPACE_DISPLAY_P3_PASSTHROUGH_EXT 0x3490 ++#endif /* EGL_EXT_gl_colorspace_display_p3_passthrough */ ++ ++#ifndef EGL_EXT_gl_colorspace_scrgb ++#define EGL_EXT_gl_colorspace_scrgb 1 ++#define EGL_GL_COLORSPACE_SCRGB_EXT 0x3351 ++#endif /* EGL_EXT_gl_colorspace_scrgb */ ++ ++#ifndef EGL_EXT_gl_colorspace_scrgb_linear ++#define EGL_EXT_gl_colorspace_scrgb_linear 1 ++#define EGL_GL_COLORSPACE_SCRGB_LINEAR_EXT 0x3350 ++#endif /* EGL_EXT_gl_colorspace_scrgb_linear */ ++ ++#ifndef EGL_EXT_image_dma_buf_import ++#define EGL_EXT_image_dma_buf_import 1 ++#define EGL_LINUX_DMA_BUF_EXT 0x3270 ++#define EGL_LINUX_DRM_FOURCC_EXT 0x3271 ++#define EGL_DMA_BUF_PLANE0_FD_EXT 0x3272 ++#define EGL_DMA_BUF_PLANE0_OFFSET_EXT 0x3273 ++#define EGL_DMA_BUF_PLANE0_PITCH_EXT 0x3274 ++#define EGL_DMA_BUF_PLANE1_FD_EXT 0x3275 ++#define EGL_DMA_BUF_PLANE1_OFFSET_EXT 0x3276 ++#define EGL_DMA_BUF_PLANE1_PITCH_EXT 0x3277 ++#define EGL_DMA_BUF_PLANE2_FD_EXT 0x3278 ++#define EGL_DMA_BUF_PLANE2_OFFSET_EXT 0x3279 ++#define EGL_DMA_BUF_PLANE2_PITCH_EXT 0x327A ++#define EGL_YUV_COLOR_SPACE_HINT_EXT 0x327B ++#define EGL_SAMPLE_RANGE_HINT_EXT 0x327C ++#define EGL_YUV_CHROMA_HORIZONTAL_SITING_HINT_EXT 0x327D ++#define EGL_YUV_CHROMA_VERTICAL_SITING_HINT_EXT 0x327E ++#define EGL_ITU_REC601_EXT 0x327F ++#define EGL_ITU_REC709_EXT 0x3280 ++#define EGL_ITU_REC2020_EXT 0x3281 ++#define EGL_YUV_FULL_RANGE_EXT 0x3282 ++#define EGL_YUV_NARROW_RANGE_EXT 0x3283 ++#define EGL_YUV_CHROMA_SITING_0_EXT 0x3284 ++#define EGL_YUV_CHROMA_SITING_0_5_EXT 0x3285 ++#endif /* EGL_EXT_image_dma_buf_import */ ++ ++#ifndef EGL_EXT_image_dma_buf_import_modifiers ++#define EGL_EXT_image_dma_buf_import_modifiers 1 ++#define EGL_DMA_BUF_PLANE3_FD_EXT 0x3440 ++#define EGL_DMA_BUF_PLANE3_OFFSET_EXT 0x3441 ++#define EGL_DMA_BUF_PLANE3_PITCH_EXT 0x3442 ++#define EGL_DMA_BUF_PLANE0_MODIFIER_LO_EXT 0x3443 ++#define EGL_DMA_BUF_PLANE0_MODIFIER_HI_EXT 0x3444 ++#define EGL_DMA_BUF_PLANE1_MODIFIER_LO_EXT 0x3445 ++#define EGL_DMA_BUF_PLANE1_MODIFIER_HI_EXT 0x3446 ++#define EGL_DMA_BUF_PLANE2_MODIFIER_LO_EXT 0x3447 ++#define EGL_DMA_BUF_PLANE2_MODIFIER_HI_EXT 0x3448 ++#define EGL_DMA_BUF_PLANE3_MODIFIER_LO_EXT 0x3449 ++#define EGL_DMA_BUF_PLANE3_MODIFIER_HI_EXT 0x344A ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFFORMATSEXTPROC) (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDMABUFMODIFIERSEXTPROC) (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufFormatsEXT (EGLDisplay dpy, EGLint max_formats, EGLint *formats, EGLint *num_formats); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDmaBufModifiersEXT (EGLDisplay dpy, EGLint format, EGLint max_modifiers, EGLuint64KHR *modifiers, EGLBoolean *external_only, EGLint *num_modifiers); ++#endif ++#endif /* EGL_EXT_image_dma_buf_import_modifiers */ ++ ++#ifndef EGL_EXT_image_gl_colorspace ++#define EGL_EXT_image_gl_colorspace 1 ++#define EGL_GL_COLORSPACE_DEFAULT_EXT 0x314D ++#endif /* EGL_EXT_image_gl_colorspace */ ++ ++#ifndef EGL_EXT_image_implicit_sync_control ++#define EGL_EXT_image_implicit_sync_control 1 ++#define EGL_IMPORT_SYNC_TYPE_EXT 0x3470 ++#define EGL_IMPORT_IMPLICIT_SYNC_EXT 0x3471 ++#define EGL_IMPORT_EXPLICIT_SYNC_EXT 0x3472 ++#endif /* EGL_EXT_image_implicit_sync_control */ ++ ++#ifndef EGL_EXT_multiview_window ++#define EGL_EXT_multiview_window 1 ++#define EGL_MULTIVIEW_VIEW_COUNT_EXT 0x3134 ++#endif /* EGL_EXT_multiview_window */ ++ ++#ifndef EGL_EXT_output_base ++#define EGL_EXT_output_base 1 ++typedef void *EGLOutputLayerEXT; ++typedef void *EGLOutputPortEXT; ++#define EGL_NO_OUTPUT_LAYER_EXT EGL_CAST(EGLOutputLayerEXT,0) ++#define EGL_NO_OUTPUT_PORT_EXT EGL_CAST(EGLOutputPortEXT,0) ++#define EGL_BAD_OUTPUT_LAYER_EXT 0x322D ++#define EGL_BAD_OUTPUT_PORT_EXT 0x322E ++#define EGL_SWAP_INTERVAL_EXT 0x322F ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTLAYERSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETOUTPUTPORTSEXTPROC) (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); ++typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTLAYERSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTATTRIBEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); ++typedef const char *(EGLAPIENTRYP PFNEGLQUERYOUTPUTPORTSTRINGEXTPROC) (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputLayersEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputLayerEXT *layers, EGLint max_layers, EGLint *num_layers); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetOutputPortsEXT (EGLDisplay dpy, const EGLAttrib *attrib_list, EGLOutputPortEXT *ports, EGLint max_ports, EGLint *num_ports); ++EGLAPI EGLBoolean EGLAPIENTRY eglOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib value); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputLayerAttribEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint attribute, EGLAttrib *value); ++EGLAPI const char *EGLAPIENTRY eglQueryOutputLayerStringEXT (EGLDisplay dpy, EGLOutputLayerEXT layer, EGLint name); ++EGLAPI EGLBoolean EGLAPIENTRY eglOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib value); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryOutputPortAttribEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint attribute, EGLAttrib *value); ++EGLAPI const char *EGLAPIENTRY eglQueryOutputPortStringEXT (EGLDisplay dpy, EGLOutputPortEXT port, EGLint name); ++#endif ++#endif /* EGL_EXT_output_base */ ++ ++#ifndef EGL_EXT_output_drm ++#define EGL_EXT_output_drm 1 ++#define EGL_DRM_CRTC_EXT 0x3234 ++#define EGL_DRM_PLANE_EXT 0x3235 ++#define EGL_DRM_CONNECTOR_EXT 0x3236 ++#endif /* EGL_EXT_output_drm */ ++ ++#ifndef EGL_EXT_output_openwf ++#define EGL_EXT_output_openwf 1 ++#define EGL_OPENWF_PIPELINE_ID_EXT 0x3238 ++#define EGL_OPENWF_PORT_ID_EXT 0x3239 ++#endif /* EGL_EXT_output_openwf */ ++ ++#ifndef EGL_EXT_pixel_format_float ++#define EGL_EXT_pixel_format_float 1 ++#define EGL_COLOR_COMPONENT_TYPE_EXT 0x3339 ++#define EGL_COLOR_COMPONENT_TYPE_FIXED_EXT 0x333A ++#define EGL_COLOR_COMPONENT_TYPE_FLOAT_EXT 0x333B ++#endif /* EGL_EXT_pixel_format_float */ ++ ++#ifndef EGL_EXT_platform_base ++#define EGL_EXT_platform_base 1 ++typedef EGLDisplay (EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC) (EGLenum platform, void *native_display, const EGLint *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMWINDOWSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPLATFORMPIXMAPSURFACEEXTPROC) (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLDisplay EGLAPIENTRY eglGetPlatformDisplayEXT (EGLenum platform, void *native_display, const EGLint *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformWindowSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_window, const EGLint *attrib_list); ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePlatformPixmapSurfaceEXT (EGLDisplay dpy, EGLConfig config, void *native_pixmap, const EGLint *attrib_list); ++#endif ++#endif /* EGL_EXT_platform_base */ ++ ++#ifndef EGL_EXT_platform_device ++#define EGL_EXT_platform_device 1 ++#define EGL_PLATFORM_DEVICE_EXT 0x313F ++#endif /* EGL_EXT_platform_device */ ++ ++#ifndef EGL_EXT_platform_wayland ++#define EGL_EXT_platform_wayland 1 ++#define EGL_PLATFORM_WAYLAND_EXT 0x31D8 ++#endif /* EGL_EXT_platform_wayland */ ++ ++#ifndef EGL_EXT_platform_x11 ++#define EGL_EXT_platform_x11 1 ++#define EGL_PLATFORM_X11_EXT 0x31D5 ++#define EGL_PLATFORM_X11_SCREEN_EXT 0x31D6 ++#endif /* EGL_EXT_platform_x11 */ ++ ++#ifndef EGL_EXT_platform_xcb ++#define EGL_EXT_platform_xcb 1 ++#define EGL_PLATFORM_XCB_EXT 0x31DC ++#define EGL_PLATFORM_XCB_SCREEN_EXT 0x31DE ++#endif /* EGL_EXT_platform_xcb */ ++ ++#ifndef EGL_EXT_present_opaque ++#define EGL_EXT_present_opaque 1 ++#define EGL_PRESENT_OPAQUE_EXT 0x31DF ++#endif /* EGL_EXT_present_opaque */ ++ ++#ifndef EGL_EXT_protected_content ++#define EGL_EXT_protected_content 1 ++#define EGL_PROTECTED_CONTENT_EXT 0x32C0 ++#endif /* EGL_EXT_protected_content */ ++ ++#ifndef EGL_EXT_protected_surface ++#define EGL_EXT_protected_surface 1 ++#endif /* EGL_EXT_protected_surface */ ++ ++#ifndef EGL_EXT_stream_consumer_egloutput ++#define EGL_EXT_stream_consumer_egloutput 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMEROUTPUTEXTPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerOutputEXT (EGLDisplay dpy, EGLStreamKHR stream, EGLOutputLayerEXT layer); ++#endif ++#endif /* EGL_EXT_stream_consumer_egloutput */ ++ ++#ifndef EGL_EXT_surface_CTA861_3_metadata ++#define EGL_EXT_surface_CTA861_3_metadata 1 ++#define EGL_CTA861_3_MAX_CONTENT_LIGHT_LEVEL_EXT 0x3360 ++#define EGL_CTA861_3_MAX_FRAME_AVERAGE_LEVEL_EXT 0x3361 ++#endif /* EGL_EXT_surface_CTA861_3_metadata */ ++ ++#ifndef EGL_EXT_surface_SMPTE2086_metadata ++#define EGL_EXT_surface_SMPTE2086_metadata 1 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_RX_EXT 0x3341 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_RY_EXT 0x3342 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_GX_EXT 0x3343 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_GY_EXT 0x3344 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_BX_EXT 0x3345 ++#define EGL_SMPTE2086_DISPLAY_PRIMARY_BY_EXT 0x3346 ++#define EGL_SMPTE2086_WHITE_POINT_X_EXT 0x3347 ++#define EGL_SMPTE2086_WHITE_POINT_Y_EXT 0x3348 ++#define EGL_SMPTE2086_MAX_LUMINANCE_EXT 0x3349 ++#define EGL_SMPTE2086_MIN_LUMINANCE_EXT 0x334A ++#define EGL_METADATA_SCALING_EXT 50000 ++#endif /* EGL_EXT_surface_SMPTE2086_metadata */ ++ ++#ifndef EGL_EXT_surface_compression ++#define EGL_EXT_surface_compression 1 ++#define EGL_SURFACE_COMPRESSION_EXT 0x34B0 ++#define EGL_SURFACE_COMPRESSION_PLANE1_EXT 0x328E ++#define EGL_SURFACE_COMPRESSION_PLANE2_EXT 0x328F ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_NONE_EXT 0x34B1 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_DEFAULT_EXT 0x34B2 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_1BPC_EXT 0x34B4 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_2BPC_EXT 0x34B5 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_3BPC_EXT 0x34B6 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_4BPC_EXT 0x34B7 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_5BPC_EXT 0x34B8 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_6BPC_EXT 0x34B9 ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_7BPC_EXT 0x34BA ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_8BPC_EXT 0x34BB ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_9BPC_EXT 0x34BC ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_10BPC_EXT 0x34BD ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_11BPC_EXT 0x34BE ++#define EGL_SURFACE_COMPRESSION_FIXED_RATE_12BPC_EXT 0x34BF ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSUPPORTEDCOMPRESSIONRATESEXTPROC) (EGLDisplay dpy, EGLConfig *configs, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQuerySupportedCompressionRatesEXT (EGLDisplay dpy, EGLConfig *configs, const EGLAttrib *attrib_list, EGLint *rates, EGLint rate_size, EGLint *num_rates); ++#endif ++#endif /* EGL_EXT_surface_compression */ ++ ++#ifndef EGL_EXT_swap_buffers_with_damage ++#define EGL_EXT_swap_buffers_with_damage 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC) (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersWithDamageEXT (EGLDisplay dpy, EGLSurface surface, const EGLint *rects, EGLint n_rects); ++#endif ++#endif /* EGL_EXT_swap_buffers_with_damage */ ++ ++#ifndef EGL_EXT_sync_reuse ++#define EGL_EXT_sync_reuse 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNSIGNALSYNCEXTPROC) (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglUnsignalSyncEXT (EGLDisplay dpy, EGLSync sync, const EGLAttrib *attrib_list); ++#endif ++#endif /* EGL_EXT_sync_reuse */ ++ ++#ifndef EGL_EXT_yuv_surface ++#define EGL_EXT_yuv_surface 1 ++#define EGL_YUV_ORDER_EXT 0x3301 ++#define EGL_YUV_NUMBER_OF_PLANES_EXT 0x3311 ++#define EGL_YUV_SUBSAMPLE_EXT 0x3312 ++#define EGL_YUV_DEPTH_RANGE_EXT 0x3317 ++#define EGL_YUV_CSC_STANDARD_EXT 0x330A ++#define EGL_YUV_PLANE_BPP_EXT 0x331A ++#define EGL_YUV_BUFFER_EXT 0x3300 ++#define EGL_YUV_ORDER_YUV_EXT 0x3302 ++#define EGL_YUV_ORDER_YVU_EXT 0x3303 ++#define EGL_YUV_ORDER_YUYV_EXT 0x3304 ++#define EGL_YUV_ORDER_UYVY_EXT 0x3305 ++#define EGL_YUV_ORDER_YVYU_EXT 0x3306 ++#define EGL_YUV_ORDER_VYUY_EXT 0x3307 ++#define EGL_YUV_ORDER_AYUV_EXT 0x3308 ++#define EGL_YUV_SUBSAMPLE_4_2_0_EXT 0x3313 ++#define EGL_YUV_SUBSAMPLE_4_2_2_EXT 0x3314 ++#define EGL_YUV_SUBSAMPLE_4_4_4_EXT 0x3315 ++#define EGL_YUV_DEPTH_RANGE_LIMITED_EXT 0x3318 ++#define EGL_YUV_DEPTH_RANGE_FULL_EXT 0x3319 ++#define EGL_YUV_CSC_STANDARD_601_EXT 0x330B ++#define EGL_YUV_CSC_STANDARD_709_EXT 0x330C ++#define EGL_YUV_CSC_STANDARD_2020_EXT 0x330D ++#define EGL_YUV_PLANE_BPP_0_EXT 0x331B ++#define EGL_YUV_PLANE_BPP_8_EXT 0x331C ++#define EGL_YUV_PLANE_BPP_10_EXT 0x331D ++#endif /* EGL_EXT_yuv_surface */ ++ ++#ifndef EGL_HI_clientpixmap ++#define EGL_HI_clientpixmap 1 ++struct EGLClientPixmapHI { ++ void *pData; ++ EGLint iWidth; ++ EGLint iHeight; ++ EGLint iStride; ++}; ++#define EGL_CLIENT_PIXMAP_POINTER_HI 0x8F74 ++typedef EGLSurface (EGLAPIENTRYP PFNEGLCREATEPIXMAPSURFACEHIPROC) (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSurface EGLAPIENTRY eglCreatePixmapSurfaceHI (EGLDisplay dpy, EGLConfig config, struct EGLClientPixmapHI *pixmap); ++#endif ++#endif /* EGL_HI_clientpixmap */ ++ ++#ifndef EGL_HI_colorformats ++#define EGL_HI_colorformats 1 ++#define EGL_COLOR_FORMAT_HI 0x8F70 ++#define EGL_COLOR_RGB_HI 0x8F71 ++#define EGL_COLOR_RGBA_HI 0x8F72 ++#define EGL_COLOR_ARGB_HI 0x8F73 ++#endif /* EGL_HI_colorformats */ ++ ++#ifndef EGL_IMG_context_priority ++#define EGL_IMG_context_priority 1 ++#define EGL_CONTEXT_PRIORITY_LEVEL_IMG 0x3100 ++#define EGL_CONTEXT_PRIORITY_HIGH_IMG 0x3101 ++#define EGL_CONTEXT_PRIORITY_MEDIUM_IMG 0x3102 ++#define EGL_CONTEXT_PRIORITY_LOW_IMG 0x3103 ++#endif /* EGL_IMG_context_priority */ ++ ++#ifndef EGL_IMG_image_plane_attribs ++#define EGL_IMG_image_plane_attribs 1 ++#define EGL_NATIVE_BUFFER_MULTIPLANE_SEPARATE_IMG 0x3105 ++#define EGL_NATIVE_BUFFER_PLANE_OFFSET_IMG 0x3106 ++#endif /* EGL_IMG_image_plane_attribs */ ++ ++#ifndef EGL_MESA_drm_image ++#define EGL_MESA_drm_image 1 ++#define EGL_DRM_BUFFER_FORMAT_MESA 0x31D0 ++#define EGL_DRM_BUFFER_USE_MESA 0x31D1 ++#define EGL_DRM_BUFFER_FORMAT_ARGB32_MESA 0x31D2 ++#define EGL_DRM_BUFFER_MESA 0x31D3 ++#define EGL_DRM_BUFFER_STRIDE_MESA 0x31D4 ++#define EGL_DRM_BUFFER_USE_SCANOUT_MESA 0x00000001 ++#define EGL_DRM_BUFFER_USE_SHARE_MESA 0x00000002 ++#define EGL_DRM_BUFFER_USE_CURSOR_MESA 0x00000004 ++typedef EGLImageKHR (EGLAPIENTRYP PFNEGLCREATEDRMIMAGEMESAPROC) (EGLDisplay dpy, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDRMIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLImageKHR EGLAPIENTRY eglCreateDRMImageMESA (EGLDisplay dpy, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglExportDRMImageMESA (EGLDisplay dpy, EGLImageKHR image, EGLint *name, EGLint *handle, EGLint *stride); ++#endif ++#endif /* EGL_MESA_drm_image */ ++ ++#ifndef EGL_MESA_image_dma_buf_export ++#define EGL_MESA_image_dma_buf_export 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEQUERYMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLEXPORTDMABUFIMAGEMESAPROC) (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageQueryMESA (EGLDisplay dpy, EGLImageKHR image, int *fourcc, int *num_planes, EGLuint64KHR *modifiers); ++EGLAPI EGLBoolean EGLAPIENTRY eglExportDMABUFImageMESA (EGLDisplay dpy, EGLImageKHR image, int *fds, EGLint *strides, EGLint *offsets); ++#endif ++#endif /* EGL_MESA_image_dma_buf_export */ ++ ++#ifndef EGL_MESA_platform_gbm ++#define EGL_MESA_platform_gbm 1 ++#define EGL_PLATFORM_GBM_MESA 0x31D7 ++#endif /* EGL_MESA_platform_gbm */ ++ ++#ifndef EGL_MESA_platform_surfaceless ++#define EGL_MESA_platform_surfaceless 1 ++#define EGL_PLATFORM_SURFACELESS_MESA 0x31DD ++#endif /* EGL_MESA_platform_surfaceless */ ++ ++#ifndef EGL_MESA_query_driver ++#define EGL_MESA_query_driver 1 ++typedef char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERCONFIGPROC) (EGLDisplay dpy); ++typedef const char *(EGLAPIENTRYP PFNEGLGETDISPLAYDRIVERNAMEPROC) (EGLDisplay dpy); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI char *EGLAPIENTRY eglGetDisplayDriverConfig (EGLDisplay dpy); ++EGLAPI const char *EGLAPIENTRY eglGetDisplayDriverName (EGLDisplay dpy); ++#endif ++#endif /* EGL_MESA_query_driver */ ++ ++#ifndef EGL_NOK_swap_region ++#define EGL_NOK_swap_region 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGIONNOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegionNOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); ++#endif ++#endif /* EGL_NOK_swap_region */ ++ ++#ifndef EGL_NOK_swap_region2 ++#define EGL_NOK_swap_region2 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSWAPBUFFERSREGION2NOKPROC) (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffersRegion2NOK (EGLDisplay dpy, EGLSurface surface, EGLint numRects, const EGLint *rects); ++#endif ++#endif /* EGL_NOK_swap_region2 */ ++ ++#ifndef EGL_NOK_texture_from_pixmap ++#define EGL_NOK_texture_from_pixmap 1 ++#define EGL_Y_INVERTED_NOK 0x307F ++#endif /* EGL_NOK_texture_from_pixmap */ ++ ++#ifndef EGL_NV_3dvision_surface ++#define EGL_NV_3dvision_surface 1 ++#define EGL_AUTO_STEREO_NV 0x3136 ++#endif /* EGL_NV_3dvision_surface */ ++ ++#ifndef EGL_NV_context_priority_realtime ++#define EGL_NV_context_priority_realtime 1 ++#define EGL_CONTEXT_PRIORITY_REALTIME_NV 0x3357 ++#endif /* EGL_NV_context_priority_realtime */ ++ ++#ifndef EGL_NV_coverage_sample ++#define EGL_NV_coverage_sample 1 ++#define EGL_COVERAGE_BUFFERS_NV 0x30E0 ++#define EGL_COVERAGE_SAMPLES_NV 0x30E1 ++#endif /* EGL_NV_coverage_sample */ ++ ++#ifndef EGL_NV_coverage_sample_resolve ++#define EGL_NV_coverage_sample_resolve 1 ++#define EGL_COVERAGE_SAMPLE_RESOLVE_NV 0x3131 ++#define EGL_COVERAGE_SAMPLE_RESOLVE_DEFAULT_NV 0x3132 ++#define EGL_COVERAGE_SAMPLE_RESOLVE_NONE_NV 0x3133 ++#endif /* EGL_NV_coverage_sample_resolve */ ++ ++#ifndef EGL_NV_cuda_event ++#define EGL_NV_cuda_event 1 ++#define EGL_CUDA_EVENT_HANDLE_NV 0x323B ++#define EGL_SYNC_CUDA_EVENT_NV 0x323C ++#define EGL_SYNC_CUDA_EVENT_COMPLETE_NV 0x323D ++#endif /* EGL_NV_cuda_event */ ++ ++#ifndef EGL_NV_depth_nonlinear ++#define EGL_NV_depth_nonlinear 1 ++#define EGL_DEPTH_ENCODING_NV 0x30E2 ++#define EGL_DEPTH_ENCODING_NONE_NV 0 ++#define EGL_DEPTH_ENCODING_NONLINEAR_NV 0x30E3 ++#endif /* EGL_NV_depth_nonlinear */ ++ ++#ifndef EGL_NV_device_cuda ++#define EGL_NV_device_cuda 1 ++#define EGL_CUDA_DEVICE_NV 0x323A ++#endif /* EGL_NV_device_cuda */ ++ ++#ifndef EGL_NV_native_query ++#define EGL_NV_native_query 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEDISPLAYNVPROC) (EGLDisplay dpy, EGLNativeDisplayType *display_id); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEWINDOWNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYNATIVEPIXMAPNVPROC) (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeDisplayNV (EGLDisplay dpy, EGLNativeDisplayType *display_id); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativeWindowNV (EGLDisplay dpy, EGLSurface surf, EGLNativeWindowType *window); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryNativePixmapNV (EGLDisplay dpy, EGLSurface surf, EGLNativePixmapType *pixmap); ++#endif ++#endif /* EGL_NV_native_query */ ++ ++#ifndef EGL_NV_post_convert_rounding ++#define EGL_NV_post_convert_rounding 1 ++#endif /* EGL_NV_post_convert_rounding */ ++ ++#ifndef EGL_NV_post_sub_buffer ++#define EGL_NV_post_sub_buffer 1 ++#define EGL_POST_SUB_BUFFER_SUPPORTED_NV 0x30BE ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLPOSTSUBBUFFERNVPROC) (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglPostSubBufferNV (EGLDisplay dpy, EGLSurface surface, EGLint x, EGLint y, EGLint width, EGLint height); ++#endif ++#endif /* EGL_NV_post_sub_buffer */ ++ ++#ifndef EGL_NV_quadruple_buffer ++#define EGL_NV_quadruple_buffer 1 ++#define EGL_QUADRUPLE_BUFFER_NV 0x3231 ++#endif /* EGL_NV_quadruple_buffer */ ++ ++#ifndef EGL_NV_robustness_video_memory_purge ++#define EGL_NV_robustness_video_memory_purge 1 ++#define EGL_GENERATE_RESET_ON_VIDEO_MEMORY_PURGE_NV 0x334C ++#endif /* EGL_NV_robustness_video_memory_purge */ ++ ++#ifndef EGL_NV_stream_consumer_eglimage ++#define EGL_NV_stream_consumer_eglimage 1 ++#define EGL_STREAM_CONSUMER_IMAGE_NV 0x3373 ++#define EGL_STREAM_IMAGE_ADD_NV 0x3374 ++#define EGL_STREAM_IMAGE_REMOVE_NV 0x3375 ++#define EGL_STREAM_IMAGE_AVAILABLE_NV 0x3376 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMIMAGECONSUMERCONNECTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list); ++typedef EGLint (EGLAPIENTRYP PFNEGLQUERYSTREAMCONSUMEREVENTNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMACQUIREIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMRELEASEIMAGENVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamImageConsumerConnectNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint num_modifiers, EGLuint64KHR *modifiers, EGLAttrib *attrib_list); ++EGLAPI EGLint EGLAPIENTRY eglQueryStreamConsumerEventNV (EGLDisplay dpy, EGLStreamKHR stream, EGLTime timeout, EGLenum *event, EGLAttrib *aux); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamAcquireImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage *pImage, EGLSync sync); ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamReleaseImageNV (EGLDisplay dpy, EGLStreamKHR stream, EGLImage image, EGLSync sync); ++#endif ++#endif /* EGL_NV_stream_consumer_eglimage */ ++ ++#ifndef EGL_NV_stream_consumer_gltexture_yuv ++#define EGL_NV_stream_consumer_gltexture_yuv 1 ++#define EGL_YUV_PLANE0_TEXTURE_UNIT_NV 0x332C ++#define EGL_YUV_PLANE1_TEXTURE_UNIT_NV 0x332D ++#define EGL_YUV_PLANE2_TEXTURE_UNIT_NV 0x332E ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMCONSUMERGLTEXTUREEXTERNALATTRIBSNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamConsumerGLTextureExternalAttribsNV (EGLDisplay dpy, EGLStreamKHR stream, const EGLAttrib *attrib_list); ++#endif ++#endif /* EGL_NV_stream_consumer_gltexture_yuv */ ++ ++#ifndef EGL_NV_stream_cross_display ++#define EGL_NV_stream_cross_display 1 ++#define EGL_STREAM_CROSS_DISPLAY_NV 0x334E ++#endif /* EGL_NV_stream_cross_display */ ++ ++#ifndef EGL_NV_stream_cross_object ++#define EGL_NV_stream_cross_object 1 ++#define EGL_STREAM_CROSS_OBJECT_NV 0x334D ++#endif /* EGL_NV_stream_cross_object */ ++ ++#ifndef EGL_NV_stream_cross_partition ++#define EGL_NV_stream_cross_partition 1 ++#define EGL_STREAM_CROSS_PARTITION_NV 0x323F ++#endif /* EGL_NV_stream_cross_partition */ ++ ++#ifndef EGL_NV_stream_cross_process ++#define EGL_NV_stream_cross_process 1 ++#define EGL_STREAM_CROSS_PROCESS_NV 0x3245 ++#endif /* EGL_NV_stream_cross_process */ ++ ++#ifndef EGL_NV_stream_cross_system ++#define EGL_NV_stream_cross_system 1 ++#define EGL_STREAM_CROSS_SYSTEM_NV 0x334F ++#endif /* EGL_NV_stream_cross_system */ ++ ++#ifndef EGL_NV_stream_dma ++#define EGL_NV_stream_dma 1 ++#define EGL_STREAM_DMA_NV 0x3371 ++#define EGL_STREAM_DMA_SERVER_NV 0x3372 ++#endif /* EGL_NV_stream_dma */ ++ ++#ifndef EGL_NV_stream_fifo_next ++#define EGL_NV_stream_fifo_next 1 ++#define EGL_PENDING_FRAME_NV 0x3329 ++#define EGL_STREAM_TIME_PENDING_NV 0x332A ++#endif /* EGL_NV_stream_fifo_next */ ++ ++#ifndef EGL_NV_stream_fifo_synchronous ++#define EGL_NV_stream_fifo_synchronous 1 ++#define EGL_STREAM_FIFO_SYNCHRONOUS_NV 0x3336 ++#endif /* EGL_NV_stream_fifo_synchronous */ ++ ++#ifndef EGL_NV_stream_flush ++#define EGL_NV_stream_flush 1 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSTREAMFLUSHNVPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglStreamFlushNV (EGLDisplay dpy, EGLStreamKHR stream); ++#endif ++#endif /* EGL_NV_stream_flush */ ++ ++#ifndef EGL_NV_stream_frame_limits ++#define EGL_NV_stream_frame_limits 1 ++#define EGL_PRODUCER_MAX_FRAME_HINT_NV 0x3337 ++#define EGL_CONSUMER_MAX_FRAME_HINT_NV 0x3338 ++#endif /* EGL_NV_stream_frame_limits */ ++ ++#ifndef EGL_NV_stream_metadata ++#define EGL_NV_stream_metadata 1 ++#define EGL_MAX_STREAM_METADATA_BLOCKS_NV 0x3250 ++#define EGL_MAX_STREAM_METADATA_BLOCK_SIZE_NV 0x3251 ++#define EGL_MAX_STREAM_METADATA_TOTAL_SIZE_NV 0x3252 ++#define EGL_PRODUCER_METADATA_NV 0x3253 ++#define EGL_CONSUMER_METADATA_NV 0x3254 ++#define EGL_PENDING_METADATA_NV 0x3328 ++#define EGL_METADATA0_SIZE_NV 0x3255 ++#define EGL_METADATA1_SIZE_NV 0x3256 ++#define EGL_METADATA2_SIZE_NV 0x3257 ++#define EGL_METADATA3_SIZE_NV 0x3258 ++#define EGL_METADATA0_TYPE_NV 0x3259 ++#define EGL_METADATA1_TYPE_NV 0x325A ++#define EGL_METADATA2_TYPE_NV 0x325B ++#define EGL_METADATA3_TYPE_NV 0x325C ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYDISPLAYATTRIBNVPROC) (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSETSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYSTREAMMETADATANVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryDisplayAttribNV (EGLDisplay dpy, EGLint attribute, EGLAttrib *value); ++EGLAPI EGLBoolean EGLAPIENTRY eglSetStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLint n, EGLint offset, EGLint size, const void *data); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryStreamMetadataNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum name, EGLint n, EGLint offset, EGLint size, void *data); ++#endif ++#endif /* EGL_NV_stream_metadata */ ++ ++#ifndef EGL_NV_stream_origin ++#define EGL_NV_stream_origin 1 ++#define EGL_STREAM_FRAME_ORIGIN_X_NV 0x3366 ++#define EGL_STREAM_FRAME_ORIGIN_Y_NV 0x3367 ++#define EGL_STREAM_FRAME_MAJOR_AXIS_NV 0x3368 ++#define EGL_CONSUMER_AUTO_ORIENTATION_NV 0x3369 ++#define EGL_PRODUCER_AUTO_ORIENTATION_NV 0x336A ++#define EGL_LEFT_NV 0x336B ++#define EGL_RIGHT_NV 0x336C ++#define EGL_TOP_NV 0x336D ++#define EGL_BOTTOM_NV 0x336E ++#define EGL_X_AXIS_NV 0x336F ++#define EGL_Y_AXIS_NV 0x3370 ++#endif /* EGL_NV_stream_origin */ ++ ++#ifndef EGL_NV_stream_remote ++#define EGL_NV_stream_remote 1 ++#define EGL_STREAM_STATE_INITIALIZING_NV 0x3240 ++#define EGL_STREAM_TYPE_NV 0x3241 ++#define EGL_STREAM_PROTOCOL_NV 0x3242 ++#define EGL_STREAM_ENDPOINT_NV 0x3243 ++#define EGL_STREAM_LOCAL_NV 0x3244 ++#define EGL_STREAM_PRODUCER_NV 0x3247 ++#define EGL_STREAM_CONSUMER_NV 0x3248 ++#define EGL_STREAM_PROTOCOL_FD_NV 0x3246 ++#endif /* EGL_NV_stream_remote */ ++ ++#ifndef EGL_NV_stream_reset ++#define EGL_NV_stream_reset 1 ++#define EGL_SUPPORT_RESET_NV 0x3334 ++#define EGL_SUPPORT_REUSE_NV 0x3335 ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLRESETSTREAMNVPROC) (EGLDisplay dpy, EGLStreamKHR stream); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglResetStreamNV (EGLDisplay dpy, EGLStreamKHR stream); ++#endif ++#endif /* EGL_NV_stream_reset */ ++ ++#ifndef EGL_NV_stream_socket ++#define EGL_NV_stream_socket 1 ++#define EGL_STREAM_PROTOCOL_SOCKET_NV 0x324B ++#define EGL_SOCKET_HANDLE_NV 0x324C ++#define EGL_SOCKET_TYPE_NV 0x324D ++#endif /* EGL_NV_stream_socket */ ++ ++#ifndef EGL_NV_stream_socket_inet ++#define EGL_NV_stream_socket_inet 1 ++#define EGL_SOCKET_TYPE_INET_NV 0x324F ++#endif /* EGL_NV_stream_socket_inet */ ++ ++#ifndef EGL_NV_stream_socket_unix ++#define EGL_NV_stream_socket_unix 1 ++#define EGL_SOCKET_TYPE_UNIX_NV 0x324E ++#endif /* EGL_NV_stream_socket_unix */ ++ ++#ifndef EGL_NV_stream_sync ++#define EGL_NV_stream_sync 1 ++#define EGL_SYNC_NEW_FRAME_NV 0x321F ++typedef EGLSyncKHR (EGLAPIENTRYP PFNEGLCREATESTREAMSYNCNVPROC) (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSyncKHR EGLAPIENTRY eglCreateStreamSyncNV (EGLDisplay dpy, EGLStreamKHR stream, EGLenum type, const EGLint *attrib_list); ++#endif ++#endif /* EGL_NV_stream_sync */ ++ ++#ifndef EGL_NV_sync ++#define EGL_NV_sync 1 ++typedef void *EGLSyncNV; ++typedef khronos_utime_nanoseconds_t EGLTimeNV; ++#ifdef KHRONOS_SUPPORT_INT64 ++#define EGL_SYNC_PRIOR_COMMANDS_COMPLETE_NV 0x30E6 ++#define EGL_SYNC_STATUS_NV 0x30E7 ++#define EGL_SIGNALED_NV 0x30E8 ++#define EGL_UNSIGNALED_NV 0x30E9 ++#define EGL_SYNC_FLUSH_COMMANDS_BIT_NV 0x0001 ++#define EGL_FOREVER_NV 0xFFFFFFFFFFFFFFFFull ++#define EGL_ALREADY_SIGNALED_NV 0x30EA ++#define EGL_TIMEOUT_EXPIRED_NV 0x30EB ++#define EGL_CONDITION_SATISFIED_NV 0x30EC ++#define EGL_SYNC_TYPE_NV 0x30ED ++#define EGL_SYNC_CONDITION_NV 0x30EE ++#define EGL_SYNC_FENCE_NV 0x30EF ++#define EGL_NO_SYNC_NV EGL_CAST(EGLSyncNV,0) ++typedef EGLSyncNV (EGLAPIENTRYP PFNEGLCREATEFENCESYNCNVPROC) (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLDESTROYSYNCNVPROC) (EGLSyncNV sync); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLFENCENVPROC) (EGLSyncNV sync); ++typedef EGLint (EGLAPIENTRYP PFNEGLCLIENTWAITSYNCNVPROC) (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLSIGNALSYNCNVPROC) (EGLSyncNV sync, EGLenum mode); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLGETSYNCATTRIBNVPROC) (EGLSyncNV sync, EGLint attribute, EGLint *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLSyncNV EGLAPIENTRY eglCreateFenceSyncNV (EGLDisplay dpy, EGLenum condition, const EGLint *attrib_list); ++EGLAPI EGLBoolean EGLAPIENTRY eglDestroySyncNV (EGLSyncNV sync); ++EGLAPI EGLBoolean EGLAPIENTRY eglFenceNV (EGLSyncNV sync); ++EGLAPI EGLint EGLAPIENTRY eglClientWaitSyncNV (EGLSyncNV sync, EGLint flags, EGLTimeNV timeout); ++EGLAPI EGLBoolean EGLAPIENTRY eglSignalSyncNV (EGLSyncNV sync, EGLenum mode); ++EGLAPI EGLBoolean EGLAPIENTRY eglGetSyncAttribNV (EGLSyncNV sync, EGLint attribute, EGLint *value); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_NV_sync */ ++ ++#ifndef EGL_NV_system_time ++#define EGL_NV_system_time 1 ++typedef khronos_utime_nanoseconds_t EGLuint64NV; ++#ifdef KHRONOS_SUPPORT_INT64 ++typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMEFREQUENCYNVPROC) (void); ++typedef EGLuint64NV (EGLAPIENTRYP PFNEGLGETSYSTEMTIMENVPROC) (void); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeFrequencyNV (void); ++EGLAPI EGLuint64NV EGLAPIENTRY eglGetSystemTimeNV (void); ++#endif ++#endif /* KHRONOS_SUPPORT_INT64 */ ++#endif /* EGL_NV_system_time */ ++ ++#ifndef EGL_NV_triple_buffer ++#define EGL_NV_triple_buffer 1 ++#define EGL_TRIPLE_BUFFER_NV 0x3230 ++#endif /* EGL_NV_triple_buffer */ ++ ++#ifndef EGL_OHOS_image_native_buffer ++#define EGL_OHOS_image_native_buffer 1 ++#define EGL_NATIVE_BUFFER_OHOS 0x34E1 ++#endif /* EGL_OHOS_image_native_buffer */ ++ ++#ifndef EGL_TIZEN_image_native_buffer ++#define EGL_TIZEN_image_native_buffer 1 ++#define EGL_NATIVE_BUFFER_TIZEN 0x32A0 ++#endif /* EGL_TIZEN_image_native_buffer */ ++ ++#ifndef EGL_TIZEN_image_native_surface ++#define EGL_TIZEN_image_native_surface 1 ++#define EGL_NATIVE_SURFACE_TIZEN 0x32A1 ++#endif /* EGL_TIZEN_image_native_surface */ ++ ++#ifndef EGL_WL_bind_wayland_display ++#define EGL_WL_bind_wayland_display 1 ++#define PFNEGLBINDWAYLANDDISPLAYWL PFNEGLBINDWAYLANDDISPLAYWLPROC ++#define PFNEGLUNBINDWAYLANDDISPLAYWL PFNEGLUNBINDWAYLANDDISPLAYWLPROC ++#define PFNEGLQUERYWAYLANDBUFFERWL PFNEGLQUERYWAYLANDBUFFERWLPROC ++struct wl_display; ++struct wl_resource; ++#define EGL_WAYLAND_BUFFER_WL 0x31D5 ++#define EGL_WAYLAND_PLANE_WL 0x31D6 ++#define EGL_TEXTURE_Y_U_V_WL 0x31D7 ++#define EGL_TEXTURE_Y_UV_WL 0x31D8 ++#define EGL_TEXTURE_Y_XUXV_WL 0x31D9 ++#define EGL_TEXTURE_EXTERNAL_WL 0x31DA ++#define EGL_WAYLAND_Y_INVERTED_WL 0x31DB ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLUNBINDWAYLANDDISPLAYWLPROC) (EGLDisplay dpy, struct wl_display *display); ++typedef EGLBoolean (EGLAPIENTRYP PFNEGLQUERYWAYLANDBUFFERWLPROC) (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI EGLBoolean EGLAPIENTRY eglBindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display); ++EGLAPI EGLBoolean EGLAPIENTRY eglUnbindWaylandDisplayWL (EGLDisplay dpy, struct wl_display *display); ++EGLAPI EGLBoolean EGLAPIENTRY eglQueryWaylandBufferWL (EGLDisplay dpy, struct wl_resource *buffer, EGLint attribute, EGLint *value); ++#endif ++#endif /* EGL_WL_bind_wayland_display */ ++ ++#ifndef EGL_WL_create_wayland_buffer_from_image ++#define EGL_WL_create_wayland_buffer_from_image 1 ++#define PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWL PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC ++struct wl_buffer; ++typedef struct wl_buffer *(EGLAPIENTRYP PFNEGLCREATEWAYLANDBUFFERFROMIMAGEWLPROC) (EGLDisplay dpy, EGLImageKHR image); ++#ifdef EGL_EGLEXT_PROTOTYPES ++EGLAPI struct wl_buffer *EGLAPIENTRY eglCreateWaylandBufferFromImageWL (EGLDisplay dpy, EGLImageKHR image); ++#endif ++#endif /* EGL_WL_create_wayland_buffer_from_image */ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/EGL/eglplatform.h b/build/ohos/ohos-sysroot/usr/include/EGL/eglplatform.h +new file mode 100644 +index 0000000..578791b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/EGL/eglplatform.h +@@ -0,0 +1,177 @@ ++#ifndef __eglplatform_h_ ++#define __eglplatform_h_ ++ ++/* ++** Copyright 2007-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: Apache-2.0 ++*/ ++ ++/* Platform-specific types and definitions for egl.h ++ * ++ * Adopters may modify khrplatform.h and this file to suit their platform. ++ * You are encouraged to submit all modifications to the Khronos group so that ++ * they can be included in future versions of this file. Please submit changes ++ * by filing an issue or pull request on the public Khronos EGL Registry, at ++ * https://www.github.com/KhronosGroup/EGL-Registry/ ++ */ ++ ++#include ++ ++/* Macros used in EGL function prototype declarations. ++ * ++ * EGL functions should be prototyped as: ++ * ++ * EGLAPI return-type EGLAPIENTRY eglFunction(arguments); ++ * typedef return-type (EXPAPIENTRYP PFNEGLFUNCTIONPROC) (arguments); ++ * ++ * KHRONOS_APICALL and KHRONOS_APIENTRY are defined in KHR/khrplatform.h ++ */ ++ ++#ifndef EGLAPI ++#define EGLAPI KHRONOS_APICALL ++#endif ++ ++#ifndef EGLAPIENTRY ++#define EGLAPIENTRY KHRONOS_APIENTRY ++#endif ++#define EGLAPIENTRYP EGLAPIENTRY* ++ ++/* The types NativeDisplayType, NativeWindowType, and NativePixmapType ++ * are aliases of window-system-dependent types, such as X Display * or ++ * Windows Device Context. They must be defined in platform-specific ++ * code below. The EGL-prefixed versions of Native*Type are the same ++ * types, renamed in EGL 1.3 so all types in the API start with "EGL". ++ * ++ * Khronos STRONGLY RECOMMENDS that you use the default definitions ++ * provided below, since these changes affect both binary and source ++ * portability of applications using EGL running on different EGL ++ * implementations. ++ */ ++ ++#if defined(EGL_NO_PLATFORM_SPECIFIC_TYPES) ++ ++typedef void *EGLNativeDisplayType; ++typedef void *EGLNativePixmapType; ++typedef void *EGLNativeWindowType; ++ ++#elif defined(OHOS_PLATFORM) ++ ++struct NativeWindow; ++ ++typedef void* EGLNativeDisplayType; ++typedef void* EGLNativePixmapType; ++typedef struct NativeWindow* EGLNativeWindowType; ++ ++#elif defined(_WIN32) || defined(__VC32__) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) /* Win32 and WinCE */ ++#ifndef WIN32_LEAN_AND_MEAN ++#define WIN32_LEAN_AND_MEAN 1 ++#endif ++#include ++ ++typedef HDC EGLNativeDisplayType; ++typedef HBITMAP EGLNativePixmapType; ++typedef HWND EGLNativeWindowType; ++ ++#elif defined(__EMSCRIPTEN__) ++ ++typedef int EGLNativeDisplayType; ++typedef int EGLNativePixmapType; ++typedef int EGLNativeWindowType; ++ ++#elif defined(__WINSCW__) || defined(__SYMBIAN32__) /* Symbian */ ++ ++typedef int EGLNativeDisplayType; ++typedef void *EGLNativePixmapType; ++typedef void *EGLNativeWindowType; ++ ++#elif defined(WL_EGL_PLATFORM) ++ ++typedef struct wl_display *EGLNativeDisplayType; ++typedef struct wl_egl_pixmap *EGLNativePixmapType; ++typedef struct wl_egl_window *EGLNativeWindowType; ++ ++#elif defined(__GBM__) ++ ++typedef struct gbm_device *EGLNativeDisplayType; ++typedef struct gbm_bo *EGLNativePixmapType; ++typedef void *EGLNativeWindowType; ++ ++#elif defined(__ANDROID__) || defined(ANDROID) ++ ++struct ANativeWindow; ++struct egl_native_pixmap_t; ++ ++typedef void* EGLNativeDisplayType; ++typedef struct egl_native_pixmap_t* EGLNativePixmapType; ++typedef struct ANativeWindow* EGLNativeWindowType; ++ ++#elif defined(USE_OZONE) ++ ++typedef intptr_t EGLNativeDisplayType; ++typedef intptr_t EGLNativePixmapType; ++typedef intptr_t EGLNativeWindowType; ++ ++#elif defined(USE_X11) ++ ++/* X11 (tentative) */ ++#include ++#include ++ ++typedef Display *EGLNativeDisplayType; ++typedef Pixmap EGLNativePixmapType; ++typedef Window EGLNativeWindowType; ++ ++#elif defined(__unix__) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#elif defined(__APPLE__) ++ ++typedef int EGLNativeDisplayType; ++typedef void *EGLNativePixmapType; ++typedef void *EGLNativeWindowType; ++ ++#elif defined(__HAIKU__) ++ ++#include ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#elif defined(__Fuchsia__) ++ ++typedef void *EGLNativeDisplayType; ++typedef khronos_uintptr_t EGLNativePixmapType; ++typedef khronos_uintptr_t EGLNativeWindowType; ++ ++#else ++#error "Platform not recognized" ++#endif ++ ++/* EGL 1.2 types, renamed for consistency in EGL 1.3 */ ++typedef EGLNativeDisplayType NativeDisplayType; ++typedef EGLNativePixmapType NativePixmapType; ++typedef EGLNativeWindowType NativeWindowType; ++ ++ ++/* Define EGLint. This must be a signed integral type large enough to contain ++ * all legal attribute names and values passed into and out of EGL, whether ++ * their type is boolean, bitmask, enumerant (symbolic constant), integer, ++ * handle, or other. While in general a 32-bit integer will suffice, if ++ * handles are 64 bit types, then EGLint should be defined as a signed 64-bit ++ * integer type. ++ */ ++typedef khronos_int32_t EGLint; ++ ++ ++/* C++ / C typecast macros for special EGL handle values */ ++#if defined(__cplusplus) ++#define EGL_CAST(type, value) (static_cast(value)) ++#else ++#define EGL_CAST(type, value) ((type) (value)) ++#endif ++ ++#endif /* __eglplatform_h */ +diff --git a/build/ohos/ohos-sysroot/usr/include/GLES3/gl3.h b/build/ohos/ohos-sysroot/usr/include/GLES3/gl3.h +new file mode 100644 +index 0000000..6bb4d8f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/GLES3/gl3.h +@@ -0,0 +1,1192 @@ ++#ifndef __gles2_gl3_h_ ++#define __gles2_gl3_h_ 1 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** Copyright 2013-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: MIT ++** ++** This header is generated from the Khronos OpenGL / OpenGL ES XML ++** API Registry. The current version of the Registry, generator scripts ++** used to make the header, and the header can be found at ++** https://github.com/KhronosGroup/OpenGL-Registry ++*/ ++ ++#include ++ ++#ifndef GL_APIENTRYP ++#define GL_APIENTRYP GL_APIENTRY* ++#endif ++ ++#ifndef GL_GLES_PROTOTYPES ++#define GL_GLES_PROTOTYPES 1 ++#endif ++ ++/* Generated on date 20210107 */ ++ ++/* Generated C header for: ++ * API: gles2 ++ * Profile: common ++ * Versions considered: 2\.[0-9]|3\.0 ++ * Versions emitted: .* ++ * Default extensions included: None ++ * Additional extensions included: _nomatch_^ ++ * Extensions removed: _nomatch_^ ++ */ ++ ++#ifndef GL_ES_VERSION_2_0 ++#define GL_ES_VERSION_2_0 1 ++#include ++typedef khronos_int8_t GLbyte; ++typedef khronos_float_t GLclampf; ++typedef khronos_int32_t GLfixed; ++typedef khronos_int16_t GLshort; ++typedef khronos_uint16_t GLushort; ++typedef void GLvoid; ++typedef struct __GLsync *GLsync; ++typedef khronos_int64_t GLint64; ++typedef khronos_uint64_t GLuint64; ++typedef unsigned int GLenum; ++typedef unsigned int GLuint; ++typedef char GLchar; ++typedef khronos_float_t GLfloat; ++typedef khronos_ssize_t GLsizeiptr; ++typedef khronos_intptr_t GLintptr; ++typedef unsigned int GLbitfield; ++typedef int GLint; ++typedef unsigned char GLboolean; ++typedef int GLsizei; ++typedef khronos_uint8_t GLubyte; ++#define GL_DEPTH_BUFFER_BIT 0x00000100 ++#define GL_STENCIL_BUFFER_BIT 0x00000400 ++#define GL_COLOR_BUFFER_BIT 0x00004000 ++#define GL_FALSE 0 ++#define GL_TRUE 1 ++#define GL_POINTS 0x0000 ++#define GL_LINES 0x0001 ++#define GL_LINE_LOOP 0x0002 ++#define GL_LINE_STRIP 0x0003 ++#define GL_TRIANGLES 0x0004 ++#define GL_TRIANGLE_STRIP 0x0005 ++#define GL_TRIANGLE_FAN 0x0006 ++#define GL_ZERO 0 ++#define GL_ONE 1 ++#define GL_SRC_COLOR 0x0300 ++#define GL_ONE_MINUS_SRC_COLOR 0x0301 ++#define GL_SRC_ALPHA 0x0302 ++#define GL_ONE_MINUS_SRC_ALPHA 0x0303 ++#define GL_DST_ALPHA 0x0304 ++#define GL_ONE_MINUS_DST_ALPHA 0x0305 ++#define GL_DST_COLOR 0x0306 ++#define GL_ONE_MINUS_DST_COLOR 0x0307 ++#define GL_SRC_ALPHA_SATURATE 0x0308 ++#define GL_FUNC_ADD 0x8006 ++#define GL_BLEND_EQUATION 0x8009 ++#define GL_BLEND_EQUATION_RGB 0x8009 ++#define GL_BLEND_EQUATION_ALPHA 0x883D ++#define GL_FUNC_SUBTRACT 0x800A ++#define GL_FUNC_REVERSE_SUBTRACT 0x800B ++#define GL_BLEND_DST_RGB 0x80C8 ++#define GL_BLEND_SRC_RGB 0x80C9 ++#define GL_BLEND_DST_ALPHA 0x80CA ++#define GL_BLEND_SRC_ALPHA 0x80CB ++#define GL_CONSTANT_COLOR 0x8001 ++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 ++#define GL_CONSTANT_ALPHA 0x8003 ++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 ++#define GL_BLEND_COLOR 0x8005 ++#define GL_ARRAY_BUFFER 0x8892 ++#define GL_ELEMENT_ARRAY_BUFFER 0x8893 ++#define GL_ARRAY_BUFFER_BINDING 0x8894 ++#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 ++#define GL_STREAM_DRAW 0x88E0 ++#define GL_STATIC_DRAW 0x88E4 ++#define GL_DYNAMIC_DRAW 0x88E8 ++#define GL_BUFFER_SIZE 0x8764 ++#define GL_BUFFER_USAGE 0x8765 ++#define GL_CURRENT_VERTEX_ATTRIB 0x8626 ++#define GL_FRONT 0x0404 ++#define GL_BACK 0x0405 ++#define GL_FRONT_AND_BACK 0x0408 ++#define GL_TEXTURE_2D 0x0DE1 ++#define GL_CULL_FACE 0x0B44 ++#define GL_BLEND 0x0BE2 ++#define GL_DITHER 0x0BD0 ++#define GL_STENCIL_TEST 0x0B90 ++#define GL_DEPTH_TEST 0x0B71 ++#define GL_SCISSOR_TEST 0x0C11 ++#define GL_POLYGON_OFFSET_FILL 0x8037 ++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E ++#define GL_SAMPLE_COVERAGE 0x80A0 ++#define GL_NO_ERROR 0 ++#define GL_INVALID_ENUM 0x0500 ++#define GL_INVALID_VALUE 0x0501 ++#define GL_INVALID_OPERATION 0x0502 ++#define GL_OUT_OF_MEMORY 0x0505 ++#define GL_CW 0x0900 ++#define GL_CCW 0x0901 ++#define GL_LINE_WIDTH 0x0B21 ++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D ++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E ++#define GL_CULL_FACE_MODE 0x0B45 ++#define GL_FRONT_FACE 0x0B46 ++#define GL_DEPTH_RANGE 0x0B70 ++#define GL_DEPTH_WRITEMASK 0x0B72 ++#define GL_DEPTH_CLEAR_VALUE 0x0B73 ++#define GL_DEPTH_FUNC 0x0B74 ++#define GL_STENCIL_CLEAR_VALUE 0x0B91 ++#define GL_STENCIL_FUNC 0x0B92 ++#define GL_STENCIL_FAIL 0x0B94 ++#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 ++#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 ++#define GL_STENCIL_REF 0x0B97 ++#define GL_STENCIL_VALUE_MASK 0x0B93 ++#define GL_STENCIL_WRITEMASK 0x0B98 ++#define GL_STENCIL_BACK_FUNC 0x8800 ++#define GL_STENCIL_BACK_FAIL 0x8801 ++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 ++#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 ++#define GL_STENCIL_BACK_REF 0x8CA3 ++#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 ++#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 ++#define GL_VIEWPORT 0x0BA2 ++#define GL_SCISSOR_BOX 0x0C10 ++#define GL_COLOR_CLEAR_VALUE 0x0C22 ++#define GL_COLOR_WRITEMASK 0x0C23 ++#define GL_UNPACK_ALIGNMENT 0x0CF5 ++#define GL_PACK_ALIGNMENT 0x0D05 ++#define GL_MAX_TEXTURE_SIZE 0x0D33 ++#define GL_MAX_VIEWPORT_DIMS 0x0D3A ++#define GL_SUBPIXEL_BITS 0x0D50 ++#define GL_RED_BITS 0x0D52 ++#define GL_GREEN_BITS 0x0D53 ++#define GL_BLUE_BITS 0x0D54 ++#define GL_ALPHA_BITS 0x0D55 ++#define GL_DEPTH_BITS 0x0D56 ++#define GL_STENCIL_BITS 0x0D57 ++#define GL_POLYGON_OFFSET_UNITS 0x2A00 ++#define GL_POLYGON_OFFSET_FACTOR 0x8038 ++#define GL_TEXTURE_BINDING_2D 0x8069 ++#define GL_SAMPLE_BUFFERS 0x80A8 ++#define GL_SAMPLES 0x80A9 ++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA ++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB ++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 ++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 ++#define GL_DONT_CARE 0x1100 ++#define GL_FASTEST 0x1101 ++#define GL_NICEST 0x1102 ++#define GL_GENERATE_MIPMAP_HINT 0x8192 ++#define GL_BYTE 0x1400 ++#define GL_UNSIGNED_BYTE 0x1401 ++#define GL_SHORT 0x1402 ++#define GL_UNSIGNED_SHORT 0x1403 ++#define GL_INT 0x1404 ++#define GL_UNSIGNED_INT 0x1405 ++#define GL_FLOAT 0x1406 ++#define GL_FIXED 0x140C ++#define GL_DEPTH_COMPONENT 0x1902 ++#define GL_ALPHA 0x1906 ++#define GL_RGB 0x1907 ++#define GL_RGBA 0x1908 ++#define GL_LUMINANCE 0x1909 ++#define GL_LUMINANCE_ALPHA 0x190A ++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 ++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 ++#define GL_UNSIGNED_SHORT_5_6_5 0x8363 ++#define GL_FRAGMENT_SHADER 0x8B30 ++#define GL_VERTEX_SHADER 0x8B31 ++#define GL_MAX_VERTEX_ATTRIBS 0x8869 ++#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB ++#define GL_MAX_VARYING_VECTORS 0x8DFC ++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D ++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C ++#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 ++#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD ++#define GL_SHADER_TYPE 0x8B4F ++#define GL_DELETE_STATUS 0x8B80 ++#define GL_LINK_STATUS 0x8B82 ++#define GL_VALIDATE_STATUS 0x8B83 ++#define GL_ATTACHED_SHADERS 0x8B85 ++#define GL_ACTIVE_UNIFORMS 0x8B86 ++#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 ++#define GL_ACTIVE_ATTRIBUTES 0x8B89 ++#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A ++#define GL_SHADING_LANGUAGE_VERSION 0x8B8C ++#define GL_CURRENT_PROGRAM 0x8B8D ++#define GL_NEVER 0x0200 ++#define GL_LESS 0x0201 ++#define GL_EQUAL 0x0202 ++#define GL_LEQUAL 0x0203 ++#define GL_GREATER 0x0204 ++#define GL_NOTEQUAL 0x0205 ++#define GL_GEQUAL 0x0206 ++#define GL_ALWAYS 0x0207 ++#define GL_KEEP 0x1E00 ++#define GL_REPLACE 0x1E01 ++#define GL_INCR 0x1E02 ++#define GL_DECR 0x1E03 ++#define GL_INVERT 0x150A ++#define GL_INCR_WRAP 0x8507 ++#define GL_DECR_WRAP 0x8508 ++#define GL_VENDOR 0x1F00 ++#define GL_RENDERER 0x1F01 ++#define GL_VERSION 0x1F02 ++#define GL_EXTENSIONS 0x1F03 ++#define GL_NEAREST 0x2600 ++#define GL_LINEAR 0x2601 ++#define GL_NEAREST_MIPMAP_NEAREST 0x2700 ++#define GL_LINEAR_MIPMAP_NEAREST 0x2701 ++#define GL_NEAREST_MIPMAP_LINEAR 0x2702 ++#define GL_LINEAR_MIPMAP_LINEAR 0x2703 ++#define GL_TEXTURE_MAG_FILTER 0x2800 ++#define GL_TEXTURE_MIN_FILTER 0x2801 ++#define GL_TEXTURE_WRAP_S 0x2802 ++#define GL_TEXTURE_WRAP_T 0x2803 ++#define GL_TEXTURE 0x1702 ++#define GL_TEXTURE_CUBE_MAP 0x8513 ++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A ++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C ++#define GL_TEXTURE0 0x84C0 ++#define GL_TEXTURE1 0x84C1 ++#define GL_TEXTURE2 0x84C2 ++#define GL_TEXTURE3 0x84C3 ++#define GL_TEXTURE4 0x84C4 ++#define GL_TEXTURE5 0x84C5 ++#define GL_TEXTURE6 0x84C6 ++#define GL_TEXTURE7 0x84C7 ++#define GL_TEXTURE8 0x84C8 ++#define GL_TEXTURE9 0x84C9 ++#define GL_TEXTURE10 0x84CA ++#define GL_TEXTURE11 0x84CB ++#define GL_TEXTURE12 0x84CC ++#define GL_TEXTURE13 0x84CD ++#define GL_TEXTURE14 0x84CE ++#define GL_TEXTURE15 0x84CF ++#define GL_TEXTURE16 0x84D0 ++#define GL_TEXTURE17 0x84D1 ++#define GL_TEXTURE18 0x84D2 ++#define GL_TEXTURE19 0x84D3 ++#define GL_TEXTURE20 0x84D4 ++#define GL_TEXTURE21 0x84D5 ++#define GL_TEXTURE22 0x84D6 ++#define GL_TEXTURE23 0x84D7 ++#define GL_TEXTURE24 0x84D8 ++#define GL_TEXTURE25 0x84D9 ++#define GL_TEXTURE26 0x84DA ++#define GL_TEXTURE27 0x84DB ++#define GL_TEXTURE28 0x84DC ++#define GL_TEXTURE29 0x84DD ++#define GL_TEXTURE30 0x84DE ++#define GL_TEXTURE31 0x84DF ++#define GL_ACTIVE_TEXTURE 0x84E0 ++#define GL_REPEAT 0x2901 ++#define GL_CLAMP_TO_EDGE 0x812F ++#define GL_MIRRORED_REPEAT 0x8370 ++#define GL_FLOAT_VEC2 0x8B50 ++#define GL_FLOAT_VEC3 0x8B51 ++#define GL_FLOAT_VEC4 0x8B52 ++#define GL_INT_VEC2 0x8B53 ++#define GL_INT_VEC3 0x8B54 ++#define GL_INT_VEC4 0x8B55 ++#define GL_BOOL 0x8B56 ++#define GL_BOOL_VEC2 0x8B57 ++#define GL_BOOL_VEC3 0x8B58 ++#define GL_BOOL_VEC4 0x8B59 ++#define GL_FLOAT_MAT2 0x8B5A ++#define GL_FLOAT_MAT3 0x8B5B ++#define GL_FLOAT_MAT4 0x8B5C ++#define GL_SAMPLER_2D 0x8B5E ++#define GL_SAMPLER_CUBE 0x8B60 ++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 ++#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 ++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 ++#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 ++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A ++#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 ++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F ++#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A ++#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B ++#define GL_COMPILE_STATUS 0x8B81 ++#define GL_INFO_LOG_LENGTH 0x8B84 ++#define GL_SHADER_SOURCE_LENGTH 0x8B88 ++#define GL_SHADER_COMPILER 0x8DFA ++#define GL_SHADER_BINARY_FORMATS 0x8DF8 ++#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 ++#define GL_LOW_FLOAT 0x8DF0 ++#define GL_MEDIUM_FLOAT 0x8DF1 ++#define GL_HIGH_FLOAT 0x8DF2 ++#define GL_LOW_INT 0x8DF3 ++#define GL_MEDIUM_INT 0x8DF4 ++#define GL_HIGH_INT 0x8DF5 ++#define GL_FRAMEBUFFER 0x8D40 ++#define GL_RENDERBUFFER 0x8D41 ++#define GL_RGBA4 0x8056 ++#define GL_RGB5_A1 0x8057 ++#define GL_RGB565 0x8D62 ++#define GL_DEPTH_COMPONENT16 0x81A5 ++#define GL_STENCIL_INDEX8 0x8D48 ++#define GL_RENDERBUFFER_WIDTH 0x8D42 ++#define GL_RENDERBUFFER_HEIGHT 0x8D43 ++#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 ++#define GL_RENDERBUFFER_RED_SIZE 0x8D50 ++#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 ++#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 ++#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 ++#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 ++#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 ++#define GL_COLOR_ATTACHMENT0 0x8CE0 ++#define GL_DEPTH_ATTACHMENT 0x8D00 ++#define GL_STENCIL_ATTACHMENT 0x8D20 ++#define GL_NONE 0 ++#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 ++#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 ++#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 ++#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 ++#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD ++#define GL_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_RENDERBUFFER_BINDING 0x8CA7 ++#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 ++#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 ++typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); ++typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); ++typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); ++typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); ++typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); ++typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); ++typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); ++typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); ++typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); ++typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); ++typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); ++typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); ++typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); ++typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); ++typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); ++typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); ++typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); ++typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); ++typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); ++typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); ++typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); ++typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); ++GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); ++GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); ++GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); ++GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); ++GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); ++GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); ++GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); ++GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); ++GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); ++GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); ++GL_APICALL void GL_APIENTRY glClearStencil (GLint s); ++GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); ++GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); ++GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); ++GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); ++GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); ++GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); ++GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); ++GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glDisable (GLenum cap); ++GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); ++GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glEnable (GLenum cap); ++GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glFinish (void); ++GL_APICALL void GL_APIENTRY glFlush (void); ++GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); ++GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); ++GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); ++GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL GLenum GL_APIENTRY glGetError (void); ++GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); ++GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); ++GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); ++GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); ++GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); ++GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); ++GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); ++GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); ++GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); ++GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); ++GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); ++GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); ++GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); ++GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); ++GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); ++GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryFormat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); ++GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); ++GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); ++GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); ++GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); ++GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); ++GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); ++GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); ++GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); ++GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); ++GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); ++#endif ++#endif /* GL_ES_VERSION_2_0 */ ++ ++#ifndef GL_ES_VERSION_3_0 ++#define GL_ES_VERSION_3_0 1 ++typedef khronos_uint16_t GLhalf; ++#define GL_READ_BUFFER 0x0C02 ++#define GL_UNPACK_ROW_LENGTH 0x0CF2 ++#define GL_UNPACK_SKIP_ROWS 0x0CF3 ++#define GL_UNPACK_SKIP_PIXELS 0x0CF4 ++#define GL_PACK_ROW_LENGTH 0x0D02 ++#define GL_PACK_SKIP_ROWS 0x0D03 ++#define GL_PACK_SKIP_PIXELS 0x0D04 ++#define GL_COLOR 0x1800 ++#define GL_DEPTH 0x1801 ++#define GL_STENCIL 0x1802 ++#define GL_RED 0x1903 ++#define GL_RGB8 0x8051 ++#define GL_RGBA8 0x8058 ++#define GL_RGB10_A2 0x8059 ++#define GL_TEXTURE_BINDING_3D 0x806A ++#define GL_UNPACK_SKIP_IMAGES 0x806D ++#define GL_UNPACK_IMAGE_HEIGHT 0x806E ++#define GL_TEXTURE_3D 0x806F ++#define GL_TEXTURE_WRAP_R 0x8072 ++#define GL_MAX_3D_TEXTURE_SIZE 0x8073 ++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 ++#define GL_MAX_ELEMENTS_VERTICES 0x80E8 ++#define GL_MAX_ELEMENTS_INDICES 0x80E9 ++#define GL_TEXTURE_MIN_LOD 0x813A ++#define GL_TEXTURE_MAX_LOD 0x813B ++#define GL_TEXTURE_BASE_LEVEL 0x813C ++#define GL_TEXTURE_MAX_LEVEL 0x813D ++#define GL_MIN 0x8007 ++#define GL_MAX 0x8008 ++#define GL_DEPTH_COMPONENT24 0x81A6 ++#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD ++#define GL_TEXTURE_COMPARE_MODE 0x884C ++#define GL_TEXTURE_COMPARE_FUNC 0x884D ++#define GL_CURRENT_QUERY 0x8865 ++#define GL_QUERY_RESULT 0x8866 ++#define GL_QUERY_RESULT_AVAILABLE 0x8867 ++#define GL_BUFFER_MAPPED 0x88BC ++#define GL_BUFFER_MAP_POINTER 0x88BD ++#define GL_STREAM_READ 0x88E1 ++#define GL_STREAM_COPY 0x88E2 ++#define GL_STATIC_READ 0x88E5 ++#define GL_STATIC_COPY 0x88E6 ++#define GL_DYNAMIC_READ 0x88E9 ++#define GL_DYNAMIC_COPY 0x88EA ++#define GL_MAX_DRAW_BUFFERS 0x8824 ++#define GL_DRAW_BUFFER0 0x8825 ++#define GL_DRAW_BUFFER1 0x8826 ++#define GL_DRAW_BUFFER2 0x8827 ++#define GL_DRAW_BUFFER3 0x8828 ++#define GL_DRAW_BUFFER4 0x8829 ++#define GL_DRAW_BUFFER5 0x882A ++#define GL_DRAW_BUFFER6 0x882B ++#define GL_DRAW_BUFFER7 0x882C ++#define GL_DRAW_BUFFER8 0x882D ++#define GL_DRAW_BUFFER9 0x882E ++#define GL_DRAW_BUFFER10 0x882F ++#define GL_DRAW_BUFFER11 0x8830 ++#define GL_DRAW_BUFFER12 0x8831 ++#define GL_DRAW_BUFFER13 0x8832 ++#define GL_DRAW_BUFFER14 0x8833 ++#define GL_DRAW_BUFFER15 0x8834 ++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 ++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A ++#define GL_SAMPLER_3D 0x8B5F ++#define GL_SAMPLER_2D_SHADOW 0x8B62 ++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B ++#define GL_PIXEL_PACK_BUFFER 0x88EB ++#define GL_PIXEL_UNPACK_BUFFER 0x88EC ++#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED ++#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF ++#define GL_FLOAT_MAT2x3 0x8B65 ++#define GL_FLOAT_MAT2x4 0x8B66 ++#define GL_FLOAT_MAT3x2 0x8B67 ++#define GL_FLOAT_MAT3x4 0x8B68 ++#define GL_FLOAT_MAT4x2 0x8B69 ++#define GL_FLOAT_MAT4x3 0x8B6A ++#define GL_SRGB 0x8C40 ++#define GL_SRGB8 0x8C41 ++#define GL_SRGB8_ALPHA8 0x8C43 ++#define GL_COMPARE_REF_TO_TEXTURE 0x884E ++#define GL_MAJOR_VERSION 0x821B ++#define GL_MINOR_VERSION 0x821C ++#define GL_NUM_EXTENSIONS 0x821D ++#define GL_RGBA32F 0x8814 ++#define GL_RGB32F 0x8815 ++#define GL_RGBA16F 0x881A ++#define GL_RGB16F 0x881B ++#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD ++#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF ++#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 ++#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 ++#define GL_MAX_VARYING_COMPONENTS 0x8B4B ++#define GL_TEXTURE_2D_ARRAY 0x8C1A ++#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D ++#define GL_R11F_G11F_B10F 0x8C3A ++#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B ++#define GL_RGB9_E5 0x8C3D ++#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E ++#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 ++#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 ++#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 ++#define GL_RASTERIZER_DISCARD 0x8C89 ++#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B ++#define GL_INTERLEAVED_ATTRIBS 0x8C8C ++#define GL_SEPARATE_ATTRIBS 0x8C8D ++#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E ++#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F ++#define GL_RGBA32UI 0x8D70 ++#define GL_RGB32UI 0x8D71 ++#define GL_RGBA16UI 0x8D76 ++#define GL_RGB16UI 0x8D77 ++#define GL_RGBA8UI 0x8D7C ++#define GL_RGB8UI 0x8D7D ++#define GL_RGBA32I 0x8D82 ++#define GL_RGB32I 0x8D83 ++#define GL_RGBA16I 0x8D88 ++#define GL_RGB16I 0x8D89 ++#define GL_RGBA8I 0x8D8E ++#define GL_RGB8I 0x8D8F ++#define GL_RED_INTEGER 0x8D94 ++#define GL_RGB_INTEGER 0x8D98 ++#define GL_RGBA_INTEGER 0x8D99 ++#define GL_SAMPLER_2D_ARRAY 0x8DC1 ++#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 ++#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 ++#define GL_UNSIGNED_INT_VEC2 0x8DC6 ++#define GL_UNSIGNED_INT_VEC3 0x8DC7 ++#define GL_UNSIGNED_INT_VEC4 0x8DC8 ++#define GL_INT_SAMPLER_2D 0x8DCA ++#define GL_INT_SAMPLER_3D 0x8DCB ++#define GL_INT_SAMPLER_CUBE 0x8DCC ++#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF ++#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 ++#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 ++#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 ++#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 ++#define GL_BUFFER_ACCESS_FLAGS 0x911F ++#define GL_BUFFER_MAP_LENGTH 0x9120 ++#define GL_BUFFER_MAP_OFFSET 0x9121 ++#define GL_DEPTH_COMPONENT32F 0x8CAC ++#define GL_DEPTH32F_STENCIL8 0x8CAD ++#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD ++#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 ++#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 ++#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 ++#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 ++#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 ++#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 ++#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 ++#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 ++#define GL_FRAMEBUFFER_DEFAULT 0x8218 ++#define GL_FRAMEBUFFER_UNDEFINED 0x8219 ++#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A ++#define GL_DEPTH_STENCIL 0x84F9 ++#define GL_UNSIGNED_INT_24_8 0x84FA ++#define GL_DEPTH24_STENCIL8 0x88F0 ++#define GL_UNSIGNED_NORMALIZED 0x8C17 ++#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_READ_FRAMEBUFFER 0x8CA8 ++#define GL_DRAW_FRAMEBUFFER 0x8CA9 ++#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA ++#define GL_RENDERBUFFER_SAMPLES 0x8CAB ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 ++#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF ++#define GL_COLOR_ATTACHMENT1 0x8CE1 ++#define GL_COLOR_ATTACHMENT2 0x8CE2 ++#define GL_COLOR_ATTACHMENT3 0x8CE3 ++#define GL_COLOR_ATTACHMENT4 0x8CE4 ++#define GL_COLOR_ATTACHMENT5 0x8CE5 ++#define GL_COLOR_ATTACHMENT6 0x8CE6 ++#define GL_COLOR_ATTACHMENT7 0x8CE7 ++#define GL_COLOR_ATTACHMENT8 0x8CE8 ++#define GL_COLOR_ATTACHMENT9 0x8CE9 ++#define GL_COLOR_ATTACHMENT10 0x8CEA ++#define GL_COLOR_ATTACHMENT11 0x8CEB ++#define GL_COLOR_ATTACHMENT12 0x8CEC ++#define GL_COLOR_ATTACHMENT13 0x8CED ++#define GL_COLOR_ATTACHMENT14 0x8CEE ++#define GL_COLOR_ATTACHMENT15 0x8CEF ++#define GL_COLOR_ATTACHMENT16 0x8CF0 ++#define GL_COLOR_ATTACHMENT17 0x8CF1 ++#define GL_COLOR_ATTACHMENT18 0x8CF2 ++#define GL_COLOR_ATTACHMENT19 0x8CF3 ++#define GL_COLOR_ATTACHMENT20 0x8CF4 ++#define GL_COLOR_ATTACHMENT21 0x8CF5 ++#define GL_COLOR_ATTACHMENT22 0x8CF6 ++#define GL_COLOR_ATTACHMENT23 0x8CF7 ++#define GL_COLOR_ATTACHMENT24 0x8CF8 ++#define GL_COLOR_ATTACHMENT25 0x8CF9 ++#define GL_COLOR_ATTACHMENT26 0x8CFA ++#define GL_COLOR_ATTACHMENT27 0x8CFB ++#define GL_COLOR_ATTACHMENT28 0x8CFC ++#define GL_COLOR_ATTACHMENT29 0x8CFD ++#define GL_COLOR_ATTACHMENT30 0x8CFE ++#define GL_COLOR_ATTACHMENT31 0x8CFF ++#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 ++#define GL_MAX_SAMPLES 0x8D57 ++#define GL_HALF_FLOAT 0x140B ++#define GL_MAP_READ_BIT 0x0001 ++#define GL_MAP_WRITE_BIT 0x0002 ++#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 ++#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 ++#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 ++#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 ++#define GL_RG 0x8227 ++#define GL_RG_INTEGER 0x8228 ++#define GL_R8 0x8229 ++#define GL_RG8 0x822B ++#define GL_R16F 0x822D ++#define GL_R32F 0x822E ++#define GL_RG16F 0x822F ++#define GL_RG32F 0x8230 ++#define GL_R8I 0x8231 ++#define GL_R8UI 0x8232 ++#define GL_R16I 0x8233 ++#define GL_R16UI 0x8234 ++#define GL_R32I 0x8235 ++#define GL_R32UI 0x8236 ++#define GL_RG8I 0x8237 ++#define GL_RG8UI 0x8238 ++#define GL_RG16I 0x8239 ++#define GL_RG16UI 0x823A ++#define GL_RG32I 0x823B ++#define GL_RG32UI 0x823C ++#define GL_VERTEX_ARRAY_BINDING 0x85B5 ++#define GL_R8_SNORM 0x8F94 ++#define GL_RG8_SNORM 0x8F95 ++#define GL_RGB8_SNORM 0x8F96 ++#define GL_RGBA8_SNORM 0x8F97 ++#define GL_SIGNED_NORMALIZED 0x8F9C ++#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 ++#define GL_COPY_READ_BUFFER 0x8F36 ++#define GL_COPY_WRITE_BUFFER 0x8F37 ++#define GL_COPY_READ_BUFFER_BINDING 0x8F36 ++#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 ++#define GL_UNIFORM_BUFFER 0x8A11 ++#define GL_UNIFORM_BUFFER_BINDING 0x8A28 ++#define GL_UNIFORM_BUFFER_START 0x8A29 ++#define GL_UNIFORM_BUFFER_SIZE 0x8A2A ++#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B ++#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D ++#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E ++#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F ++#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 ++#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 ++#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 ++#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 ++#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 ++#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 ++#define GL_UNIFORM_TYPE 0x8A37 ++#define GL_UNIFORM_SIZE 0x8A38 ++#define GL_UNIFORM_NAME_LENGTH 0x8A39 ++#define GL_UNIFORM_BLOCK_INDEX 0x8A3A ++#define GL_UNIFORM_OFFSET 0x8A3B ++#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C ++#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D ++#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E ++#define GL_UNIFORM_BLOCK_BINDING 0x8A3F ++#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 ++#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 ++#define GL_INVALID_INDEX 0xFFFFFFFFu ++#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 ++#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 ++#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 ++#define GL_OBJECT_TYPE 0x9112 ++#define GL_SYNC_CONDITION 0x9113 ++#define GL_SYNC_STATUS 0x9114 ++#define GL_SYNC_FLAGS 0x9115 ++#define GL_SYNC_FENCE 0x9116 ++#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 ++#define GL_UNSIGNALED 0x9118 ++#define GL_SIGNALED 0x9119 ++#define GL_ALREADY_SIGNALED 0x911A ++#define GL_TIMEOUT_EXPIRED 0x911B ++#define GL_CONDITION_SATISFIED 0x911C ++#define GL_WAIT_FAILED 0x911D ++#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 ++#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull ++#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE ++#define GL_ANY_SAMPLES_PASSED 0x8C2F ++#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A ++#define GL_SAMPLER_BINDING 0x8919 ++#define GL_RGB10_A2UI 0x906F ++#define GL_TEXTURE_SWIZZLE_R 0x8E42 ++#define GL_TEXTURE_SWIZZLE_G 0x8E43 ++#define GL_TEXTURE_SWIZZLE_B 0x8E44 ++#define GL_TEXTURE_SWIZZLE_A 0x8E45 ++#define GL_GREEN 0x1904 ++#define GL_BLUE 0x1905 ++#define GL_INT_2_10_10_10_REV 0x8D9F ++#define GL_TRANSFORM_FEEDBACK 0x8E22 ++#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 ++#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 ++#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 ++#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 ++#define GL_PROGRAM_BINARY_LENGTH 0x8741 ++#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE ++#define GL_PROGRAM_BINARY_FORMATS 0x87FF ++#define GL_COMPRESSED_R11_EAC 0x9270 ++#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 ++#define GL_COMPRESSED_RG11_EAC 0x9272 ++#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 ++#define GL_COMPRESSED_RGB8_ETC2 0x9274 ++#define GL_COMPRESSED_SRGB8_ETC2 0x9275 ++#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 ++#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 ++#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 ++#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F ++#define GL_MAX_ELEMENT_INDEX 0x8D6B ++#define GL_NUM_SAMPLE_COUNTS 0x9380 ++#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF ++typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); ++typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); ++typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); ++typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); ++typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); ++typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); ++typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); ++typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); ++typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); ++typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); ++typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); ++typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); ++typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); ++typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); ++typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); ++typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); ++typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); ++typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); ++GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); ++GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); ++GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); ++GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); ++GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); ++GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); ++GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); ++GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); ++GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); ++GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); ++GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); ++GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); ++GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); ++GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); ++GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); ++GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); ++GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); ++GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); ++GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); ++GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); ++GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); ++GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); ++GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); ++GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); ++GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei count, GLsizei *length, GLint *values); ++GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); ++GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); ++GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); ++GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); ++GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); ++GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); ++GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); ++GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); ++GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); ++GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); ++GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); ++GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei count, GLint *params); ++#endif ++#endif /* GL_ES_VERSION_3_0 */ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/GLES3/gl31.h b/build/ohos/ohos-sysroot/usr/include/GLES3/gl31.h +new file mode 100644 +index 0000000..502d6fe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/GLES3/gl31.h +@@ -0,0 +1,1507 @@ ++#ifndef __gles2_gl31_h_ ++#define __gles2_gl31_h_ 1 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** Copyright 2013-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: MIT ++** ++** This header is generated from the Khronos OpenGL / OpenGL ES XML ++** API Registry. The current version of the Registry, generator scripts ++** used to make the header, and the header can be found at ++** https://github.com/KhronosGroup/OpenGL-Registry ++*/ ++ ++#include ++ ++#ifndef GL_APIENTRYP ++#define GL_APIENTRYP GL_APIENTRY* ++#endif ++ ++#ifndef GL_GLES_PROTOTYPES ++#define GL_GLES_PROTOTYPES 1 ++#endif ++ ++/* Generated on date 20191013 */ ++ ++/* Generated C header for: ++ * API: gles2 ++ * Profile: common ++ * Versions considered: 2\.[0-9]|3\.[01] ++ * Versions emitted: .* ++ * Default extensions included: None ++ * Additional extensions included: _nomatch_^ ++ * Extensions removed: _nomatch_^ ++ */ ++ ++#ifndef GL_ES_VERSION_2_0 ++#define GL_ES_VERSION_2_0 1 ++#include ++typedef khronos_int8_t GLbyte; ++typedef khronos_float_t GLclampf; ++typedef khronos_int32_t GLfixed; ++typedef khronos_int16_t GLshort; ++typedef khronos_uint16_t GLushort; ++typedef void GLvoid; ++typedef struct __GLsync *GLsync; ++typedef khronos_int64_t GLint64; ++typedef khronos_uint64_t GLuint64; ++typedef unsigned int GLenum; ++typedef unsigned int GLuint; ++typedef char GLchar; ++typedef khronos_float_t GLfloat; ++typedef khronos_ssize_t GLsizeiptr; ++typedef khronos_intptr_t GLintptr; ++typedef unsigned int GLbitfield; ++typedef int GLint; ++typedef unsigned char GLboolean; ++typedef int GLsizei; ++typedef khronos_uint8_t GLubyte; ++#define GL_DEPTH_BUFFER_BIT 0x00000100 ++#define GL_STENCIL_BUFFER_BIT 0x00000400 ++#define GL_COLOR_BUFFER_BIT 0x00004000 ++#define GL_FALSE 0 ++#define GL_TRUE 1 ++#define GL_POINTS 0x0000 ++#define GL_LINES 0x0001 ++#define GL_LINE_LOOP 0x0002 ++#define GL_LINE_STRIP 0x0003 ++#define GL_TRIANGLES 0x0004 ++#define GL_TRIANGLE_STRIP 0x0005 ++#define GL_TRIANGLE_FAN 0x0006 ++#define GL_ZERO 0 ++#define GL_ONE 1 ++#define GL_SRC_COLOR 0x0300 ++#define GL_ONE_MINUS_SRC_COLOR 0x0301 ++#define GL_SRC_ALPHA 0x0302 ++#define GL_ONE_MINUS_SRC_ALPHA 0x0303 ++#define GL_DST_ALPHA 0x0304 ++#define GL_ONE_MINUS_DST_ALPHA 0x0305 ++#define GL_DST_COLOR 0x0306 ++#define GL_ONE_MINUS_DST_COLOR 0x0307 ++#define GL_SRC_ALPHA_SATURATE 0x0308 ++#define GL_FUNC_ADD 0x8006 ++#define GL_BLEND_EQUATION 0x8009 ++#define GL_BLEND_EQUATION_RGB 0x8009 ++#define GL_BLEND_EQUATION_ALPHA 0x883D ++#define GL_FUNC_SUBTRACT 0x800A ++#define GL_FUNC_REVERSE_SUBTRACT 0x800B ++#define GL_BLEND_DST_RGB 0x80C8 ++#define GL_BLEND_SRC_RGB 0x80C9 ++#define GL_BLEND_DST_ALPHA 0x80CA ++#define GL_BLEND_SRC_ALPHA 0x80CB ++#define GL_CONSTANT_COLOR 0x8001 ++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 ++#define GL_CONSTANT_ALPHA 0x8003 ++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 ++#define GL_BLEND_COLOR 0x8005 ++#define GL_ARRAY_BUFFER 0x8892 ++#define GL_ELEMENT_ARRAY_BUFFER 0x8893 ++#define GL_ARRAY_BUFFER_BINDING 0x8894 ++#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 ++#define GL_STREAM_DRAW 0x88E0 ++#define GL_STATIC_DRAW 0x88E4 ++#define GL_DYNAMIC_DRAW 0x88E8 ++#define GL_BUFFER_SIZE 0x8764 ++#define GL_BUFFER_USAGE 0x8765 ++#define GL_CURRENT_VERTEX_ATTRIB 0x8626 ++#define GL_FRONT 0x0404 ++#define GL_BACK 0x0405 ++#define GL_FRONT_AND_BACK 0x0408 ++#define GL_TEXTURE_2D 0x0DE1 ++#define GL_CULL_FACE 0x0B44 ++#define GL_BLEND 0x0BE2 ++#define GL_DITHER 0x0BD0 ++#define GL_STENCIL_TEST 0x0B90 ++#define GL_DEPTH_TEST 0x0B71 ++#define GL_SCISSOR_TEST 0x0C11 ++#define GL_POLYGON_OFFSET_FILL 0x8037 ++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E ++#define GL_SAMPLE_COVERAGE 0x80A0 ++#define GL_NO_ERROR 0 ++#define GL_INVALID_ENUM 0x0500 ++#define GL_INVALID_VALUE 0x0501 ++#define GL_INVALID_OPERATION 0x0502 ++#define GL_OUT_OF_MEMORY 0x0505 ++#define GL_CW 0x0900 ++#define GL_CCW 0x0901 ++#define GL_LINE_WIDTH 0x0B21 ++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D ++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E ++#define GL_CULL_FACE_MODE 0x0B45 ++#define GL_FRONT_FACE 0x0B46 ++#define GL_DEPTH_RANGE 0x0B70 ++#define GL_DEPTH_WRITEMASK 0x0B72 ++#define GL_DEPTH_CLEAR_VALUE 0x0B73 ++#define GL_DEPTH_FUNC 0x0B74 ++#define GL_STENCIL_CLEAR_VALUE 0x0B91 ++#define GL_STENCIL_FUNC 0x0B92 ++#define GL_STENCIL_FAIL 0x0B94 ++#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 ++#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 ++#define GL_STENCIL_REF 0x0B97 ++#define GL_STENCIL_VALUE_MASK 0x0B93 ++#define GL_STENCIL_WRITEMASK 0x0B98 ++#define GL_STENCIL_BACK_FUNC 0x8800 ++#define GL_STENCIL_BACK_FAIL 0x8801 ++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 ++#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 ++#define GL_STENCIL_BACK_REF 0x8CA3 ++#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 ++#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 ++#define GL_VIEWPORT 0x0BA2 ++#define GL_SCISSOR_BOX 0x0C10 ++#define GL_COLOR_CLEAR_VALUE 0x0C22 ++#define GL_COLOR_WRITEMASK 0x0C23 ++#define GL_UNPACK_ALIGNMENT 0x0CF5 ++#define GL_PACK_ALIGNMENT 0x0D05 ++#define GL_MAX_TEXTURE_SIZE 0x0D33 ++#define GL_MAX_VIEWPORT_DIMS 0x0D3A ++#define GL_SUBPIXEL_BITS 0x0D50 ++#define GL_RED_BITS 0x0D52 ++#define GL_GREEN_BITS 0x0D53 ++#define GL_BLUE_BITS 0x0D54 ++#define GL_ALPHA_BITS 0x0D55 ++#define GL_DEPTH_BITS 0x0D56 ++#define GL_STENCIL_BITS 0x0D57 ++#define GL_POLYGON_OFFSET_UNITS 0x2A00 ++#define GL_POLYGON_OFFSET_FACTOR 0x8038 ++#define GL_TEXTURE_BINDING_2D 0x8069 ++#define GL_SAMPLE_BUFFERS 0x80A8 ++#define GL_SAMPLES 0x80A9 ++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA ++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB ++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 ++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 ++#define GL_DONT_CARE 0x1100 ++#define GL_FASTEST 0x1101 ++#define GL_NICEST 0x1102 ++#define GL_GENERATE_MIPMAP_HINT 0x8192 ++#define GL_BYTE 0x1400 ++#define GL_UNSIGNED_BYTE 0x1401 ++#define GL_SHORT 0x1402 ++#define GL_UNSIGNED_SHORT 0x1403 ++#define GL_INT 0x1404 ++#define GL_UNSIGNED_INT 0x1405 ++#define GL_FLOAT 0x1406 ++#define GL_FIXED 0x140C ++#define GL_DEPTH_COMPONENT 0x1902 ++#define GL_ALPHA 0x1906 ++#define GL_RGB 0x1907 ++#define GL_RGBA 0x1908 ++#define GL_LUMINANCE 0x1909 ++#define GL_LUMINANCE_ALPHA 0x190A ++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 ++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 ++#define GL_UNSIGNED_SHORT_5_6_5 0x8363 ++#define GL_FRAGMENT_SHADER 0x8B30 ++#define GL_VERTEX_SHADER 0x8B31 ++#define GL_MAX_VERTEX_ATTRIBS 0x8869 ++#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB ++#define GL_MAX_VARYING_VECTORS 0x8DFC ++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D ++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C ++#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 ++#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD ++#define GL_SHADER_TYPE 0x8B4F ++#define GL_DELETE_STATUS 0x8B80 ++#define GL_LINK_STATUS 0x8B82 ++#define GL_VALIDATE_STATUS 0x8B83 ++#define GL_ATTACHED_SHADERS 0x8B85 ++#define GL_ACTIVE_UNIFORMS 0x8B86 ++#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 ++#define GL_ACTIVE_ATTRIBUTES 0x8B89 ++#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A ++#define GL_SHADING_LANGUAGE_VERSION 0x8B8C ++#define GL_CURRENT_PROGRAM 0x8B8D ++#define GL_NEVER 0x0200 ++#define GL_LESS 0x0201 ++#define GL_EQUAL 0x0202 ++#define GL_LEQUAL 0x0203 ++#define GL_GREATER 0x0204 ++#define GL_NOTEQUAL 0x0205 ++#define GL_GEQUAL 0x0206 ++#define GL_ALWAYS 0x0207 ++#define GL_KEEP 0x1E00 ++#define GL_REPLACE 0x1E01 ++#define GL_INCR 0x1E02 ++#define GL_DECR 0x1E03 ++#define GL_INVERT 0x150A ++#define GL_INCR_WRAP 0x8507 ++#define GL_DECR_WRAP 0x8508 ++#define GL_VENDOR 0x1F00 ++#define GL_RENDERER 0x1F01 ++#define GL_VERSION 0x1F02 ++#define GL_EXTENSIONS 0x1F03 ++#define GL_NEAREST 0x2600 ++#define GL_LINEAR 0x2601 ++#define GL_NEAREST_MIPMAP_NEAREST 0x2700 ++#define GL_LINEAR_MIPMAP_NEAREST 0x2701 ++#define GL_NEAREST_MIPMAP_LINEAR 0x2702 ++#define GL_LINEAR_MIPMAP_LINEAR 0x2703 ++#define GL_TEXTURE_MAG_FILTER 0x2800 ++#define GL_TEXTURE_MIN_FILTER 0x2801 ++#define GL_TEXTURE_WRAP_S 0x2802 ++#define GL_TEXTURE_WRAP_T 0x2803 ++#define GL_TEXTURE 0x1702 ++#define GL_TEXTURE_CUBE_MAP 0x8513 ++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A ++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C ++#define GL_TEXTURE0 0x84C0 ++#define GL_TEXTURE1 0x84C1 ++#define GL_TEXTURE2 0x84C2 ++#define GL_TEXTURE3 0x84C3 ++#define GL_TEXTURE4 0x84C4 ++#define GL_TEXTURE5 0x84C5 ++#define GL_TEXTURE6 0x84C6 ++#define GL_TEXTURE7 0x84C7 ++#define GL_TEXTURE8 0x84C8 ++#define GL_TEXTURE9 0x84C9 ++#define GL_TEXTURE10 0x84CA ++#define GL_TEXTURE11 0x84CB ++#define GL_TEXTURE12 0x84CC ++#define GL_TEXTURE13 0x84CD ++#define GL_TEXTURE14 0x84CE ++#define GL_TEXTURE15 0x84CF ++#define GL_TEXTURE16 0x84D0 ++#define GL_TEXTURE17 0x84D1 ++#define GL_TEXTURE18 0x84D2 ++#define GL_TEXTURE19 0x84D3 ++#define GL_TEXTURE20 0x84D4 ++#define GL_TEXTURE21 0x84D5 ++#define GL_TEXTURE22 0x84D6 ++#define GL_TEXTURE23 0x84D7 ++#define GL_TEXTURE24 0x84D8 ++#define GL_TEXTURE25 0x84D9 ++#define GL_TEXTURE26 0x84DA ++#define GL_TEXTURE27 0x84DB ++#define GL_TEXTURE28 0x84DC ++#define GL_TEXTURE29 0x84DD ++#define GL_TEXTURE30 0x84DE ++#define GL_TEXTURE31 0x84DF ++#define GL_ACTIVE_TEXTURE 0x84E0 ++#define GL_REPEAT 0x2901 ++#define GL_CLAMP_TO_EDGE 0x812F ++#define GL_MIRRORED_REPEAT 0x8370 ++#define GL_FLOAT_VEC2 0x8B50 ++#define GL_FLOAT_VEC3 0x8B51 ++#define GL_FLOAT_VEC4 0x8B52 ++#define GL_INT_VEC2 0x8B53 ++#define GL_INT_VEC3 0x8B54 ++#define GL_INT_VEC4 0x8B55 ++#define GL_BOOL 0x8B56 ++#define GL_BOOL_VEC2 0x8B57 ++#define GL_BOOL_VEC3 0x8B58 ++#define GL_BOOL_VEC4 0x8B59 ++#define GL_FLOAT_MAT2 0x8B5A ++#define GL_FLOAT_MAT3 0x8B5B ++#define GL_FLOAT_MAT4 0x8B5C ++#define GL_SAMPLER_2D 0x8B5E ++#define GL_SAMPLER_CUBE 0x8B60 ++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 ++#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 ++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 ++#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 ++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A ++#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 ++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F ++#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A ++#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B ++#define GL_COMPILE_STATUS 0x8B81 ++#define GL_INFO_LOG_LENGTH 0x8B84 ++#define GL_SHADER_SOURCE_LENGTH 0x8B88 ++#define GL_SHADER_COMPILER 0x8DFA ++#define GL_SHADER_BINARY_FORMATS 0x8DF8 ++#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 ++#define GL_LOW_FLOAT 0x8DF0 ++#define GL_MEDIUM_FLOAT 0x8DF1 ++#define GL_HIGH_FLOAT 0x8DF2 ++#define GL_LOW_INT 0x8DF3 ++#define GL_MEDIUM_INT 0x8DF4 ++#define GL_HIGH_INT 0x8DF5 ++#define GL_FRAMEBUFFER 0x8D40 ++#define GL_RENDERBUFFER 0x8D41 ++#define GL_RGBA4 0x8056 ++#define GL_RGB5_A1 0x8057 ++#define GL_RGB565 0x8D62 ++#define GL_DEPTH_COMPONENT16 0x81A5 ++#define GL_STENCIL_INDEX8 0x8D48 ++#define GL_RENDERBUFFER_WIDTH 0x8D42 ++#define GL_RENDERBUFFER_HEIGHT 0x8D43 ++#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 ++#define GL_RENDERBUFFER_RED_SIZE 0x8D50 ++#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 ++#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 ++#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 ++#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 ++#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 ++#define GL_COLOR_ATTACHMENT0 0x8CE0 ++#define GL_DEPTH_ATTACHMENT 0x8D00 ++#define GL_STENCIL_ATTACHMENT 0x8D20 ++#define GL_NONE 0 ++#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 ++#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 ++#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 ++#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 ++#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD ++#define GL_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_RENDERBUFFER_BINDING 0x8CA7 ++#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 ++#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 ++typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); ++typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); ++typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); ++typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); ++typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); ++typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); ++typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); ++typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); ++typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); ++typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); ++typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); ++typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); ++typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); ++typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); ++typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); ++typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); ++typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); ++typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); ++typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); ++typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); ++typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); ++typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); ++GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); ++GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); ++GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); ++GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); ++GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); ++GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); ++GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); ++GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); ++GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); ++GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); ++GL_APICALL void GL_APIENTRY glClearStencil (GLint s); ++GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); ++GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); ++GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); ++GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); ++GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); ++GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); ++GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); ++GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glDisable (GLenum cap); ++GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); ++GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glEnable (GLenum cap); ++GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glFinish (void); ++GL_APICALL void GL_APIENTRY glFlush (void); ++GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); ++GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); ++GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); ++GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL GLenum GL_APIENTRY glGetError (void); ++GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); ++GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); ++GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); ++GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); ++GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); ++GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); ++GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); ++GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); ++GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); ++GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); ++GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); ++GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); ++GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); ++GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); ++GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); ++GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); ++GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); ++GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); ++GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); ++GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); ++GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); ++GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); ++GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); ++GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); ++GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); ++GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); ++#endif ++#endif /* GL_ES_VERSION_2_0 */ ++ ++#ifndef GL_ES_VERSION_3_0 ++#define GL_ES_VERSION_3_0 1 ++typedef khronos_uint16_t GLhalf; ++#define GL_READ_BUFFER 0x0C02 ++#define GL_UNPACK_ROW_LENGTH 0x0CF2 ++#define GL_UNPACK_SKIP_ROWS 0x0CF3 ++#define GL_UNPACK_SKIP_PIXELS 0x0CF4 ++#define GL_PACK_ROW_LENGTH 0x0D02 ++#define GL_PACK_SKIP_ROWS 0x0D03 ++#define GL_PACK_SKIP_PIXELS 0x0D04 ++#define GL_COLOR 0x1800 ++#define GL_DEPTH 0x1801 ++#define GL_STENCIL 0x1802 ++#define GL_RED 0x1903 ++#define GL_RGB8 0x8051 ++#define GL_RGBA8 0x8058 ++#define GL_RGB10_A2 0x8059 ++#define GL_TEXTURE_BINDING_3D 0x806A ++#define GL_UNPACK_SKIP_IMAGES 0x806D ++#define GL_UNPACK_IMAGE_HEIGHT 0x806E ++#define GL_TEXTURE_3D 0x806F ++#define GL_TEXTURE_WRAP_R 0x8072 ++#define GL_MAX_3D_TEXTURE_SIZE 0x8073 ++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 ++#define GL_MAX_ELEMENTS_VERTICES 0x80E8 ++#define GL_MAX_ELEMENTS_INDICES 0x80E9 ++#define GL_TEXTURE_MIN_LOD 0x813A ++#define GL_TEXTURE_MAX_LOD 0x813B ++#define GL_TEXTURE_BASE_LEVEL 0x813C ++#define GL_TEXTURE_MAX_LEVEL 0x813D ++#define GL_MIN 0x8007 ++#define GL_MAX 0x8008 ++#define GL_DEPTH_COMPONENT24 0x81A6 ++#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD ++#define GL_TEXTURE_COMPARE_MODE 0x884C ++#define GL_TEXTURE_COMPARE_FUNC 0x884D ++#define GL_CURRENT_QUERY 0x8865 ++#define GL_QUERY_RESULT 0x8866 ++#define GL_QUERY_RESULT_AVAILABLE 0x8867 ++#define GL_BUFFER_MAPPED 0x88BC ++#define GL_BUFFER_MAP_POINTER 0x88BD ++#define GL_STREAM_READ 0x88E1 ++#define GL_STREAM_COPY 0x88E2 ++#define GL_STATIC_READ 0x88E5 ++#define GL_STATIC_COPY 0x88E6 ++#define GL_DYNAMIC_READ 0x88E9 ++#define GL_DYNAMIC_COPY 0x88EA ++#define GL_MAX_DRAW_BUFFERS 0x8824 ++#define GL_DRAW_BUFFER0 0x8825 ++#define GL_DRAW_BUFFER1 0x8826 ++#define GL_DRAW_BUFFER2 0x8827 ++#define GL_DRAW_BUFFER3 0x8828 ++#define GL_DRAW_BUFFER4 0x8829 ++#define GL_DRAW_BUFFER5 0x882A ++#define GL_DRAW_BUFFER6 0x882B ++#define GL_DRAW_BUFFER7 0x882C ++#define GL_DRAW_BUFFER8 0x882D ++#define GL_DRAW_BUFFER9 0x882E ++#define GL_DRAW_BUFFER10 0x882F ++#define GL_DRAW_BUFFER11 0x8830 ++#define GL_DRAW_BUFFER12 0x8831 ++#define GL_DRAW_BUFFER13 0x8832 ++#define GL_DRAW_BUFFER14 0x8833 ++#define GL_DRAW_BUFFER15 0x8834 ++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 ++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A ++#define GL_SAMPLER_3D 0x8B5F ++#define GL_SAMPLER_2D_SHADOW 0x8B62 ++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B ++#define GL_PIXEL_PACK_BUFFER 0x88EB ++#define GL_PIXEL_UNPACK_BUFFER 0x88EC ++#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED ++#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF ++#define GL_FLOAT_MAT2x3 0x8B65 ++#define GL_FLOAT_MAT2x4 0x8B66 ++#define GL_FLOAT_MAT3x2 0x8B67 ++#define GL_FLOAT_MAT3x4 0x8B68 ++#define GL_FLOAT_MAT4x2 0x8B69 ++#define GL_FLOAT_MAT4x3 0x8B6A ++#define GL_SRGB 0x8C40 ++#define GL_SRGB8 0x8C41 ++#define GL_SRGB8_ALPHA8 0x8C43 ++#define GL_COMPARE_REF_TO_TEXTURE 0x884E ++#define GL_MAJOR_VERSION 0x821B ++#define GL_MINOR_VERSION 0x821C ++#define GL_NUM_EXTENSIONS 0x821D ++#define GL_RGBA32F 0x8814 ++#define GL_RGB32F 0x8815 ++#define GL_RGBA16F 0x881A ++#define GL_RGB16F 0x881B ++#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD ++#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF ++#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 ++#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 ++#define GL_MAX_VARYING_COMPONENTS 0x8B4B ++#define GL_TEXTURE_2D_ARRAY 0x8C1A ++#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D ++#define GL_R11F_G11F_B10F 0x8C3A ++#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B ++#define GL_RGB9_E5 0x8C3D ++#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E ++#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 ++#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 ++#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 ++#define GL_RASTERIZER_DISCARD 0x8C89 ++#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B ++#define GL_INTERLEAVED_ATTRIBS 0x8C8C ++#define GL_SEPARATE_ATTRIBS 0x8C8D ++#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E ++#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F ++#define GL_RGBA32UI 0x8D70 ++#define GL_RGB32UI 0x8D71 ++#define GL_RGBA16UI 0x8D76 ++#define GL_RGB16UI 0x8D77 ++#define GL_RGBA8UI 0x8D7C ++#define GL_RGB8UI 0x8D7D ++#define GL_RGBA32I 0x8D82 ++#define GL_RGB32I 0x8D83 ++#define GL_RGBA16I 0x8D88 ++#define GL_RGB16I 0x8D89 ++#define GL_RGBA8I 0x8D8E ++#define GL_RGB8I 0x8D8F ++#define GL_RED_INTEGER 0x8D94 ++#define GL_RGB_INTEGER 0x8D98 ++#define GL_RGBA_INTEGER 0x8D99 ++#define GL_SAMPLER_2D_ARRAY 0x8DC1 ++#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 ++#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 ++#define GL_UNSIGNED_INT_VEC2 0x8DC6 ++#define GL_UNSIGNED_INT_VEC3 0x8DC7 ++#define GL_UNSIGNED_INT_VEC4 0x8DC8 ++#define GL_INT_SAMPLER_2D 0x8DCA ++#define GL_INT_SAMPLER_3D 0x8DCB ++#define GL_INT_SAMPLER_CUBE 0x8DCC ++#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF ++#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 ++#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 ++#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 ++#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 ++#define GL_BUFFER_ACCESS_FLAGS 0x911F ++#define GL_BUFFER_MAP_LENGTH 0x9120 ++#define GL_BUFFER_MAP_OFFSET 0x9121 ++#define GL_DEPTH_COMPONENT32F 0x8CAC ++#define GL_DEPTH32F_STENCIL8 0x8CAD ++#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD ++#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 ++#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 ++#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 ++#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 ++#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 ++#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 ++#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 ++#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 ++#define GL_FRAMEBUFFER_DEFAULT 0x8218 ++#define GL_FRAMEBUFFER_UNDEFINED 0x8219 ++#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A ++#define GL_DEPTH_STENCIL 0x84F9 ++#define GL_UNSIGNED_INT_24_8 0x84FA ++#define GL_DEPTH24_STENCIL8 0x88F0 ++#define GL_UNSIGNED_NORMALIZED 0x8C17 ++#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_READ_FRAMEBUFFER 0x8CA8 ++#define GL_DRAW_FRAMEBUFFER 0x8CA9 ++#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA ++#define GL_RENDERBUFFER_SAMPLES 0x8CAB ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 ++#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF ++#define GL_COLOR_ATTACHMENT1 0x8CE1 ++#define GL_COLOR_ATTACHMENT2 0x8CE2 ++#define GL_COLOR_ATTACHMENT3 0x8CE3 ++#define GL_COLOR_ATTACHMENT4 0x8CE4 ++#define GL_COLOR_ATTACHMENT5 0x8CE5 ++#define GL_COLOR_ATTACHMENT6 0x8CE6 ++#define GL_COLOR_ATTACHMENT7 0x8CE7 ++#define GL_COLOR_ATTACHMENT8 0x8CE8 ++#define GL_COLOR_ATTACHMENT9 0x8CE9 ++#define GL_COLOR_ATTACHMENT10 0x8CEA ++#define GL_COLOR_ATTACHMENT11 0x8CEB ++#define GL_COLOR_ATTACHMENT12 0x8CEC ++#define GL_COLOR_ATTACHMENT13 0x8CED ++#define GL_COLOR_ATTACHMENT14 0x8CEE ++#define GL_COLOR_ATTACHMENT15 0x8CEF ++#define GL_COLOR_ATTACHMENT16 0x8CF0 ++#define GL_COLOR_ATTACHMENT17 0x8CF1 ++#define GL_COLOR_ATTACHMENT18 0x8CF2 ++#define GL_COLOR_ATTACHMENT19 0x8CF3 ++#define GL_COLOR_ATTACHMENT20 0x8CF4 ++#define GL_COLOR_ATTACHMENT21 0x8CF5 ++#define GL_COLOR_ATTACHMENT22 0x8CF6 ++#define GL_COLOR_ATTACHMENT23 0x8CF7 ++#define GL_COLOR_ATTACHMENT24 0x8CF8 ++#define GL_COLOR_ATTACHMENT25 0x8CF9 ++#define GL_COLOR_ATTACHMENT26 0x8CFA ++#define GL_COLOR_ATTACHMENT27 0x8CFB ++#define GL_COLOR_ATTACHMENT28 0x8CFC ++#define GL_COLOR_ATTACHMENT29 0x8CFD ++#define GL_COLOR_ATTACHMENT30 0x8CFE ++#define GL_COLOR_ATTACHMENT31 0x8CFF ++#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 ++#define GL_MAX_SAMPLES 0x8D57 ++#define GL_HALF_FLOAT 0x140B ++#define GL_MAP_READ_BIT 0x0001 ++#define GL_MAP_WRITE_BIT 0x0002 ++#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 ++#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 ++#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 ++#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 ++#define GL_RG 0x8227 ++#define GL_RG_INTEGER 0x8228 ++#define GL_R8 0x8229 ++#define GL_RG8 0x822B ++#define GL_R16F 0x822D ++#define GL_R32F 0x822E ++#define GL_RG16F 0x822F ++#define GL_RG32F 0x8230 ++#define GL_R8I 0x8231 ++#define GL_R8UI 0x8232 ++#define GL_R16I 0x8233 ++#define GL_R16UI 0x8234 ++#define GL_R32I 0x8235 ++#define GL_R32UI 0x8236 ++#define GL_RG8I 0x8237 ++#define GL_RG8UI 0x8238 ++#define GL_RG16I 0x8239 ++#define GL_RG16UI 0x823A ++#define GL_RG32I 0x823B ++#define GL_RG32UI 0x823C ++#define GL_VERTEX_ARRAY_BINDING 0x85B5 ++#define GL_R8_SNORM 0x8F94 ++#define GL_RG8_SNORM 0x8F95 ++#define GL_RGB8_SNORM 0x8F96 ++#define GL_RGBA8_SNORM 0x8F97 ++#define GL_SIGNED_NORMALIZED 0x8F9C ++#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 ++#define GL_COPY_READ_BUFFER 0x8F36 ++#define GL_COPY_WRITE_BUFFER 0x8F37 ++#define GL_COPY_READ_BUFFER_BINDING 0x8F36 ++#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 ++#define GL_UNIFORM_BUFFER 0x8A11 ++#define GL_UNIFORM_BUFFER_BINDING 0x8A28 ++#define GL_UNIFORM_BUFFER_START 0x8A29 ++#define GL_UNIFORM_BUFFER_SIZE 0x8A2A ++#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B ++#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D ++#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E ++#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F ++#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 ++#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 ++#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 ++#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 ++#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 ++#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 ++#define GL_UNIFORM_TYPE 0x8A37 ++#define GL_UNIFORM_SIZE 0x8A38 ++#define GL_UNIFORM_NAME_LENGTH 0x8A39 ++#define GL_UNIFORM_BLOCK_INDEX 0x8A3A ++#define GL_UNIFORM_OFFSET 0x8A3B ++#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C ++#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D ++#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E ++#define GL_UNIFORM_BLOCK_BINDING 0x8A3F ++#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 ++#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 ++#define GL_INVALID_INDEX 0xFFFFFFFFu ++#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 ++#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 ++#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 ++#define GL_OBJECT_TYPE 0x9112 ++#define GL_SYNC_CONDITION 0x9113 ++#define GL_SYNC_STATUS 0x9114 ++#define GL_SYNC_FLAGS 0x9115 ++#define GL_SYNC_FENCE 0x9116 ++#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 ++#define GL_UNSIGNALED 0x9118 ++#define GL_SIGNALED 0x9119 ++#define GL_ALREADY_SIGNALED 0x911A ++#define GL_TIMEOUT_EXPIRED 0x911B ++#define GL_CONDITION_SATISFIED 0x911C ++#define GL_WAIT_FAILED 0x911D ++#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 ++#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull ++#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE ++#define GL_ANY_SAMPLES_PASSED 0x8C2F ++#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A ++#define GL_SAMPLER_BINDING 0x8919 ++#define GL_RGB10_A2UI 0x906F ++#define GL_TEXTURE_SWIZZLE_R 0x8E42 ++#define GL_TEXTURE_SWIZZLE_G 0x8E43 ++#define GL_TEXTURE_SWIZZLE_B 0x8E44 ++#define GL_TEXTURE_SWIZZLE_A 0x8E45 ++#define GL_GREEN 0x1904 ++#define GL_BLUE 0x1905 ++#define GL_INT_2_10_10_10_REV 0x8D9F ++#define GL_TRANSFORM_FEEDBACK 0x8E22 ++#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 ++#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 ++#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 ++#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 ++#define GL_PROGRAM_BINARY_LENGTH 0x8741 ++#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE ++#define GL_PROGRAM_BINARY_FORMATS 0x87FF ++#define GL_COMPRESSED_R11_EAC 0x9270 ++#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 ++#define GL_COMPRESSED_RG11_EAC 0x9272 ++#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 ++#define GL_COMPRESSED_RGB8_ETC2 0x9274 ++#define GL_COMPRESSED_SRGB8_ETC2 0x9275 ++#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 ++#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 ++#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 ++#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F ++#define GL_MAX_ELEMENT_INDEX 0x8D6B ++#define GL_NUM_SAMPLE_COUNTS 0x9380 ++#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF ++typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); ++typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); ++typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); ++typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); ++typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); ++typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); ++typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); ++typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); ++typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); ++typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); ++typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); ++typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); ++typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); ++typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); ++typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); ++typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); ++typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); ++typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); ++GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); ++GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); ++GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); ++GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); ++GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); ++GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); ++GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); ++GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); ++GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); ++GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); ++GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); ++GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); ++GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); ++GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); ++GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); ++GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); ++GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); ++GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); ++GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); ++GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); ++GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); ++GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); ++GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); ++GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); ++GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); ++GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); ++GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); ++GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); ++GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); ++GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); ++GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); ++GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); ++GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); ++GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); ++GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); ++GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); ++GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); ++#endif ++#endif /* GL_ES_VERSION_3_0 */ ++ ++#ifndef GL_ES_VERSION_3_1 ++#define GL_ES_VERSION_3_1 1 ++#define GL_COMPUTE_SHADER 0x91B9 ++#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB ++#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC ++#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD ++#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 ++#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 ++#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 ++#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 ++#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 ++#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB ++#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE ++#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF ++#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 ++#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE ++#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF ++#define GL_COMPUTE_SHADER_BIT 0x00000020 ++#define GL_DRAW_INDIRECT_BUFFER 0x8F3F ++#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 ++#define GL_MAX_UNIFORM_LOCATIONS 0x826E ++#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 ++#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 ++#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 ++#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 ++#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 ++#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 ++#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 ++#define GL_UNIFORM 0x92E1 ++#define GL_UNIFORM_BLOCK 0x92E2 ++#define GL_PROGRAM_INPUT 0x92E3 ++#define GL_PROGRAM_OUTPUT 0x92E4 ++#define GL_BUFFER_VARIABLE 0x92E5 ++#define GL_SHADER_STORAGE_BLOCK 0x92E6 ++#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 ++#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 ++#define GL_ACTIVE_RESOURCES 0x92F5 ++#define GL_MAX_NAME_LENGTH 0x92F6 ++#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 ++#define GL_NAME_LENGTH 0x92F9 ++#define GL_TYPE 0x92FA ++#define GL_ARRAY_SIZE 0x92FB ++#define GL_OFFSET 0x92FC ++#define GL_BLOCK_INDEX 0x92FD ++#define GL_ARRAY_STRIDE 0x92FE ++#define GL_MATRIX_STRIDE 0x92FF ++#define GL_IS_ROW_MAJOR 0x9300 ++#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 ++#define GL_BUFFER_BINDING 0x9302 ++#define GL_BUFFER_DATA_SIZE 0x9303 ++#define GL_NUM_ACTIVE_VARIABLES 0x9304 ++#define GL_ACTIVE_VARIABLES 0x9305 ++#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 ++#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A ++#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B ++#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C ++#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D ++#define GL_LOCATION 0x930E ++#define GL_VERTEX_SHADER_BIT 0x00000001 ++#define GL_FRAGMENT_SHADER_BIT 0x00000002 ++#define GL_ALL_SHADER_BITS 0xFFFFFFFF ++#define GL_PROGRAM_SEPARABLE 0x8258 ++#define GL_ACTIVE_PROGRAM 0x8259 ++#define GL_PROGRAM_PIPELINE_BINDING 0x825A ++#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 ++#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 ++#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 ++#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC ++#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 ++#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 ++#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 ++#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 ++#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 ++#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 ++#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC ++#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 ++#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB ++#define GL_MAX_IMAGE_UNITS 0x8F38 ++#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA ++#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE ++#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF ++#define GL_IMAGE_BINDING_NAME 0x8F3A ++#define GL_IMAGE_BINDING_LEVEL 0x8F3B ++#define GL_IMAGE_BINDING_LAYERED 0x8F3C ++#define GL_IMAGE_BINDING_LAYER 0x8F3D ++#define GL_IMAGE_BINDING_ACCESS 0x8F3E ++#define GL_IMAGE_BINDING_FORMAT 0x906E ++#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 ++#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 ++#define GL_UNIFORM_BARRIER_BIT 0x00000004 ++#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 ++#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 ++#define GL_COMMAND_BARRIER_BIT 0x00000040 ++#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 ++#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 ++#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 ++#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 ++#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 ++#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 ++#define GL_ALL_BARRIER_BITS 0xFFFFFFFF ++#define GL_IMAGE_2D 0x904D ++#define GL_IMAGE_3D 0x904E ++#define GL_IMAGE_CUBE 0x9050 ++#define GL_IMAGE_2D_ARRAY 0x9053 ++#define GL_INT_IMAGE_2D 0x9058 ++#define GL_INT_IMAGE_3D 0x9059 ++#define GL_INT_IMAGE_CUBE 0x905B ++#define GL_INT_IMAGE_2D_ARRAY 0x905E ++#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 ++#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 ++#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 ++#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 ++#define GL_READ_ONLY 0x88B8 ++#define GL_WRITE_ONLY 0x88B9 ++#define GL_READ_WRITE 0x88BA ++#define GL_SHADER_STORAGE_BUFFER 0x90D2 ++#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 ++#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 ++#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 ++#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 ++#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA ++#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB ++#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC ++#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD ++#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE ++#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF ++#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 ++#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 ++#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA ++#define GL_STENCIL_INDEX 0x1901 ++#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E ++#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F ++#define GL_SAMPLE_POSITION 0x8E50 ++#define GL_SAMPLE_MASK 0x8E51 ++#define GL_SAMPLE_MASK_VALUE 0x8E52 ++#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 ++#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 ++#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E ++#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F ++#define GL_MAX_INTEGER_SAMPLES 0x9110 ++#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 ++#define GL_TEXTURE_SAMPLES 0x9106 ++#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 ++#define GL_TEXTURE_WIDTH 0x1000 ++#define GL_TEXTURE_HEIGHT 0x1001 ++#define GL_TEXTURE_DEPTH 0x8071 ++#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 ++#define GL_TEXTURE_RED_SIZE 0x805C ++#define GL_TEXTURE_GREEN_SIZE 0x805D ++#define GL_TEXTURE_BLUE_SIZE 0x805E ++#define GL_TEXTURE_ALPHA_SIZE 0x805F ++#define GL_TEXTURE_DEPTH_SIZE 0x884A ++#define GL_TEXTURE_STENCIL_SIZE 0x88F1 ++#define GL_TEXTURE_SHARED_SIZE 0x8C3F ++#define GL_TEXTURE_RED_TYPE 0x8C10 ++#define GL_TEXTURE_GREEN_TYPE 0x8C11 ++#define GL_TEXTURE_BLUE_TYPE 0x8C12 ++#define GL_TEXTURE_ALPHA_TYPE 0x8C13 ++#define GL_TEXTURE_DEPTH_TYPE 0x8C16 ++#define GL_TEXTURE_COMPRESSED 0x86A1 ++#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 ++#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 ++#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A ++#define GL_VERTEX_ATTRIB_BINDING 0x82D4 ++#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 ++#define GL_VERTEX_BINDING_DIVISOR 0x82D6 ++#define GL_VERTEX_BINDING_OFFSET 0x82D7 ++#define GL_VERTEX_BINDING_STRIDE 0x82D8 ++#define GL_VERTEX_BINDING_BUFFER 0x8F4F ++#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 ++#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA ++#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 ++typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); ++typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); ++typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); ++typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); ++typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); ++typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); ++typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); ++typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); ++typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); ++typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); ++typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); ++typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); ++typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); ++typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); ++typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); ++GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); ++GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); ++GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); ++GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); ++GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); ++GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); ++GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); ++GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); ++GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); ++GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); ++GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); ++GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); ++GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); ++GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); ++GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); ++GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); ++GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); ++GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); ++GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); ++GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); ++GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); ++GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); ++GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); ++#endif ++#endif /* GL_ES_VERSION_3_1 */ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/GLES3/gl32.h b/build/ohos/ohos-sysroot/usr/include/GLES3/gl32.h +new file mode 100644 +index 0000000..ae56b0e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/GLES3/gl32.h +@@ -0,0 +1,1808 @@ ++#ifndef __gles2_gl32_h_ ++#define __gles2_gl32_h_ 1 ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/* ++** Copyright 2013-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: MIT ++** ++** This header is generated from the Khronos OpenGL / OpenGL ES XML ++** API Registry. The current version of the Registry, generator scripts ++** used to make the header, and the header can be found at ++** https://github.com/KhronosGroup/OpenGL-Registry ++*/ ++ ++#include ++ ++#ifndef GL_APIENTRYP ++#define GL_APIENTRYP GL_APIENTRY* ++#endif ++ ++#ifndef GL_GLES_PROTOTYPES ++#define GL_GLES_PROTOTYPES 1 ++#endif ++ ++/* Generated on date 20191013 */ ++ ++/* Generated C header for: ++ * API: gles2 ++ * Profile: common ++ * Versions considered: 2\.[0-9]|3\.[012] ++ * Versions emitted: .* ++ * Default extensions included: None ++ * Additional extensions included: _nomatch_^ ++ * Extensions removed: _nomatch_^ ++ */ ++ ++#ifndef GL_ES_VERSION_2_0 ++#define GL_ES_VERSION_2_0 1 ++#include ++typedef khronos_int8_t GLbyte; ++typedef khronos_float_t GLclampf; ++typedef khronos_int32_t GLfixed; ++typedef khronos_int16_t GLshort; ++typedef khronos_uint16_t GLushort; ++typedef void GLvoid; ++typedef struct __GLsync *GLsync; ++typedef khronos_int64_t GLint64; ++typedef khronos_uint64_t GLuint64; ++typedef unsigned int GLenum; ++typedef unsigned int GLuint; ++typedef char GLchar; ++typedef khronos_float_t GLfloat; ++typedef khronos_ssize_t GLsizeiptr; ++typedef khronos_intptr_t GLintptr; ++typedef unsigned int GLbitfield; ++typedef int GLint; ++typedef unsigned char GLboolean; ++typedef int GLsizei; ++typedef khronos_uint8_t GLubyte; ++#define GL_DEPTH_BUFFER_BIT 0x00000100 ++#define GL_STENCIL_BUFFER_BIT 0x00000400 ++#define GL_COLOR_BUFFER_BIT 0x00004000 ++#define GL_FALSE 0 ++#define GL_TRUE 1 ++#define GL_POINTS 0x0000 ++#define GL_LINES 0x0001 ++#define GL_LINE_LOOP 0x0002 ++#define GL_LINE_STRIP 0x0003 ++#define GL_TRIANGLES 0x0004 ++#define GL_TRIANGLE_STRIP 0x0005 ++#define GL_TRIANGLE_FAN 0x0006 ++#define GL_ZERO 0 ++#define GL_ONE 1 ++#define GL_SRC_COLOR 0x0300 ++#define GL_ONE_MINUS_SRC_COLOR 0x0301 ++#define GL_SRC_ALPHA 0x0302 ++#define GL_ONE_MINUS_SRC_ALPHA 0x0303 ++#define GL_DST_ALPHA 0x0304 ++#define GL_ONE_MINUS_DST_ALPHA 0x0305 ++#define GL_DST_COLOR 0x0306 ++#define GL_ONE_MINUS_DST_COLOR 0x0307 ++#define GL_SRC_ALPHA_SATURATE 0x0308 ++#define GL_FUNC_ADD 0x8006 ++#define GL_BLEND_EQUATION 0x8009 ++#define GL_BLEND_EQUATION_RGB 0x8009 ++#define GL_BLEND_EQUATION_ALPHA 0x883D ++#define GL_FUNC_SUBTRACT 0x800A ++#define GL_FUNC_REVERSE_SUBTRACT 0x800B ++#define GL_BLEND_DST_RGB 0x80C8 ++#define GL_BLEND_SRC_RGB 0x80C9 ++#define GL_BLEND_DST_ALPHA 0x80CA ++#define GL_BLEND_SRC_ALPHA 0x80CB ++#define GL_CONSTANT_COLOR 0x8001 ++#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 ++#define GL_CONSTANT_ALPHA 0x8003 ++#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 ++#define GL_BLEND_COLOR 0x8005 ++#define GL_ARRAY_BUFFER 0x8892 ++#define GL_ELEMENT_ARRAY_BUFFER 0x8893 ++#define GL_ARRAY_BUFFER_BINDING 0x8894 ++#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895 ++#define GL_STREAM_DRAW 0x88E0 ++#define GL_STATIC_DRAW 0x88E4 ++#define GL_DYNAMIC_DRAW 0x88E8 ++#define GL_BUFFER_SIZE 0x8764 ++#define GL_BUFFER_USAGE 0x8765 ++#define GL_CURRENT_VERTEX_ATTRIB 0x8626 ++#define GL_FRONT 0x0404 ++#define GL_BACK 0x0405 ++#define GL_FRONT_AND_BACK 0x0408 ++#define GL_TEXTURE_2D 0x0DE1 ++#define GL_CULL_FACE 0x0B44 ++#define GL_BLEND 0x0BE2 ++#define GL_DITHER 0x0BD0 ++#define GL_STENCIL_TEST 0x0B90 ++#define GL_DEPTH_TEST 0x0B71 ++#define GL_SCISSOR_TEST 0x0C11 ++#define GL_POLYGON_OFFSET_FILL 0x8037 ++#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E ++#define GL_SAMPLE_COVERAGE 0x80A0 ++#define GL_NO_ERROR 0 ++#define GL_INVALID_ENUM 0x0500 ++#define GL_INVALID_VALUE 0x0501 ++#define GL_INVALID_OPERATION 0x0502 ++#define GL_OUT_OF_MEMORY 0x0505 ++#define GL_CW 0x0900 ++#define GL_CCW 0x0901 ++#define GL_LINE_WIDTH 0x0B21 ++#define GL_ALIASED_POINT_SIZE_RANGE 0x846D ++#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E ++#define GL_CULL_FACE_MODE 0x0B45 ++#define GL_FRONT_FACE 0x0B46 ++#define GL_DEPTH_RANGE 0x0B70 ++#define GL_DEPTH_WRITEMASK 0x0B72 ++#define GL_DEPTH_CLEAR_VALUE 0x0B73 ++#define GL_DEPTH_FUNC 0x0B74 ++#define GL_STENCIL_CLEAR_VALUE 0x0B91 ++#define GL_STENCIL_FUNC 0x0B92 ++#define GL_STENCIL_FAIL 0x0B94 ++#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 ++#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 ++#define GL_STENCIL_REF 0x0B97 ++#define GL_STENCIL_VALUE_MASK 0x0B93 ++#define GL_STENCIL_WRITEMASK 0x0B98 ++#define GL_STENCIL_BACK_FUNC 0x8800 ++#define GL_STENCIL_BACK_FAIL 0x8801 ++#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802 ++#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803 ++#define GL_STENCIL_BACK_REF 0x8CA3 ++#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4 ++#define GL_STENCIL_BACK_WRITEMASK 0x8CA5 ++#define GL_VIEWPORT 0x0BA2 ++#define GL_SCISSOR_BOX 0x0C10 ++#define GL_COLOR_CLEAR_VALUE 0x0C22 ++#define GL_COLOR_WRITEMASK 0x0C23 ++#define GL_UNPACK_ALIGNMENT 0x0CF5 ++#define GL_PACK_ALIGNMENT 0x0D05 ++#define GL_MAX_TEXTURE_SIZE 0x0D33 ++#define GL_MAX_VIEWPORT_DIMS 0x0D3A ++#define GL_SUBPIXEL_BITS 0x0D50 ++#define GL_RED_BITS 0x0D52 ++#define GL_GREEN_BITS 0x0D53 ++#define GL_BLUE_BITS 0x0D54 ++#define GL_ALPHA_BITS 0x0D55 ++#define GL_DEPTH_BITS 0x0D56 ++#define GL_STENCIL_BITS 0x0D57 ++#define GL_POLYGON_OFFSET_UNITS 0x2A00 ++#define GL_POLYGON_OFFSET_FACTOR 0x8038 ++#define GL_TEXTURE_BINDING_2D 0x8069 ++#define GL_SAMPLE_BUFFERS 0x80A8 ++#define GL_SAMPLES 0x80A9 ++#define GL_SAMPLE_COVERAGE_VALUE 0x80AA ++#define GL_SAMPLE_COVERAGE_INVERT 0x80AB ++#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2 ++#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3 ++#define GL_DONT_CARE 0x1100 ++#define GL_FASTEST 0x1101 ++#define GL_NICEST 0x1102 ++#define GL_GENERATE_MIPMAP_HINT 0x8192 ++#define GL_BYTE 0x1400 ++#define GL_UNSIGNED_BYTE 0x1401 ++#define GL_SHORT 0x1402 ++#define GL_UNSIGNED_SHORT 0x1403 ++#define GL_INT 0x1404 ++#define GL_UNSIGNED_INT 0x1405 ++#define GL_FLOAT 0x1406 ++#define GL_FIXED 0x140C ++#define GL_DEPTH_COMPONENT 0x1902 ++#define GL_ALPHA 0x1906 ++#define GL_RGB 0x1907 ++#define GL_RGBA 0x1908 ++#define GL_LUMINANCE 0x1909 ++#define GL_LUMINANCE_ALPHA 0x190A ++#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 ++#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 ++#define GL_UNSIGNED_SHORT_5_6_5 0x8363 ++#define GL_FRAGMENT_SHADER 0x8B30 ++#define GL_VERTEX_SHADER 0x8B31 ++#define GL_MAX_VERTEX_ATTRIBS 0x8869 ++#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB ++#define GL_MAX_VARYING_VECTORS 0x8DFC ++#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D ++#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C ++#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872 ++#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD ++#define GL_SHADER_TYPE 0x8B4F ++#define GL_DELETE_STATUS 0x8B80 ++#define GL_LINK_STATUS 0x8B82 ++#define GL_VALIDATE_STATUS 0x8B83 ++#define GL_ATTACHED_SHADERS 0x8B85 ++#define GL_ACTIVE_UNIFORMS 0x8B86 ++#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87 ++#define GL_ACTIVE_ATTRIBUTES 0x8B89 ++#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A ++#define GL_SHADING_LANGUAGE_VERSION 0x8B8C ++#define GL_CURRENT_PROGRAM 0x8B8D ++#define GL_NEVER 0x0200 ++#define GL_LESS 0x0201 ++#define GL_EQUAL 0x0202 ++#define GL_LEQUAL 0x0203 ++#define GL_GREATER 0x0204 ++#define GL_NOTEQUAL 0x0205 ++#define GL_GEQUAL 0x0206 ++#define GL_ALWAYS 0x0207 ++#define GL_KEEP 0x1E00 ++#define GL_REPLACE 0x1E01 ++#define GL_INCR 0x1E02 ++#define GL_DECR 0x1E03 ++#define GL_INVERT 0x150A ++#define GL_INCR_WRAP 0x8507 ++#define GL_DECR_WRAP 0x8508 ++#define GL_VENDOR 0x1F00 ++#define GL_RENDERER 0x1F01 ++#define GL_VERSION 0x1F02 ++#define GL_EXTENSIONS 0x1F03 ++#define GL_NEAREST 0x2600 ++#define GL_LINEAR 0x2601 ++#define GL_NEAREST_MIPMAP_NEAREST 0x2700 ++#define GL_LINEAR_MIPMAP_NEAREST 0x2701 ++#define GL_NEAREST_MIPMAP_LINEAR 0x2702 ++#define GL_LINEAR_MIPMAP_LINEAR 0x2703 ++#define GL_TEXTURE_MAG_FILTER 0x2800 ++#define GL_TEXTURE_MIN_FILTER 0x2801 ++#define GL_TEXTURE_WRAP_S 0x2802 ++#define GL_TEXTURE_WRAP_T 0x2803 ++#define GL_TEXTURE 0x1702 ++#define GL_TEXTURE_CUBE_MAP 0x8513 ++#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 ++#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 ++#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A ++#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C ++#define GL_TEXTURE0 0x84C0 ++#define GL_TEXTURE1 0x84C1 ++#define GL_TEXTURE2 0x84C2 ++#define GL_TEXTURE3 0x84C3 ++#define GL_TEXTURE4 0x84C4 ++#define GL_TEXTURE5 0x84C5 ++#define GL_TEXTURE6 0x84C6 ++#define GL_TEXTURE7 0x84C7 ++#define GL_TEXTURE8 0x84C8 ++#define GL_TEXTURE9 0x84C9 ++#define GL_TEXTURE10 0x84CA ++#define GL_TEXTURE11 0x84CB ++#define GL_TEXTURE12 0x84CC ++#define GL_TEXTURE13 0x84CD ++#define GL_TEXTURE14 0x84CE ++#define GL_TEXTURE15 0x84CF ++#define GL_TEXTURE16 0x84D0 ++#define GL_TEXTURE17 0x84D1 ++#define GL_TEXTURE18 0x84D2 ++#define GL_TEXTURE19 0x84D3 ++#define GL_TEXTURE20 0x84D4 ++#define GL_TEXTURE21 0x84D5 ++#define GL_TEXTURE22 0x84D6 ++#define GL_TEXTURE23 0x84D7 ++#define GL_TEXTURE24 0x84D8 ++#define GL_TEXTURE25 0x84D9 ++#define GL_TEXTURE26 0x84DA ++#define GL_TEXTURE27 0x84DB ++#define GL_TEXTURE28 0x84DC ++#define GL_TEXTURE29 0x84DD ++#define GL_TEXTURE30 0x84DE ++#define GL_TEXTURE31 0x84DF ++#define GL_ACTIVE_TEXTURE 0x84E0 ++#define GL_REPEAT 0x2901 ++#define GL_CLAMP_TO_EDGE 0x812F ++#define GL_MIRRORED_REPEAT 0x8370 ++#define GL_FLOAT_VEC2 0x8B50 ++#define GL_FLOAT_VEC3 0x8B51 ++#define GL_FLOAT_VEC4 0x8B52 ++#define GL_INT_VEC2 0x8B53 ++#define GL_INT_VEC3 0x8B54 ++#define GL_INT_VEC4 0x8B55 ++#define GL_BOOL 0x8B56 ++#define GL_BOOL_VEC2 0x8B57 ++#define GL_BOOL_VEC3 0x8B58 ++#define GL_BOOL_VEC4 0x8B59 ++#define GL_FLOAT_MAT2 0x8B5A ++#define GL_FLOAT_MAT3 0x8B5B ++#define GL_FLOAT_MAT4 0x8B5C ++#define GL_SAMPLER_2D 0x8B5E ++#define GL_SAMPLER_CUBE 0x8B60 ++#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622 ++#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623 ++#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624 ++#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625 ++#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A ++#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645 ++#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F ++#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A ++#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B ++#define GL_COMPILE_STATUS 0x8B81 ++#define GL_INFO_LOG_LENGTH 0x8B84 ++#define GL_SHADER_SOURCE_LENGTH 0x8B88 ++#define GL_SHADER_COMPILER 0x8DFA ++#define GL_SHADER_BINARY_FORMATS 0x8DF8 ++#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9 ++#define GL_LOW_FLOAT 0x8DF0 ++#define GL_MEDIUM_FLOAT 0x8DF1 ++#define GL_HIGH_FLOAT 0x8DF2 ++#define GL_LOW_INT 0x8DF3 ++#define GL_MEDIUM_INT 0x8DF4 ++#define GL_HIGH_INT 0x8DF5 ++#define GL_FRAMEBUFFER 0x8D40 ++#define GL_RENDERBUFFER 0x8D41 ++#define GL_RGBA4 0x8056 ++#define GL_RGB5_A1 0x8057 ++#define GL_RGB565 0x8D62 ++#define GL_DEPTH_COMPONENT16 0x81A5 ++#define GL_STENCIL_INDEX8 0x8D48 ++#define GL_RENDERBUFFER_WIDTH 0x8D42 ++#define GL_RENDERBUFFER_HEIGHT 0x8D43 ++#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44 ++#define GL_RENDERBUFFER_RED_SIZE 0x8D50 ++#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51 ++#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52 ++#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53 ++#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54 ++#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0 ++#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2 ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3 ++#define GL_COLOR_ATTACHMENT0 0x8CE0 ++#define GL_DEPTH_ATTACHMENT 0x8D00 ++#define GL_STENCIL_ATTACHMENT 0x8D20 ++#define GL_NONE 0 ++#define GL_FRAMEBUFFER_COMPLETE 0x8CD5 ++#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6 ++#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7 ++#define GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS 0x8CD9 ++#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD ++#define GL_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_RENDERBUFFER_BINDING 0x8CA7 ++#define GL_MAX_RENDERBUFFER_SIZE 0x84E8 ++#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506 ++typedef void (GL_APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture); ++typedef void (GL_APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer); ++typedef void (GL_APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture); ++typedef void (GL_APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++typedef void (GL_APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++typedef void (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++typedef GLenum (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask); ++typedef void (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++typedef void (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d); ++typedef void (GL_APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s); ++typedef void (GL_APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++typedef void (GL_APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef GLuint (GL_APIENTRYP PFNGLCREATEPROGRAMPROC) (void); ++typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROC) (GLenum type); ++typedef void (GL_APIENTRYP PFNGLCULLFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func); ++typedef void (GL_APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag); ++typedef void (GL_APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f); ++typedef void (GL_APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader); ++typedef void (GL_APIENTRYP PFNGLDISABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLENABLEPROC) (GLenum cap); ++typedef void (GL_APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index); ++typedef void (GL_APIENTRYP PFNGLFINISHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFLUSHPROC) (void); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++typedef void (GL_APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode); ++typedef void (GL_APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers); ++typedef void (GL_APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers); ++typedef void (GL_APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers); ++typedef void (GL_APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++typedef GLint (GL_APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef GLenum (GL_APIENTRYP PFNGLGETERRORPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *data); ++typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *data); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++typedef void (GL_APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGPROC) (GLenum name); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, void **pointer); ++typedef void (GL_APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode); ++typedef GLboolean (GL_APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDPROC) (GLenum cap); ++typedef GLboolean (GL_APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPROC) (GLuint program); ++typedef GLboolean (GL_APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer); ++typedef GLboolean (GL_APIENTRYP PFNGLISSHADERPROC) (GLuint shader); ++typedef GLboolean (GL_APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture); ++typedef void (GL_APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width); ++typedef void (GL_APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units); ++typedef void (GL_APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++typedef void (GL_APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert); ++typedef void (GL_APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass); ++typedef void (GL_APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glActiveTexture (GLenum texture); ++GL_APICALL void GL_APIENTRY glAttachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name); ++GL_APICALL void GL_APIENTRY glBindBuffer (GLenum target, GLuint buffer); ++GL_APICALL void GL_APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer); ++GL_APICALL void GL_APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glBindTexture (GLenum target, GLuint texture); ++GL_APICALL void GL_APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glBlendEquation (GLenum mode); ++GL_APICALL void GL_APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha); ++GL_APICALL void GL_APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor); ++GL_APICALL void GL_APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); ++GL_APICALL void GL_APIENTRY glBufferData (GLenum target, GLsizeiptr size, const void *data, GLenum usage); ++GL_APICALL void GL_APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const void *data); ++GL_APICALL GLenum GL_APIENTRY glCheckFramebufferStatus (GLenum target); ++GL_APICALL void GL_APIENTRY glClear (GLbitfield mask); ++GL_APICALL void GL_APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha); ++GL_APICALL void GL_APIENTRY glClearDepthf (GLfloat d); ++GL_APICALL void GL_APIENTRY glClearStencil (GLint s); ++GL_APICALL void GL_APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); ++GL_APICALL void GL_APIENTRY glCompileShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL GLuint GL_APIENTRY glCreateProgram (void); ++GL_APICALL GLuint GL_APIENTRY glCreateShader (GLenum type); ++GL_APICALL void GL_APIENTRY glCullFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers); ++GL_APICALL void GL_APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glDeleteProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glDeleteShader (GLuint shader); ++GL_APICALL void GL_APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures); ++GL_APICALL void GL_APIENTRY glDepthFunc (GLenum func); ++GL_APICALL void GL_APIENTRY glDepthMask (GLboolean flag); ++GL_APICALL void GL_APIENTRY glDepthRangef (GLfloat n, GLfloat f); ++GL_APICALL void GL_APIENTRY glDetachShader (GLuint program, GLuint shader); ++GL_APICALL void GL_APIENTRY glDisable (GLenum cap); ++GL_APICALL void GL_APIENTRY glDisableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count); ++GL_APICALL void GL_APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glEnable (GLenum cap); ++GL_APICALL void GL_APIENTRY glEnableVertexAttribArray (GLuint index); ++GL_APICALL void GL_APIENTRY glFinish (void); ++GL_APICALL void GL_APIENTRY glFlush (void); ++GL_APICALL void GL_APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer); ++GL_APICALL void GL_APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level); ++GL_APICALL void GL_APIENTRY glFrontFace (GLenum mode); ++GL_APICALL void GL_APIENTRY glGenBuffers (GLsizei n, GLuint *buffers); ++GL_APICALL void GL_APIENTRY glGenerateMipmap (GLenum target); ++GL_APICALL void GL_APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers); ++GL_APICALL void GL_APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers); ++GL_APICALL void GL_APIENTRY glGenTextures (GLsizei n, GLuint *textures); ++GL_APICALL void GL_APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders); ++GL_APICALL GLint GL_APIENTRY glGetAttribLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetBooleanv (GLenum pname, GLboolean *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL GLenum GL_APIENTRY glGetError (void); ++GL_APICALL void GL_APIENTRY glGetFloatv (GLenum pname, GLfloat *data); ++GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetIntegerv (GLenum pname, GLint *data); ++GL_APICALL void GL_APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision); ++GL_APICALL void GL_APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source); ++GL_APICALL const GLubyte *GL_APIENTRY glGetString (GLenum name); ++GL_APICALL void GL_APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params); ++GL_APICALL GLint GL_APIENTRY glGetUniformLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, void **pointer); ++GL_APICALL void GL_APIENTRY glHint (GLenum target, GLenum mode); ++GL_APICALL GLboolean GL_APIENTRY glIsBuffer (GLuint buffer); ++GL_APICALL GLboolean GL_APIENTRY glIsEnabled (GLenum cap); ++GL_APICALL GLboolean GL_APIENTRY glIsFramebuffer (GLuint framebuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsProgram (GLuint program); ++GL_APICALL GLboolean GL_APIENTRY glIsRenderbuffer (GLuint renderbuffer); ++GL_APICALL GLboolean GL_APIENTRY glIsShader (GLuint shader); ++GL_APICALL GLboolean GL_APIENTRY glIsTexture (GLuint texture); ++GL_APICALL void GL_APIENTRY glLineWidth (GLfloat width); ++GL_APICALL void GL_APIENTRY glLinkProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glPixelStorei (GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glPolygonOffset (GLfloat factor, GLfloat units); ++GL_APICALL void GL_APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels); ++GL_APICALL void GL_APIENTRY glReleaseShaderCompiler (void); ++GL_APICALL void GL_APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glSampleCoverage (GLfloat value, GLboolean invert); ++GL_APICALL void GL_APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar *const*string, const GLint *length); ++GL_APICALL void GL_APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMask (GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask); ++GL_APICALL void GL_APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass); ++GL_APICALL void GL_APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); ++GL_APICALL void GL_APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params); ++GL_APICALL void GL_APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params); ++GL_APICALL void GL_APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glUniform1f (GLint location, GLfloat v0); ++GL_APICALL void GL_APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform1i (GLint location, GLint v0); ++GL_APICALL void GL_APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1); ++GL_APICALL void GL_APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform2i (GLint location, GLint v0, GLint v1); ++GL_APICALL void GL_APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++GL_APICALL void GL_APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2); ++GL_APICALL void GL_APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++GL_APICALL void GL_APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++GL_APICALL void GL_APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUseProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glValidateProgram (GLuint program); ++GL_APICALL void GL_APIENTRY glVertexAttrib1f (GLuint index, GLfloat x); ++GL_APICALL void GL_APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y); ++GL_APICALL void GL_APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z); ++GL_APICALL void GL_APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); ++GL_APICALL void GL_APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v); ++GL_APICALL void GL_APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height); ++#endif ++#endif /* GL_ES_VERSION_2_0 */ ++ ++#ifndef GL_ES_VERSION_3_0 ++#define GL_ES_VERSION_3_0 1 ++typedef khronos_uint16_t GLhalf; ++#define GL_READ_BUFFER 0x0C02 ++#define GL_UNPACK_ROW_LENGTH 0x0CF2 ++#define GL_UNPACK_SKIP_ROWS 0x0CF3 ++#define GL_UNPACK_SKIP_PIXELS 0x0CF4 ++#define GL_PACK_ROW_LENGTH 0x0D02 ++#define GL_PACK_SKIP_ROWS 0x0D03 ++#define GL_PACK_SKIP_PIXELS 0x0D04 ++#define GL_COLOR 0x1800 ++#define GL_DEPTH 0x1801 ++#define GL_STENCIL 0x1802 ++#define GL_RED 0x1903 ++#define GL_RGB8 0x8051 ++#define GL_RGBA8 0x8058 ++#define GL_RGB10_A2 0x8059 ++#define GL_TEXTURE_BINDING_3D 0x806A ++#define GL_UNPACK_SKIP_IMAGES 0x806D ++#define GL_UNPACK_IMAGE_HEIGHT 0x806E ++#define GL_TEXTURE_3D 0x806F ++#define GL_TEXTURE_WRAP_R 0x8072 ++#define GL_MAX_3D_TEXTURE_SIZE 0x8073 ++#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 ++#define GL_MAX_ELEMENTS_VERTICES 0x80E8 ++#define GL_MAX_ELEMENTS_INDICES 0x80E9 ++#define GL_TEXTURE_MIN_LOD 0x813A ++#define GL_TEXTURE_MAX_LOD 0x813B ++#define GL_TEXTURE_BASE_LEVEL 0x813C ++#define GL_TEXTURE_MAX_LEVEL 0x813D ++#define GL_MIN 0x8007 ++#define GL_MAX 0x8008 ++#define GL_DEPTH_COMPONENT24 0x81A6 ++#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD ++#define GL_TEXTURE_COMPARE_MODE 0x884C ++#define GL_TEXTURE_COMPARE_FUNC 0x884D ++#define GL_CURRENT_QUERY 0x8865 ++#define GL_QUERY_RESULT 0x8866 ++#define GL_QUERY_RESULT_AVAILABLE 0x8867 ++#define GL_BUFFER_MAPPED 0x88BC ++#define GL_BUFFER_MAP_POINTER 0x88BD ++#define GL_STREAM_READ 0x88E1 ++#define GL_STREAM_COPY 0x88E2 ++#define GL_STATIC_READ 0x88E5 ++#define GL_STATIC_COPY 0x88E6 ++#define GL_DYNAMIC_READ 0x88E9 ++#define GL_DYNAMIC_COPY 0x88EA ++#define GL_MAX_DRAW_BUFFERS 0x8824 ++#define GL_DRAW_BUFFER0 0x8825 ++#define GL_DRAW_BUFFER1 0x8826 ++#define GL_DRAW_BUFFER2 0x8827 ++#define GL_DRAW_BUFFER3 0x8828 ++#define GL_DRAW_BUFFER4 0x8829 ++#define GL_DRAW_BUFFER5 0x882A ++#define GL_DRAW_BUFFER6 0x882B ++#define GL_DRAW_BUFFER7 0x882C ++#define GL_DRAW_BUFFER8 0x882D ++#define GL_DRAW_BUFFER9 0x882E ++#define GL_DRAW_BUFFER10 0x882F ++#define GL_DRAW_BUFFER11 0x8830 ++#define GL_DRAW_BUFFER12 0x8831 ++#define GL_DRAW_BUFFER13 0x8832 ++#define GL_DRAW_BUFFER14 0x8833 ++#define GL_DRAW_BUFFER15 0x8834 ++#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49 ++#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A ++#define GL_SAMPLER_3D 0x8B5F ++#define GL_SAMPLER_2D_SHADOW 0x8B62 ++#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B ++#define GL_PIXEL_PACK_BUFFER 0x88EB ++#define GL_PIXEL_UNPACK_BUFFER 0x88EC ++#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED ++#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF ++#define GL_FLOAT_MAT2x3 0x8B65 ++#define GL_FLOAT_MAT2x4 0x8B66 ++#define GL_FLOAT_MAT3x2 0x8B67 ++#define GL_FLOAT_MAT3x4 0x8B68 ++#define GL_FLOAT_MAT4x2 0x8B69 ++#define GL_FLOAT_MAT4x3 0x8B6A ++#define GL_SRGB 0x8C40 ++#define GL_SRGB8 0x8C41 ++#define GL_SRGB8_ALPHA8 0x8C43 ++#define GL_COMPARE_REF_TO_TEXTURE 0x884E ++#define GL_MAJOR_VERSION 0x821B ++#define GL_MINOR_VERSION 0x821C ++#define GL_NUM_EXTENSIONS 0x821D ++#define GL_RGBA32F 0x8814 ++#define GL_RGB32F 0x8815 ++#define GL_RGBA16F 0x881A ++#define GL_RGB16F 0x881B ++#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD ++#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF ++#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904 ++#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905 ++#define GL_MAX_VARYING_COMPONENTS 0x8B4B ++#define GL_TEXTURE_2D_ARRAY 0x8C1A ++#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D ++#define GL_R11F_G11F_B10F 0x8C3A ++#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B ++#define GL_RGB9_E5 0x8C3D ++#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E ++#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80 ++#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84 ++#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85 ++#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88 ++#define GL_RASTERIZER_DISCARD 0x8C89 ++#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A ++#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B ++#define GL_INTERLEAVED_ATTRIBS 0x8C8C ++#define GL_SEPARATE_ATTRIBS 0x8C8D ++#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E ++#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F ++#define GL_RGBA32UI 0x8D70 ++#define GL_RGB32UI 0x8D71 ++#define GL_RGBA16UI 0x8D76 ++#define GL_RGB16UI 0x8D77 ++#define GL_RGBA8UI 0x8D7C ++#define GL_RGB8UI 0x8D7D ++#define GL_RGBA32I 0x8D82 ++#define GL_RGB32I 0x8D83 ++#define GL_RGBA16I 0x8D88 ++#define GL_RGB16I 0x8D89 ++#define GL_RGBA8I 0x8D8E ++#define GL_RGB8I 0x8D8F ++#define GL_RED_INTEGER 0x8D94 ++#define GL_RGB_INTEGER 0x8D98 ++#define GL_RGBA_INTEGER 0x8D99 ++#define GL_SAMPLER_2D_ARRAY 0x8DC1 ++#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4 ++#define GL_SAMPLER_CUBE_SHADOW 0x8DC5 ++#define GL_UNSIGNED_INT_VEC2 0x8DC6 ++#define GL_UNSIGNED_INT_VEC3 0x8DC7 ++#define GL_UNSIGNED_INT_VEC4 0x8DC8 ++#define GL_INT_SAMPLER_2D 0x8DCA ++#define GL_INT_SAMPLER_3D 0x8DCB ++#define GL_INT_SAMPLER_CUBE 0x8DCC ++#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF ++#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2 ++#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3 ++#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4 ++#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7 ++#define GL_BUFFER_ACCESS_FLAGS 0x911F ++#define GL_BUFFER_MAP_LENGTH 0x9120 ++#define GL_BUFFER_MAP_OFFSET 0x9121 ++#define GL_DEPTH_COMPONENT32F 0x8CAC ++#define GL_DEPTH32F_STENCIL8 0x8CAD ++#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD ++#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210 ++#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211 ++#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212 ++#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213 ++#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214 ++#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215 ++#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216 ++#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217 ++#define GL_FRAMEBUFFER_DEFAULT 0x8218 ++#define GL_FRAMEBUFFER_UNDEFINED 0x8219 ++#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A ++#define GL_DEPTH_STENCIL 0x84F9 ++#define GL_UNSIGNED_INT_24_8 0x84FA ++#define GL_DEPTH24_STENCIL8 0x88F0 ++#define GL_UNSIGNED_NORMALIZED 0x8C17 ++#define GL_DRAW_FRAMEBUFFER_BINDING 0x8CA6 ++#define GL_READ_FRAMEBUFFER 0x8CA8 ++#define GL_DRAW_FRAMEBUFFER 0x8CA9 ++#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA ++#define GL_RENDERBUFFER_SAMPLES 0x8CAB ++#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4 ++#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF ++#define GL_COLOR_ATTACHMENT1 0x8CE1 ++#define GL_COLOR_ATTACHMENT2 0x8CE2 ++#define GL_COLOR_ATTACHMENT3 0x8CE3 ++#define GL_COLOR_ATTACHMENT4 0x8CE4 ++#define GL_COLOR_ATTACHMENT5 0x8CE5 ++#define GL_COLOR_ATTACHMENT6 0x8CE6 ++#define GL_COLOR_ATTACHMENT7 0x8CE7 ++#define GL_COLOR_ATTACHMENT8 0x8CE8 ++#define GL_COLOR_ATTACHMENT9 0x8CE9 ++#define GL_COLOR_ATTACHMENT10 0x8CEA ++#define GL_COLOR_ATTACHMENT11 0x8CEB ++#define GL_COLOR_ATTACHMENT12 0x8CEC ++#define GL_COLOR_ATTACHMENT13 0x8CED ++#define GL_COLOR_ATTACHMENT14 0x8CEE ++#define GL_COLOR_ATTACHMENT15 0x8CEF ++#define GL_COLOR_ATTACHMENT16 0x8CF0 ++#define GL_COLOR_ATTACHMENT17 0x8CF1 ++#define GL_COLOR_ATTACHMENT18 0x8CF2 ++#define GL_COLOR_ATTACHMENT19 0x8CF3 ++#define GL_COLOR_ATTACHMENT20 0x8CF4 ++#define GL_COLOR_ATTACHMENT21 0x8CF5 ++#define GL_COLOR_ATTACHMENT22 0x8CF6 ++#define GL_COLOR_ATTACHMENT23 0x8CF7 ++#define GL_COLOR_ATTACHMENT24 0x8CF8 ++#define GL_COLOR_ATTACHMENT25 0x8CF9 ++#define GL_COLOR_ATTACHMENT26 0x8CFA ++#define GL_COLOR_ATTACHMENT27 0x8CFB ++#define GL_COLOR_ATTACHMENT28 0x8CFC ++#define GL_COLOR_ATTACHMENT29 0x8CFD ++#define GL_COLOR_ATTACHMENT30 0x8CFE ++#define GL_COLOR_ATTACHMENT31 0x8CFF ++#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56 ++#define GL_MAX_SAMPLES 0x8D57 ++#define GL_HALF_FLOAT 0x140B ++#define GL_MAP_READ_BIT 0x0001 ++#define GL_MAP_WRITE_BIT 0x0002 ++#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004 ++#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008 ++#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010 ++#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020 ++#define GL_RG 0x8227 ++#define GL_RG_INTEGER 0x8228 ++#define GL_R8 0x8229 ++#define GL_RG8 0x822B ++#define GL_R16F 0x822D ++#define GL_R32F 0x822E ++#define GL_RG16F 0x822F ++#define GL_RG32F 0x8230 ++#define GL_R8I 0x8231 ++#define GL_R8UI 0x8232 ++#define GL_R16I 0x8233 ++#define GL_R16UI 0x8234 ++#define GL_R32I 0x8235 ++#define GL_R32UI 0x8236 ++#define GL_RG8I 0x8237 ++#define GL_RG8UI 0x8238 ++#define GL_RG16I 0x8239 ++#define GL_RG16UI 0x823A ++#define GL_RG32I 0x823B ++#define GL_RG32UI 0x823C ++#define GL_VERTEX_ARRAY_BINDING 0x85B5 ++#define GL_R8_SNORM 0x8F94 ++#define GL_RG8_SNORM 0x8F95 ++#define GL_RGB8_SNORM 0x8F96 ++#define GL_RGBA8_SNORM 0x8F97 ++#define GL_SIGNED_NORMALIZED 0x8F9C ++#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69 ++#define GL_COPY_READ_BUFFER 0x8F36 ++#define GL_COPY_WRITE_BUFFER 0x8F37 ++#define GL_COPY_READ_BUFFER_BINDING 0x8F36 ++#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37 ++#define GL_UNIFORM_BUFFER 0x8A11 ++#define GL_UNIFORM_BUFFER_BINDING 0x8A28 ++#define GL_UNIFORM_BUFFER_START 0x8A29 ++#define GL_UNIFORM_BUFFER_SIZE 0x8A2A ++#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B ++#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D ++#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E ++#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F ++#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30 ++#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31 ++#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33 ++#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34 ++#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35 ++#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36 ++#define GL_UNIFORM_TYPE 0x8A37 ++#define GL_UNIFORM_SIZE 0x8A38 ++#define GL_UNIFORM_NAME_LENGTH 0x8A39 ++#define GL_UNIFORM_BLOCK_INDEX 0x8A3A ++#define GL_UNIFORM_OFFSET 0x8A3B ++#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C ++#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D ++#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E ++#define GL_UNIFORM_BLOCK_BINDING 0x8A3F ++#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40 ++#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42 ++#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44 ++#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46 ++#define GL_INVALID_INDEX 0xFFFFFFFFu ++#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122 ++#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125 ++#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111 ++#define GL_OBJECT_TYPE 0x9112 ++#define GL_SYNC_CONDITION 0x9113 ++#define GL_SYNC_STATUS 0x9114 ++#define GL_SYNC_FLAGS 0x9115 ++#define GL_SYNC_FENCE 0x9116 ++#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117 ++#define GL_UNSIGNALED 0x9118 ++#define GL_SIGNALED 0x9119 ++#define GL_ALREADY_SIGNALED 0x911A ++#define GL_TIMEOUT_EXPIRED 0x911B ++#define GL_CONDITION_SATISFIED 0x911C ++#define GL_WAIT_FAILED 0x911D ++#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001 ++#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull ++#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE ++#define GL_ANY_SAMPLES_PASSED 0x8C2F ++#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A ++#define GL_SAMPLER_BINDING 0x8919 ++#define GL_RGB10_A2UI 0x906F ++#define GL_TEXTURE_SWIZZLE_R 0x8E42 ++#define GL_TEXTURE_SWIZZLE_G 0x8E43 ++#define GL_TEXTURE_SWIZZLE_B 0x8E44 ++#define GL_TEXTURE_SWIZZLE_A 0x8E45 ++#define GL_GREEN 0x1904 ++#define GL_BLUE 0x1905 ++#define GL_INT_2_10_10_10_REV 0x8D9F ++#define GL_TRANSFORM_FEEDBACK 0x8E22 ++#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23 ++#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24 ++#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25 ++#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257 ++#define GL_PROGRAM_BINARY_LENGTH 0x8741 ++#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE ++#define GL_PROGRAM_BINARY_FORMATS 0x87FF ++#define GL_COMPRESSED_R11_EAC 0x9270 ++#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271 ++#define GL_COMPRESSED_RG11_EAC 0x9272 ++#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273 ++#define GL_COMPRESSED_RGB8_ETC2 0x9274 ++#define GL_COMPRESSED_SRGB8_ETC2 0x9275 ++#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276 ++#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277 ++#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279 ++#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F ++#define GL_MAX_ELEMENT_INDEX 0x8D6B ++#define GL_NUM_SAMPLE_COUNTS 0x9380 ++#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF ++typedef void (GL_APIENTRYP PFNGLREADBUFFERPROC) (GLenum src); ++typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++typedef void (GL_APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++typedef void (GL_APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++typedef void (GL_APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISQUERYPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLENDQUERYPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params); ++typedef GLboolean (GL_APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, void **params); ++typedef void (GL_APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++typedef void (GL_APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++typedef void *(GL_APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++typedef void (GL_APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length); ++typedef void (GL_APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays); ++typedef void (GL_APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays); ++typedef GLboolean (GL_APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array); ++typedef void (GL_APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data); ++typedef void (GL_APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode); ++typedef void (GL_APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++typedef void (GL_APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++typedef void (GL_APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++typedef const GLubyte *(GL_APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index); ++typedef void (GL_APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++typedef GLuint (GL_APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++typedef void (GL_APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++typedef GLsync (GL_APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags); ++typedef GLboolean (GL_APIENTRYP PFNGLISSYNCPROC) (GLsync sync); ++typedef void (GL_APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync); ++typedef GLenum (GL_APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); ++typedef void (GL_APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data); ++typedef void (GL_APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params); ++typedef void (GL_APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers); ++typedef void (GL_APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers); ++typedef GLboolean (GL_APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor); ++typedef void (GL_APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id); ++typedef void (GL_APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids); ++typedef void (GL_APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids); ++typedef GLboolean (GL_APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id); ++typedef void (GL_APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++typedef void (GL_APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++typedef void (GL_APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value); ++typedef void (GL_APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++typedef void (GL_APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++typedef void (GL_APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glReadBuffer (GLenum src); ++GL_APICALL void GL_APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices); ++GL_APICALL void GL_APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels); ++GL_APICALL void GL_APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data); ++GL_APICALL void GL_APIENTRY glGenQueries (GLsizei n, GLuint *ids); ++GL_APICALL void GL_APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsQuery (GLuint id); ++GL_APICALL void GL_APIENTRY glBeginQuery (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glEndQuery (GLenum target); ++GL_APICALL void GL_APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params); ++GL_APICALL GLboolean GL_APIENTRY glUnmapBuffer (GLenum target); ++GL_APICALL void GL_APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, void **params); ++GL_APICALL void GL_APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); ++GL_APICALL void GL_APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); ++GL_APICALL void *GL_APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access); ++GL_APICALL void GL_APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length); ++GL_APICALL void GL_APIENTRY glBindVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays); ++GL_APICALL void GL_APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays); ++GL_APICALL GLboolean GL_APIENTRY glIsVertexArray (GLuint array); ++GL_APICALL void GL_APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data); ++GL_APICALL void GL_APIENTRY glBeginTransformFeedback (GLenum primitiveMode); ++GL_APICALL void GL_APIENTRY glEndTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer); ++GL_APICALL void GL_APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar *const*varyings, GLenum bufferMode); ++GL_APICALL void GL_APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name); ++GL_APICALL void GL_APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const void *pointer); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params); ++GL_APICALL void GL_APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w); ++GL_APICALL void GL_APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v); ++GL_APICALL void GL_APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v); ++GL_APICALL void GL_APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params); ++GL_APICALL GLint GL_APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name); ++GL_APICALL void GL_APIENTRY glUniform1ui (GLint location, GLuint v0); ++GL_APICALL void GL_APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1); ++GL_APICALL void GL_APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2); ++GL_APICALL void GL_APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++GL_APICALL void GL_APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value); ++GL_APICALL void GL_APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value); ++GL_APICALL void GL_APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil); ++GL_APICALL const GLubyte *GL_APIENTRY glGetStringi (GLenum name, GLuint index); ++GL_APICALL void GL_APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar *const*uniformNames, GLuint *uniformIndices); ++GL_APICALL void GL_APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params); ++GL_APICALL GLuint GL_APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName); ++GL_APICALL void GL_APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding); ++GL_APICALL void GL_APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount); ++GL_APICALL void GL_APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount); ++GL_APICALL GLsync GL_APIENTRY glFenceSync (GLenum condition, GLbitfield flags); ++GL_APICALL GLboolean GL_APIENTRY glIsSync (GLsync sync); ++GL_APICALL void GL_APIENTRY glDeleteSync (GLsync sync); ++GL_APICALL GLenum GL_APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout); ++GL_APICALL void GL_APIENTRY glGetInteger64v (GLenum pname, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values); ++GL_APICALL void GL_APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data); ++GL_APICALL void GL_APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params); ++GL_APICALL void GL_APIENTRY glGenSamplers (GLsizei count, GLuint *samplers); ++GL_APICALL void GL_APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers); ++GL_APICALL GLboolean GL_APIENTRY glIsSampler (GLuint sampler); ++GL_APICALL void GL_APIENTRY glBindSampler (GLuint unit, GLuint sampler); ++GL_APICALL void GL_APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param); ++GL_APICALL void GL_APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param); ++GL_APICALL void GL_APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param); ++GL_APICALL void GL_APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor); ++GL_APICALL void GL_APIENTRY glBindTransformFeedback (GLenum target, GLuint id); ++GL_APICALL void GL_APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids); ++GL_APICALL void GL_APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids); ++GL_APICALL GLboolean GL_APIENTRY glIsTransformFeedback (GLuint id); ++GL_APICALL void GL_APIENTRY glPauseTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glResumeTransformFeedback (void); ++GL_APICALL void GL_APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, void *binary); ++GL_APICALL void GL_APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const void *binary, GLsizei length); ++GL_APICALL void GL_APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value); ++GL_APICALL void GL_APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments); ++GL_APICALL void GL_APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height); ++GL_APICALL void GL_APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth); ++GL_APICALL void GL_APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params); ++#endif ++#endif /* GL_ES_VERSION_3_0 */ ++ ++#ifndef GL_ES_VERSION_3_1 ++#define GL_ES_VERSION_3_1 1 ++#define GL_COMPUTE_SHADER 0x91B9 ++#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB ++#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC ++#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD ++#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262 ++#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263 ++#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264 ++#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265 ++#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266 ++#define GL_MAX_COMPUTE_WORK_GROUP_INVOCATIONS 0x90EB ++#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE ++#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF ++#define GL_COMPUTE_WORK_GROUP_SIZE 0x8267 ++#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE ++#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF ++#define GL_COMPUTE_SHADER_BIT 0x00000020 ++#define GL_DRAW_INDIRECT_BUFFER 0x8F3F ++#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43 ++#define GL_MAX_UNIFORM_LOCATIONS 0x826E ++#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310 ++#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311 ++#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313 ++#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314 ++#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315 ++#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316 ++#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318 ++#define GL_UNIFORM 0x92E1 ++#define GL_UNIFORM_BLOCK 0x92E2 ++#define GL_PROGRAM_INPUT 0x92E3 ++#define GL_PROGRAM_OUTPUT 0x92E4 ++#define GL_BUFFER_VARIABLE 0x92E5 ++#define GL_SHADER_STORAGE_BLOCK 0x92E6 ++#define GL_ATOMIC_COUNTER_BUFFER 0x92C0 ++#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4 ++#define GL_ACTIVE_RESOURCES 0x92F5 ++#define GL_MAX_NAME_LENGTH 0x92F6 ++#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7 ++#define GL_NAME_LENGTH 0x92F9 ++#define GL_TYPE 0x92FA ++#define GL_ARRAY_SIZE 0x92FB ++#define GL_OFFSET 0x92FC ++#define GL_BLOCK_INDEX 0x92FD ++#define GL_ARRAY_STRIDE 0x92FE ++#define GL_MATRIX_STRIDE 0x92FF ++#define GL_IS_ROW_MAJOR 0x9300 ++#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301 ++#define GL_BUFFER_BINDING 0x9302 ++#define GL_BUFFER_DATA_SIZE 0x9303 ++#define GL_NUM_ACTIVE_VARIABLES 0x9304 ++#define GL_ACTIVE_VARIABLES 0x9305 ++#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306 ++#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A ++#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B ++#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C ++#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D ++#define GL_LOCATION 0x930E ++#define GL_VERTEX_SHADER_BIT 0x00000001 ++#define GL_FRAGMENT_SHADER_BIT 0x00000002 ++#define GL_ALL_SHADER_BITS 0xFFFFFFFF ++#define GL_PROGRAM_SEPARABLE 0x8258 ++#define GL_ACTIVE_PROGRAM 0x8259 ++#define GL_PROGRAM_PIPELINE_BINDING 0x825A ++#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1 ++#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2 ++#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3 ++#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC ++#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0 ++#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1 ++#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2 ++#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6 ++#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7 ++#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8 ++#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC ++#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9 ++#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB ++#define GL_MAX_IMAGE_UNITS 0x8F38 ++#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA ++#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE ++#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF ++#define GL_IMAGE_BINDING_NAME 0x8F3A ++#define GL_IMAGE_BINDING_LEVEL 0x8F3B ++#define GL_IMAGE_BINDING_LAYERED 0x8F3C ++#define GL_IMAGE_BINDING_LAYER 0x8F3D ++#define GL_IMAGE_BINDING_ACCESS 0x8F3E ++#define GL_IMAGE_BINDING_FORMAT 0x906E ++#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001 ++#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002 ++#define GL_UNIFORM_BARRIER_BIT 0x00000004 ++#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008 ++#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020 ++#define GL_COMMAND_BARRIER_BIT 0x00000040 ++#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080 ++#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100 ++#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200 ++#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400 ++#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800 ++#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000 ++#define GL_ALL_BARRIER_BITS 0xFFFFFFFF ++#define GL_IMAGE_2D 0x904D ++#define GL_IMAGE_3D 0x904E ++#define GL_IMAGE_CUBE 0x9050 ++#define GL_IMAGE_2D_ARRAY 0x9053 ++#define GL_INT_IMAGE_2D 0x9058 ++#define GL_INT_IMAGE_3D 0x9059 ++#define GL_INT_IMAGE_CUBE 0x905B ++#define GL_INT_IMAGE_2D_ARRAY 0x905E ++#define GL_UNSIGNED_INT_IMAGE_2D 0x9063 ++#define GL_UNSIGNED_INT_IMAGE_3D 0x9064 ++#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066 ++#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8 ++#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9 ++#define GL_READ_ONLY 0x88B8 ++#define GL_WRITE_ONLY 0x88B9 ++#define GL_READ_WRITE 0x88BA ++#define GL_SHADER_STORAGE_BUFFER 0x90D2 ++#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3 ++#define GL_SHADER_STORAGE_BUFFER_START 0x90D4 ++#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5 ++#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6 ++#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA ++#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB ++#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC ++#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD ++#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE ++#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF ++#define GL_SHADER_STORAGE_BARRIER_BIT 0x00002000 ++#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES 0x8F39 ++#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA ++#define GL_STENCIL_INDEX 0x1901 ++#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E ++#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F ++#define GL_SAMPLE_POSITION 0x8E50 ++#define GL_SAMPLE_MASK 0x8E51 ++#define GL_SAMPLE_MASK_VALUE 0x8E52 ++#define GL_TEXTURE_2D_MULTISAMPLE 0x9100 ++#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59 ++#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E ++#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F ++#define GL_MAX_INTEGER_SAMPLES 0x9110 ++#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104 ++#define GL_TEXTURE_SAMPLES 0x9106 ++#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107 ++#define GL_TEXTURE_WIDTH 0x1000 ++#define GL_TEXTURE_HEIGHT 0x1001 ++#define GL_TEXTURE_DEPTH 0x8071 ++#define GL_TEXTURE_INTERNAL_FORMAT 0x1003 ++#define GL_TEXTURE_RED_SIZE 0x805C ++#define GL_TEXTURE_GREEN_SIZE 0x805D ++#define GL_TEXTURE_BLUE_SIZE 0x805E ++#define GL_TEXTURE_ALPHA_SIZE 0x805F ++#define GL_TEXTURE_DEPTH_SIZE 0x884A ++#define GL_TEXTURE_STENCIL_SIZE 0x88F1 ++#define GL_TEXTURE_SHARED_SIZE 0x8C3F ++#define GL_TEXTURE_RED_TYPE 0x8C10 ++#define GL_TEXTURE_GREEN_TYPE 0x8C11 ++#define GL_TEXTURE_BLUE_TYPE 0x8C12 ++#define GL_TEXTURE_ALPHA_TYPE 0x8C13 ++#define GL_TEXTURE_DEPTH_TYPE 0x8C16 ++#define GL_TEXTURE_COMPRESSED 0x86A1 ++#define GL_SAMPLER_2D_MULTISAMPLE 0x9108 ++#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109 ++#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A ++#define GL_VERTEX_ATTRIB_BINDING 0x82D4 ++#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5 ++#define GL_VERTEX_BINDING_DIVISOR 0x82D6 ++#define GL_VERTEX_BINDING_OFFSET 0x82D7 ++#define GL_VERTEX_BINDING_STRIDE 0x82D8 ++#define GL_VERTEX_BINDING_BUFFER 0x8F4F ++#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9 ++#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA ++#define GL_MAX_VERTEX_ATTRIB_STRIDE 0x82E5 ++typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); ++typedef void (GL_APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect); ++typedef void (GL_APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param); ++typedef void (GL_APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params); ++typedef GLuint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); ++typedef GLint (GL_APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name); ++typedef void (GL_APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program); ++typedef void (GL_APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program); ++typedef GLuint (GL_APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar *const*strings); ++typedef void (GL_APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines); ++typedef void (GL_APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines); ++typedef GLboolean (GL_APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++typedef void (GL_APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline); ++typedef void (GL_APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++typedef void (GL_APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); ++typedef void (GL_APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data); ++typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers); ++typedef void (GL_APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); ++typedef void (GL_APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val); ++typedef void (GL_APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask); ++typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); ++typedef void (GL_APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex); ++typedef void (GL_APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z); ++GL_APICALL void GL_APIENTRY glDispatchComputeIndirect (GLintptr indirect); ++GL_APICALL void GL_APIENTRY glDrawArraysIndirect (GLenum mode, const void *indirect); ++GL_APICALL void GL_APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect); ++GL_APICALL void GL_APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param); ++GL_APICALL void GL_APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params); ++GL_APICALL GLuint GL_APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name); ++GL_APICALL void GL_APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name); ++GL_APICALL void GL_APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params); ++GL_APICALL GLint GL_APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name); ++GL_APICALL void GL_APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program); ++GL_APICALL void GL_APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program); ++GL_APICALL GLuint GL_APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar *const*strings); ++GL_APICALL void GL_APIENTRY glBindProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines); ++GL_APICALL void GL_APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines); ++GL_APICALL GLboolean GL_APIENTRY glIsProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0); ++GL_APICALL void GL_APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1); ++GL_APICALL void GL_APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2); ++GL_APICALL void GL_APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); ++GL_APICALL void GL_APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value); ++GL_APICALL void GL_APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); ++GL_APICALL void GL_APIENTRY glValidateProgramPipeline (GLuint pipeline); ++GL_APICALL void GL_APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog); ++GL_APICALL void GL_APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format); ++GL_APICALL void GL_APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data); ++GL_APICALL void GL_APIENTRY glMemoryBarrier (GLbitfield barriers); ++GL_APICALL void GL_APIENTRY glMemoryBarrierByRegion (GLbitfield barriers); ++GL_APICALL void GL_APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations); ++GL_APICALL void GL_APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val); ++GL_APICALL void GL_APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask); ++GL_APICALL void GL_APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params); ++GL_APICALL void GL_APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride); ++GL_APICALL void GL_APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset); ++GL_APICALL void GL_APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset); ++GL_APICALL void GL_APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex); ++GL_APICALL void GL_APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor); ++#endif ++#endif /* GL_ES_VERSION_3_1 */ ++ ++#ifndef GL_ES_VERSION_3_2 ++#define GL_ES_VERSION_3_2 1 ++typedef void (GL_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam); ++#define GL_MULTISAMPLE_LINE_WIDTH_RANGE 0x9381 ++#define GL_MULTISAMPLE_LINE_WIDTH_GRANULARITY 0x9382 ++#define GL_MULTIPLY 0x9294 ++#define GL_SCREEN 0x9295 ++#define GL_OVERLAY 0x9296 ++#define GL_DARKEN 0x9297 ++#define GL_LIGHTEN 0x9298 ++#define GL_COLORDODGE 0x9299 ++#define GL_COLORBURN 0x929A ++#define GL_HARDLIGHT 0x929B ++#define GL_SOFTLIGHT 0x929C ++#define GL_DIFFERENCE 0x929E ++#define GL_EXCLUSION 0x92A0 ++#define GL_HSL_HUE 0x92AD ++#define GL_HSL_SATURATION 0x92AE ++#define GL_HSL_COLOR 0x92AF ++#define GL_HSL_LUMINOSITY 0x92B0 ++#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242 ++#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243 ++#define GL_DEBUG_CALLBACK_FUNCTION 0x8244 ++#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245 ++#define GL_DEBUG_SOURCE_API 0x8246 ++#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247 ++#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248 ++#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249 ++#define GL_DEBUG_SOURCE_APPLICATION 0x824A ++#define GL_DEBUG_SOURCE_OTHER 0x824B ++#define GL_DEBUG_TYPE_ERROR 0x824C ++#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D ++#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E ++#define GL_DEBUG_TYPE_PORTABILITY 0x824F ++#define GL_DEBUG_TYPE_PERFORMANCE 0x8250 ++#define GL_DEBUG_TYPE_OTHER 0x8251 ++#define GL_DEBUG_TYPE_MARKER 0x8268 ++#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269 ++#define GL_DEBUG_TYPE_POP_GROUP 0x826A ++#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B ++#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C ++#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D ++#define GL_BUFFER 0x82E0 ++#define GL_SHADER 0x82E1 ++#define GL_PROGRAM 0x82E2 ++#define GL_VERTEX_ARRAY 0x8074 ++#define GL_QUERY 0x82E3 ++#define GL_PROGRAM_PIPELINE 0x82E4 ++#define GL_SAMPLER 0x82E6 ++#define GL_MAX_LABEL_LENGTH 0x82E8 ++#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143 ++#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144 ++#define GL_DEBUG_LOGGED_MESSAGES 0x9145 ++#define GL_DEBUG_SEVERITY_HIGH 0x9146 ++#define GL_DEBUG_SEVERITY_MEDIUM 0x9147 ++#define GL_DEBUG_SEVERITY_LOW 0x9148 ++#define GL_DEBUG_OUTPUT 0x92E0 ++#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002 ++#define GL_STACK_OVERFLOW 0x0503 ++#define GL_STACK_UNDERFLOW 0x0504 ++#define GL_GEOMETRY_SHADER 0x8DD9 ++#define GL_GEOMETRY_SHADER_BIT 0x00000004 ++#define GL_GEOMETRY_VERTICES_OUT 0x8916 ++#define GL_GEOMETRY_INPUT_TYPE 0x8917 ++#define GL_GEOMETRY_OUTPUT_TYPE 0x8918 ++#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F ++#define GL_LAYER_PROVOKING_VERTEX 0x825E ++#define GL_LINES_ADJACENCY 0x000A ++#define GL_LINE_STRIP_ADJACENCY 0x000B ++#define GL_TRIANGLES_ADJACENCY 0x000C ++#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D ++#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF ++#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C ++#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32 ++#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123 ++#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124 ++#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0 ++#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1 ++#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A ++#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29 ++#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF ++#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5 ++#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD ++#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7 ++#define GL_FIRST_VERTEX_CONVENTION 0x8E4D ++#define GL_LAST_VERTEX_CONVENTION 0x8E4E ++#define GL_UNDEFINED_VERTEX 0x8260 ++#define GL_PRIMITIVES_GENERATED 0x8C87 ++#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312 ++#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317 ++#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8 ++#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7 ++#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309 ++#define GL_PRIMITIVE_BOUNDING_BOX 0x92BE ++#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004 ++#define GL_CONTEXT_FLAGS 0x821E ++#define GL_LOSE_CONTEXT_ON_RESET 0x8252 ++#define GL_GUILTY_CONTEXT_RESET 0x8253 ++#define GL_INNOCENT_CONTEXT_RESET 0x8254 ++#define GL_UNKNOWN_CONTEXT_RESET 0x8255 ++#define GL_RESET_NOTIFICATION_STRATEGY 0x8256 ++#define GL_NO_RESET_NOTIFICATION 0x8261 ++#define GL_CONTEXT_LOST 0x0507 ++#define GL_SAMPLE_SHADING 0x8C36 ++#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37 ++#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B ++#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C ++#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D ++#define GL_PATCHES 0x000E ++#define GL_PATCH_VERTICES 0x8E72 ++#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75 ++#define GL_TESS_GEN_MODE 0x8E76 ++#define GL_TESS_GEN_SPACING 0x8E77 ++#define GL_TESS_GEN_VERTEX_ORDER 0x8E78 ++#define GL_TESS_GEN_POINT_MODE 0x8E79 ++#define GL_ISOLINES 0x8E7A ++#define GL_QUADS 0x0007 ++#define GL_FRACTIONAL_ODD 0x8E7B ++#define GL_FRACTIONAL_EVEN 0x8E7C ++#define GL_MAX_PATCH_VERTICES 0x8E7D ++#define GL_MAX_TESS_GEN_LEVEL 0x8E7E ++#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F ++#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80 ++#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81 ++#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82 ++#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83 ++#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84 ++#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85 ++#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86 ++#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89 ++#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A ++#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C ++#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D ++#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E ++#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F ++#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD ++#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE ++#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3 ++#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4 ++#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB ++#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC ++#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8 ++#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9 ++#define GL_PRIMITIVE_RESTART_FOR_PATCHES_SUPPORTED 0x8221 ++#define GL_IS_PER_PATCH 0x92E7 ++#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307 ++#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308 ++#define GL_TESS_CONTROL_SHADER 0x8E88 ++#define GL_TESS_EVALUATION_SHADER 0x8E87 ++#define GL_TESS_CONTROL_SHADER_BIT 0x00000008 ++#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010 ++#define GL_TEXTURE_BORDER_COLOR 0x1004 ++#define GL_CLAMP_TO_BORDER 0x812D ++#define GL_TEXTURE_BUFFER 0x8C2A ++#define GL_TEXTURE_BUFFER_BINDING 0x8C2A ++#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B ++#define GL_TEXTURE_BINDING_BUFFER 0x8C2C ++#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D ++#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F ++#define GL_SAMPLER_BUFFER 0x8DC2 ++#define GL_INT_SAMPLER_BUFFER 0x8DD0 ++#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8 ++#define GL_IMAGE_BUFFER 0x9051 ++#define GL_INT_IMAGE_BUFFER 0x905C ++#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067 ++#define GL_TEXTURE_BUFFER_OFFSET 0x919D ++#define GL_TEXTURE_BUFFER_SIZE 0x919E ++#define GL_COMPRESSED_RGBA_ASTC_4x4 0x93B0 ++#define GL_COMPRESSED_RGBA_ASTC_5x4 0x93B1 ++#define GL_COMPRESSED_RGBA_ASTC_5x5 0x93B2 ++#define GL_COMPRESSED_RGBA_ASTC_6x5 0x93B3 ++#define GL_COMPRESSED_RGBA_ASTC_6x6 0x93B4 ++#define GL_COMPRESSED_RGBA_ASTC_8x5 0x93B5 ++#define GL_COMPRESSED_RGBA_ASTC_8x6 0x93B6 ++#define GL_COMPRESSED_RGBA_ASTC_8x8 0x93B7 ++#define GL_COMPRESSED_RGBA_ASTC_10x5 0x93B8 ++#define GL_COMPRESSED_RGBA_ASTC_10x6 0x93B9 ++#define GL_COMPRESSED_RGBA_ASTC_10x8 0x93BA ++#define GL_COMPRESSED_RGBA_ASTC_10x10 0x93BB ++#define GL_COMPRESSED_RGBA_ASTC_12x10 0x93BC ++#define GL_COMPRESSED_RGBA_ASTC_12x12 0x93BD ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4 0x93D0 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4 0x93D1 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5 0x93D2 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5 0x93D3 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6 0x93D4 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5 0x93D5 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6 0x93D6 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8 0x93D7 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5 0x93D8 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6 0x93D9 ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8 0x93DA ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10 0x93DB ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10 0x93DC ++#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12 0x93DD ++#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009 ++#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A ++#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C ++#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D ++#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E ++#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F ++#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054 ++#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F ++#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A ++#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102 ++#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105 ++#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B ++#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C ++#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D ++typedef void (GL_APIENTRYP PFNGLBLENDBARRIERPROC) (void); ++typedef void (GL_APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); ++typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); ++typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); ++typedef void (GL_APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam); ++typedef GLuint (GL_APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); ++typedef void (GL_APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message); ++typedef void (GL_APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void); ++typedef void (GL_APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); ++typedef void (GL_APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); ++typedef void (GL_APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label); ++typedef void (GL_APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); ++typedef void (GL_APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, void **params); ++typedef void (GL_APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index); ++typedef void (GL_APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode); ++typedef void (GL_APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst); ++typedef void (GL_APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); ++typedef void (GL_APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); ++typedef GLboolean (GL_APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); ++typedef void (GL_APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); ++typedef void (GL_APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); ++typedef void (GL_APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level); ++typedef void (GL_APIENTRYP PFNGLPRIMITIVEBOUNDINGBOXPROC) (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); ++typedef GLenum (GL_APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void); ++typedef void (GL_APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); ++typedef void (GL_APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); ++typedef void (GL_APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value); ++typedef void (GL_APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params); ++typedef void (GL_APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param); ++typedef void (GL_APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params); ++typedef void (GL_APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params); ++typedef void (GL_APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer); ++typedef void (GL_APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); ++typedef void (GL_APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); ++#if GL_GLES_PROTOTYPES ++GL_APICALL void GL_APIENTRY glBlendBarrier (void); ++GL_APICALL void GL_APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth); ++GL_APICALL void GL_APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled); ++GL_APICALL void GL_APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf); ++GL_APICALL void GL_APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam); ++GL_APICALL GLuint GL_APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufSize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog); ++GL_APICALL void GL_APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message); ++GL_APICALL void GL_APIENTRY glPopDebugGroup (void); ++GL_APICALL void GL_APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label); ++GL_APICALL void GL_APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label); ++GL_APICALL void GL_APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label); ++GL_APICALL void GL_APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label); ++GL_APICALL void GL_APIENTRY glGetPointerv (GLenum pname, void **params); ++GL_APICALL void GL_APIENTRY glEnablei (GLenum target, GLuint index); ++GL_APICALL void GL_APIENTRY glDisablei (GLenum target, GLuint index); ++GL_APICALL void GL_APIENTRY glBlendEquationi (GLuint buf, GLenum mode); ++GL_APICALL void GL_APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha); ++GL_APICALL void GL_APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst); ++GL_APICALL void GL_APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha); ++GL_APICALL void GL_APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a); ++GL_APICALL GLboolean GL_APIENTRY glIsEnabledi (GLenum target, GLuint index); ++GL_APICALL void GL_APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex); ++GL_APICALL void GL_APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex); ++GL_APICALL void GL_APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex); ++GL_APICALL void GL_APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level); ++GL_APICALL void GL_APIENTRY glPrimitiveBoundingBox (GLfloat minX, GLfloat minY, GLfloat minZ, GLfloat minW, GLfloat maxX, GLfloat maxY, GLfloat maxZ, GLfloat maxW); ++GL_APICALL GLenum GL_APIENTRY glGetGraphicsResetStatus (void); ++GL_APICALL void GL_APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data); ++GL_APICALL void GL_APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params); ++GL_APICALL void GL_APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params); ++GL_APICALL void GL_APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params); ++GL_APICALL void GL_APIENTRY glMinSampleShading (GLfloat value); ++GL_APICALL void GL_APIENTRY glPatchParameteri (GLenum pname, GLint value); ++GL_APICALL void GL_APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params); ++GL_APICALL void GL_APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params); ++GL_APICALL void GL_APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params); ++GL_APICALL void GL_APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param); ++GL_APICALL void GL_APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param); ++GL_APICALL void GL_APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params); ++GL_APICALL void GL_APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params); ++GL_APICALL void GL_APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer); ++GL_APICALL void GL_APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size); ++GL_APICALL void GL_APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); ++#endif ++#endif /* GL_ES_VERSION_3_2 */ ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/GLES3/gl3platform.h b/build/ohos/ohos-sysroot/usr/include/GLES3/gl3platform.h +new file mode 100644 +index 0000000..8699212 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/GLES3/gl3platform.h +@@ -0,0 +1,27 @@ ++#ifndef __gl3platform_h_ ++#define __gl3platform_h_ ++ ++/* ++** Copyright 2017-2020 The Khronos Group Inc. ++** SPDX-License-Identifier: Apache-2.0 ++*/ ++ ++/* Platform-specific types and definitions for OpenGL ES 3.X gl3.h ++ * ++ * Adopters may modify khrplatform.h and this file to suit their platform. ++ * Please contribute modifications back to Khronos as pull requests on the ++ * public github repository: ++ * https://github.com/KhronosGroup/OpenGL-Registry ++ */ ++ ++#include ++ ++#ifndef GL_APICALL ++#define GL_APICALL KHRONOS_APICALL ++#endif ++ ++#ifndef GL_APIENTRY ++#define GL_APIENTRY KHRONOS_APIENTRY ++#endif ++ ++#endif /* __gl3platform_h_ */ +diff --git a/build/ohos/ohos-sysroot/usr/include/KHR/khrplatform.h b/build/ohos/ohos-sysroot/usr/include/KHR/khrplatform.h +new file mode 100644 +index 0000000..0164644 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/KHR/khrplatform.h +@@ -0,0 +1,311 @@ ++#ifndef __khrplatform_h_ ++#define __khrplatform_h_ ++ ++/* ++** Copyright (c) 2008-2018 The Khronos Group Inc. ++** ++** Permission is hereby granted, free of charge, to any person obtaining a ++** copy of this software and/or associated documentation files (the ++** "Materials"), to deal in the Materials without restriction, including ++** without limitation the rights to use, copy, modify, merge, publish, ++** distribute, sublicense, and/or sell copies of the Materials, and to ++** permit persons to whom the Materials are furnished to do so, subject to ++** the following conditions: ++** ++** The above copyright notice and this permission notice shall be included ++** in all copies or substantial portions of the Materials. ++** ++** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ++** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ++** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ++** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS. ++*/ ++ ++/* Khronos platform-specific types and definitions. ++ * ++ * The master copy of khrplatform.h is maintained in the Khronos EGL ++ * Registry repository at https://github.com/KhronosGroup/EGL-Registry ++ * The last semantic modification to khrplatform.h was at commit ID: ++ * 67a3e0864c2d75ea5287b9f3d2eb74a745936692 ++ * ++ * Adopters may modify this file to suit their platform. Adopters are ++ * encouraged to submit platform specific modifications to the Khronos ++ * group so that they can be included in future versions of this file. ++ * Please submit changes by filing pull requests or issues on ++ * the EGL Registry repository linked above. ++ * ++ * ++ * See the Implementer's Guidelines for information about where this file ++ * should be located on your system and for more details of its use: ++ * http://www.khronos.org/registry/implementers_guide.pdf ++ * ++ * This file should be included as ++ * #include ++ * by Khronos client API header files that use its types and defines. ++ * ++ * The types in khrplatform.h should only be used to define API-specific types. ++ * ++ * Types defined in khrplatform.h: ++ * khronos_int8_t signed 8 bit ++ * khronos_uint8_t unsigned 8 bit ++ * khronos_int16_t signed 16 bit ++ * khronos_uint16_t unsigned 16 bit ++ * khronos_int32_t signed 32 bit ++ * khronos_uint32_t unsigned 32 bit ++ * khronos_int64_t signed 64 bit ++ * khronos_uint64_t unsigned 64 bit ++ * khronos_intptr_t signed same number of bits as a pointer ++ * khronos_uintptr_t unsigned same number of bits as a pointer ++ * khronos_ssize_t signed size ++ * khronos_usize_t unsigned size ++ * khronos_float_t signed 32 bit floating point ++ * khronos_time_ns_t unsigned 64 bit time in nanoseconds ++ * khronos_utime_nanoseconds_t unsigned time interval or absolute time in ++ * nanoseconds ++ * khronos_stime_nanoseconds_t signed time interval in nanoseconds ++ * khronos_boolean_enum_t enumerated boolean type. This should ++ * only be used as a base type when a client API's boolean type is ++ * an enum. Client APIs which use an integer or other type for ++ * booleans cannot use this as the base type for their boolean. ++ * ++ * Tokens defined in khrplatform.h: ++ * ++ * KHRONOS_FALSE, KHRONOS_TRUE Enumerated boolean false/true values. ++ * ++ * KHRONOS_SUPPORT_INT64 is 1 if 64 bit integers are supported; otherwise 0. ++ * KHRONOS_SUPPORT_FLOAT is 1 if floats are supported; otherwise 0. ++ * ++ * Calling convention macros defined in this file: ++ * KHRONOS_APICALL ++ * KHRONOS_APIENTRY ++ * KHRONOS_APIATTRIBUTES ++ * ++ * These may be used in function prototypes as: ++ * ++ * KHRONOS_APICALL void KHRONOS_APIENTRY funcname( ++ * int arg1, ++ * int arg2) KHRONOS_APIATTRIBUTES; ++ */ ++ ++#if defined(__SCITECH_SNAP__) && !defined(KHRONOS_STATIC) ++# define KHRONOS_STATIC 1 ++#endif ++ ++/*------------------------------------------------------------------------- ++ * Definition of KHRONOS_APICALL ++ *------------------------------------------------------------------------- ++ * This precedes the return type of the function in the function prototype. ++ */ ++#if defined(KHRONOS_STATIC) ++ /* If the preprocessor constant KHRONOS_STATIC is defined, make the ++ * header compatible with static linking. */ ++# define KHRONOS_APICALL ++#elif defined(_WIN32) ++# define KHRONOS_APICALL __declspec(dllimport) ++#elif defined (__SYMBIAN32__) ++# define KHRONOS_APICALL IMPORT_C ++#elif defined(__ANDROID__) ++# define KHRONOS_APICALL __attribute__((visibility("default"))) ++#else ++# define KHRONOS_APICALL ++#endif ++ ++/*------------------------------------------------------------------------- ++ * Definition of KHRONOS_APIENTRY ++ *------------------------------------------------------------------------- ++ * This follows the return type of the function and precedes the function ++ * name in the function prototype. ++ */ ++#if defined(_WIN32) && !defined(_WIN32_WCE) && !defined(__SCITECH_SNAP__) ++ /* Win32 but not WinCE */ ++# define KHRONOS_APIENTRY __stdcall ++#else ++# define KHRONOS_APIENTRY ++#endif ++ ++/*------------------------------------------------------------------------- ++ * Definition of KHRONOS_APIATTRIBUTES ++ *------------------------------------------------------------------------- ++ * This follows the closing parenthesis of the function prototype arguments. ++ */ ++#if defined (__ARMCC_2__) ++#define KHRONOS_APIATTRIBUTES __softfp ++#else ++#define KHRONOS_APIATTRIBUTES ++#endif ++ ++/*------------------------------------------------------------------------- ++ * basic type definitions ++ *-----------------------------------------------------------------------*/ ++#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__GNUC__) || defined(__SCO__) || defined(__USLC__) ++ ++ ++/* ++ * Using ++ */ ++#include ++typedef int32_t khronos_int32_t; ++typedef uint32_t khronos_uint32_t; ++typedef int64_t khronos_int64_t; ++typedef uint64_t khronos_uint64_t; ++#define KHRONOS_SUPPORT_INT64 1 ++#define KHRONOS_SUPPORT_FLOAT 1 ++/* ++ * To support platform where unsigned long cannot be used interchangeably with ++ * inptr_t (e.g. CHERI-extended ISAs), we can use the stdint.h intptr_t. ++ * Ideally, we could just use (u)intptr_t everywhere, but this could result in ++ * ABI breakage if khronos_uintptr_t is changed from unsigned long to ++ * unsigned long long or similar (this results in different C++ name mangling). ++ * To avoid changes for existing platforms, we restrict usage of intptr_t to ++ * platforms where the size of a pointer is larger than the size of long. ++ */ ++#if defined(__SIZEOF_LONG__) && defined(__SIZEOF_POINTER__) ++#if __SIZEOF_POINTER__ > __SIZEOF_LONG__ ++#define KHRONOS_USE_INTPTR_T ++#endif ++#endif ++ ++#elif defined(__VMS ) || defined(__sgi) ++ ++/* ++ * Using ++ */ ++#include ++typedef int32_t khronos_int32_t; ++typedef uint32_t khronos_uint32_t; ++typedef int64_t khronos_int64_t; ++typedef uint64_t khronos_uint64_t; ++#define KHRONOS_SUPPORT_INT64 1 ++#define KHRONOS_SUPPORT_FLOAT 1 ++ ++#elif defined(_WIN32) && !defined(__SCITECH_SNAP__) ++ ++/* ++ * Win32 ++ */ ++typedef __int32 khronos_int32_t; ++typedef unsigned __int32 khronos_uint32_t; ++typedef __int64 khronos_int64_t; ++typedef unsigned __int64 khronos_uint64_t; ++#define KHRONOS_SUPPORT_INT64 1 ++#define KHRONOS_SUPPORT_FLOAT 1 ++ ++#elif defined(__sun__) || defined(__digital__) ++ ++/* ++ * Sun or Digital ++ */ ++typedef int khronos_int32_t; ++typedef unsigned int khronos_uint32_t; ++#if defined(__arch64__) || defined(_LP64) ++typedef long int khronos_int64_t; ++typedef unsigned long int khronos_uint64_t; ++#else ++typedef long long int khronos_int64_t; ++typedef unsigned long long int khronos_uint64_t; ++#endif /* __arch64__ */ ++#define KHRONOS_SUPPORT_INT64 1 ++#define KHRONOS_SUPPORT_FLOAT 1 ++ ++#elif 0 ++ ++/* ++ * Hypothetical platform with no float or int64 support ++ */ ++typedef int khronos_int32_t; ++typedef unsigned int khronos_uint32_t; ++#define KHRONOS_SUPPORT_INT64 0 ++#define KHRONOS_SUPPORT_FLOAT 0 ++ ++#else ++ ++/* ++ * Generic fallback ++ */ ++#include ++typedef int32_t khronos_int32_t; ++typedef uint32_t khronos_uint32_t; ++typedef int64_t khronos_int64_t; ++typedef uint64_t khronos_uint64_t; ++#define KHRONOS_SUPPORT_INT64 1 ++#define KHRONOS_SUPPORT_FLOAT 1 ++ ++#endif ++ ++ ++/* ++ * Types that are (so far) the same on all platforms ++ */ ++typedef signed char khronos_int8_t; ++typedef unsigned char khronos_uint8_t; ++typedef signed short int khronos_int16_t; ++typedef unsigned short int khronos_uint16_t; ++ ++/* ++ * Types that differ between LLP64 and LP64 architectures - in LLP64, ++ * pointers are 64 bits, but 'long' is still 32 bits. Win64 appears ++ * to be the only LLP64 architecture in current use. ++ */ ++#ifdef KHRONOS_USE_INTPTR_T ++typedef intptr_t khronos_intptr_t; ++typedef uintptr_t khronos_uintptr_t; ++#elif defined(_WIN64) ++typedef signed long long int khronos_intptr_t; ++typedef unsigned long long int khronos_uintptr_t; ++#else ++typedef signed long int khronos_intptr_t; ++typedef unsigned long int khronos_uintptr_t; ++#endif ++ ++#if defined(_WIN64) ++typedef signed long long int khronos_ssize_t; ++typedef unsigned long long int khronos_usize_t; ++#else ++typedef signed long int khronos_ssize_t; ++typedef unsigned long int khronos_usize_t; ++#endif ++ ++#if KHRONOS_SUPPORT_FLOAT ++/* ++ * Float type ++ */ ++typedef float khronos_float_t; ++#endif ++ ++#if KHRONOS_SUPPORT_INT64 ++/* Time types ++ * ++ * These types can be used to represent a time interval in nanoseconds or ++ * an absolute Unadjusted System Time. Unadjusted System Time is the number ++ * of nanoseconds since some arbitrary system event (e.g. since the last ++ * time the system booted). The Unadjusted System Time is an unsigned ++ * 64 bit value that wraps back to 0 every 584 years. Time intervals ++ * may be either signed or unsigned. ++ */ ++typedef khronos_uint64_t khronos_utime_nanoseconds_t; ++typedef khronos_int64_t khronos_stime_nanoseconds_t; ++#endif ++ ++/* ++ * Dummy value used to pad enum types to 32 bits. ++ */ ++#ifndef KHRONOS_MAX_ENUM ++#define KHRONOS_MAX_ENUM 0x7FFFFFFF ++#endif ++ ++/* ++ * Enumerated boolean type ++ * ++ * Values other than zero should be considered to be true. Therefore ++ * comparisons should not be made against KHRONOS_TRUE. ++ */ ++typedef enum { ++ KHRONOS_FALSE = 0, ++ KHRONOS_TRUE = 1, ++ KHRONOS_BOOLEAN_ENUM_FORCE_SIZE = KHRONOS_MAX_ENUM ++} khronos_boolean_enum_t; ++ ++#endif /* __khrplatform_h_ */ +diff --git a/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES.h b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES.h +new file mode 100644 +index 0000000..7dbdbd3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES.h +@@ -0,0 +1,2774 @@ ++/* ++ * Copyright (c) 2007-2009 The Khronos Group Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy of ++ * this software and /or associated documentation files (the "Materials "), to ++ * deal in the Materials without restriction, including without limitation the ++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Materials, and to permit persons to whom the Materials are ++ * furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Materials. ++ * ++ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE ++ * MATERIALS. ++ * ++ * OpenSLES.h - OpenSL ES version 1.0.1 ++ * ++ */ ++ ++/****************************************************************************/ ++/* NOTE: This file is a standard OpenSL ES header file and should not be */ ++/* modified in any way. */ ++/****************************************************************************/ ++ ++#ifndef OPENSL_ES_H_ ++#define OPENSL_ES_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include "OpenSLES_Platform.h" ++ ++ ++/*****************************************************************************/ ++/* Common types, structures, and defines */ ++/*****************************************************************************/ ++ ++#ifndef _KHRONOS_KEYS_ ++#define _KHRONOS_KEYS_ ++ ++#define KHRONOS_TITLE "KhronosTitle" ++#define KHRONOS_ALBUM "KhronosAlbum" ++#define KHRONOS_TRACK_NUMBER "KhronosTrackNumber" ++#define KHRONOS_ARTIST "KhronosArtist" ++#define KHRONOS_GENRE "KhronosGenre" ++#define KHRONOS_YEAR "KhronosYear" ++#define KHRONOS_COMMENT "KhronosComment" ++#define KHRONOS_ARTIST_URL "KhronosArtistURL" ++#define KHRONOS_CONTENT_URL "KhronosContentURL" ++#define KHRONOS_RATING "KhronosRating" ++#define KHRONOS_ALBUM_ART "KhronosAlbumArt" ++#define KHRONOS_COPYRIGHT "KhronosCopyright" ++ ++#endif ++ ++ ++/* remap common types to SL types for clarity */ ++typedef sl_int8_t SLint8; /* 8 bit signed integer */ ++typedef sl_uint8_t SLuint8; /* 8 bit unsigned integer */ ++typedef sl_int16_t SLint16; /* 16 bit signed integer */ ++typedef sl_uint16_t SLuint16; /* 16 bit unsigned integer */ ++typedef sl_int32_t SLint32; /* 32 bit signed integer */ ++typedef sl_uint32_t SLuint32; /* 32 bit unsigned integer */ ++ ++typedef SLuint32 SLboolean; ++#define SL_BOOLEAN_FALSE ((SLboolean) 0x00000000) ++#define SL_BOOLEAN_TRUE ((SLboolean) 0x00000001) ++ ++typedef SLuint8 SLchar; /* UTF-8 is to be used */ ++typedef SLint16 SLmillibel; ++typedef SLuint32 SLmillisecond; ++typedef SLuint32 SLmilliHertz; ++typedef SLint32 SLmillimeter; ++typedef SLint32 SLmillidegree; ++typedef SLint16 SLpermille; ++typedef SLuint32 SLmicrosecond; ++typedef SLuint32 SLresult; ++ ++#define SL_MILLIBEL_MAX ((SLmillibel) 0x7FFF) ++#define SL_MILLIBEL_MIN ((SLmillibel) (-SL_MILLIBEL_MAX-1)) ++ ++#define SL_MILLIHERTZ_MAX ((SLmilliHertz) 0xFFFFFFFF) ++#define SL_MILLIMETER_MAX ((SLmillimeter) 0x7FFFFFFF) ++ ++/** Interface ID defined as a UUID */ ++typedef const struct SLInterfaceID_ { ++ SLuint32 time_low; ++ SLuint16 time_mid; ++ SLuint16 time_hi_and_version; ++ SLuint16 clock_seq; ++ SLuint8 node[6]; ++} * SLInterfaceID; ++ ++/* Forward declaration for the object interface */ ++struct SLObjectItf_; ++ ++typedef const struct SLObjectItf_ * const * SLObjectItf; ++ ++/* Objects ID's */ ++ ++#define SL_OBJECTID_ENGINE ((SLuint32) 0x00001001) ++#define SL_OBJECTID_LEDDEVICE ((SLuint32) 0x00001002) ++#define SL_OBJECTID_VIBRADEVICE ((SLuint32) 0x00001003) ++#define SL_OBJECTID_AUDIOPLAYER ((SLuint32) 0x00001004) ++#define SL_OBJECTID_AUDIORECORDER ((SLuint32) 0x00001005) ++#define SL_OBJECTID_MIDIPLAYER ((SLuint32) 0x00001006) ++#define SL_OBJECTID_LISTENER ((SLuint32) 0x00001007) ++#define SL_OBJECTID_3DGROUP ((SLuint32) 0x00001008) ++#define SL_OBJECTID_OUTPUTMIX ((SLuint32) 0x00001009) ++#define SL_OBJECTID_METADATAEXTRACTOR ((SLuint32) 0x0000100A) ++ ++ ++/* SL Profiles */ ++ ++#define SL_PROFILES_PHONE ((SLuint16) 0x0001) ++#define SL_PROFILES_MUSIC ((SLuint16) 0x0002) ++#define SL_PROFILES_GAME ((SLuint16) 0x0004) ++ ++/* Types of voices supported by the system */ ++ ++#define SL_VOICETYPE_2D_AUDIO ((SLuint16) 0x0001) ++#define SL_VOICETYPE_MIDI ((SLuint16) 0x0002) ++#define SL_VOICETYPE_3D_AUDIO ((SLuint16) 0x0004) ++#define SL_VOICETYPE_3D_MIDIOUTPUT ((SLuint16) 0x0008) ++ ++/* Convenient macros representing various different priority levels, for use with the SetPriority method */ ++ ++#define SL_PRIORITY_LOWEST ((SLint32) (-0x7FFFFFFF-1)) ++#define SL_PRIORITY_VERYLOW ((SLint32) -0x60000000) ++#define SL_PRIORITY_LOW ((SLint32) -0x40000000) ++#define SL_PRIORITY_BELOWNORMAL ((SLint32) -0x20000000) ++#define SL_PRIORITY_NORMAL ((SLint32) 0x00000000) ++#define SL_PRIORITY_ABOVENORMAL ((SLint32) 0x20000000) ++#define SL_PRIORITY_HIGH ((SLint32) 0x40000000) ++#define SL_PRIORITY_VERYHIGH ((SLint32) 0x60000000) ++#define SL_PRIORITY_HIGHEST ((SLint32) 0x7FFFFFFF) ++ ++ ++/** These macros list the various sample formats that are possible on audio input and output devices. */ ++ ++#define SL_PCMSAMPLEFORMAT_FIXED_8 ((SLuint16) 0x0008) ++#define SL_PCMSAMPLEFORMAT_FIXED_16 ((SLuint16) 0x0010) ++#define SL_PCMSAMPLEFORMAT_FIXED_20 ((SLuint16) 0x0014) ++#define SL_PCMSAMPLEFORMAT_FIXED_24 ((SLuint16) 0x0018) ++#define SL_PCMSAMPLEFORMAT_FIXED_28 ((SLuint16) 0x001C) ++#define SL_PCMSAMPLEFORMAT_FIXED_32 ((SLuint16) 0x0020) ++ ++ ++/** These macros specify the commonly used sampling rates (in milliHertz) supported by most audio I/O devices. */ ++ ++#define SL_SAMPLINGRATE_8 ((SLuint32) 8000000) ++#define SL_SAMPLINGRATE_11_025 ((SLuint32) 11025000) ++#define SL_SAMPLINGRATE_12 ((SLuint32) 12000000) ++#define SL_SAMPLINGRATE_16 ((SLuint32) 16000000) ++#define SL_SAMPLINGRATE_22_05 ((SLuint32) 22050000) ++#define SL_SAMPLINGRATE_24 ((SLuint32) 24000000) ++#define SL_SAMPLINGRATE_32 ((SLuint32) 32000000) ++#define SL_SAMPLINGRATE_44_1 ((SLuint32) 44100000) ++#define SL_SAMPLINGRATE_48 ((SLuint32) 48000000) ++#define SL_SAMPLINGRATE_64 ((SLuint32) 64000000) ++#define SL_SAMPLINGRATE_88_2 ((SLuint32) 88200000) ++#define SL_SAMPLINGRATE_96 ((SLuint32) 96000000) ++#define SL_SAMPLINGRATE_192 ((SLuint32) 192000000) ++ ++#define SL_SPEAKER_FRONT_LEFT ((SLuint32) 0x00000001) ++#define SL_SPEAKER_FRONT_RIGHT ((SLuint32) 0x00000002) ++#define SL_SPEAKER_FRONT_CENTER ((SLuint32) 0x00000004) ++#define SL_SPEAKER_LOW_FREQUENCY ((SLuint32) 0x00000008) ++#define SL_SPEAKER_BACK_LEFT ((SLuint32) 0x00000010) ++#define SL_SPEAKER_BACK_RIGHT ((SLuint32) 0x00000020) ++#define SL_SPEAKER_FRONT_LEFT_OF_CENTER ((SLuint32) 0x00000040) ++#define SL_SPEAKER_FRONT_RIGHT_OF_CENTER ((SLuint32) 0x00000080) ++#define SL_SPEAKER_BACK_CENTER ((SLuint32) 0x00000100) ++#define SL_SPEAKER_SIDE_LEFT ((SLuint32) 0x00000200) ++#define SL_SPEAKER_SIDE_RIGHT ((SLuint32) 0x00000400) ++#define SL_SPEAKER_TOP_CENTER ((SLuint32) 0x00000800) ++#define SL_SPEAKER_TOP_FRONT_LEFT ((SLuint32) 0x00001000) ++#define SL_SPEAKER_TOP_FRONT_CENTER ((SLuint32) 0x00002000) ++#define SL_SPEAKER_TOP_FRONT_RIGHT ((SLuint32) 0x00004000) ++#define SL_SPEAKER_TOP_BACK_LEFT ((SLuint32) 0x00008000) ++#define SL_SPEAKER_TOP_BACK_CENTER ((SLuint32) 0x00010000) ++#define SL_SPEAKER_TOP_BACK_RIGHT ((SLuint32) 0x00020000) ++ ++ ++/*****************************************************************************/ ++/* Errors */ ++/* */ ++/*****************************************************************************/ ++ ++#define SL_RESULT_SUCCESS ((SLuint32) 0x00000000) ++#define SL_RESULT_PRECONDITIONS_VIOLATED ((SLuint32) 0x00000001) ++#define SL_RESULT_PARAMETER_INVALID ((SLuint32) 0x00000002) ++#define SL_RESULT_MEMORY_FAILURE ((SLuint32) 0x00000003) ++#define SL_RESULT_RESOURCE_ERROR ((SLuint32) 0x00000004) ++#define SL_RESULT_RESOURCE_LOST ((SLuint32) 0x00000005) ++#define SL_RESULT_IO_ERROR ((SLuint32) 0x00000006) ++#define SL_RESULT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000007) ++#define SL_RESULT_CONTENT_CORRUPTED ((SLuint32) 0x00000008) ++#define SL_RESULT_CONTENT_UNSUPPORTED ((SLuint32) 0x00000009) ++#define SL_RESULT_CONTENT_NOT_FOUND ((SLuint32) 0x0000000A) ++#define SL_RESULT_PERMISSION_DENIED ((SLuint32) 0x0000000B) ++#define SL_RESULT_FEATURE_UNSUPPORTED ((SLuint32) 0x0000000C) ++#define SL_RESULT_INTERNAL_ERROR ((SLuint32) 0x0000000D) ++#define SL_RESULT_UNKNOWN_ERROR ((SLuint32) 0x0000000E) ++#define SL_RESULT_OPERATION_ABORTED ((SLuint32) 0x0000000F) ++#define SL_RESULT_CONTROL_LOST ((SLuint32) 0x00000010) ++ ++ ++/* Object state definitions */ ++ ++#define SL_OBJECT_STATE_UNREALIZED ((SLuint32) 0x00000001) ++#define SL_OBJECT_STATE_REALIZED ((SLuint32) 0x00000002) ++#define SL_OBJECT_STATE_SUSPENDED ((SLuint32) 0x00000003) ++ ++/* Object event definitions */ ++ ++#define SL_OBJECT_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) ++#define SL_OBJECT_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) ++#define SL_OBJECT_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) ++#define SL_OBJECT_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000004) ++#define SL_OBJECT_EVENT_ITF_CONTROL_TAKEN ((SLuint32) 0x00000005) ++#define SL_OBJECT_EVENT_ITF_CONTROL_RETURNED ((SLuint32) 0x00000006) ++#define SL_OBJECT_EVENT_ITF_PARAMETERS_CHANGED ((SLuint32) 0x00000007) ++ ++ ++/*****************************************************************************/ ++/* Interface definitions */ ++/*****************************************************************************/ ++ ++/** NULL Interface */ ++ ++extern const SLInterfaceID SL_IID_NULL; ++ ++/*---------------------------------------------------------------------------*/ ++/* Data Source and Data Sink Structures */ ++/*---------------------------------------------------------------------------*/ ++ ++/** Data locator macros */ ++#define SL_DATALOCATOR_URI ((SLuint32) 0x00000001) ++#define SL_DATALOCATOR_ADDRESS ((SLuint32) 0x00000002) ++#define SL_DATALOCATOR_IODEVICE ((SLuint32) 0x00000003) ++#define SL_DATALOCATOR_OUTPUTMIX ((SLuint32) 0x00000004) ++#define SL_DATALOCATOR_RESERVED5 ((SLuint32) 0x00000005) ++#define SL_DATALOCATOR_BUFFERQUEUE ((SLuint32) 0x00000006) ++#define SL_DATALOCATOR_MIDIBUFFERQUEUE ((SLuint32) 0x00000007) ++#define SL_DATALOCATOR_RESERVED8 ((SLuint32) 0x00000008) ++ ++ ++ ++/** URI-based data locator definition where locatorType must be SL_DATALOCATOR_URI*/ ++typedef struct SLDataLocator_URI_ { ++ SLuint32 locatorType; ++ SLchar * URI; ++} SLDataLocator_URI; ++ ++/** Address-based data locator definition where locatorType must be SL_DATALOCATOR_ADDRESS*/ ++typedef struct SLDataLocator_Address_ { ++ SLuint32 locatorType; ++ void *pAddress; ++ SLuint32 length; ++} SLDataLocator_Address; ++ ++/** IODevice-types */ ++#define SL_IODEVICE_AUDIOINPUT ((SLuint32) 0x00000001) ++#define SL_IODEVICE_LEDARRAY ((SLuint32) 0x00000002) ++#define SL_IODEVICE_VIBRA ((SLuint32) 0x00000003) ++#define SL_IODEVICE_RESERVED4 ((SLuint32) 0x00000004) ++#define SL_IODEVICE_RESERVED5 ((SLuint32) 0x00000005) ++ ++/** IODevice-based data locator definition where locatorType must be SL_DATALOCATOR_IODEVICE*/ ++typedef struct SLDataLocator_IODevice_ { ++ SLuint32 locatorType; ++ SLuint32 deviceType; ++ SLuint32 deviceID; ++ SLObjectItf device; ++} SLDataLocator_IODevice; ++ ++/** OutputMix-based data locator definition where locatorType must be SL_DATALOCATOR_OUTPUTMIX*/ ++typedef struct SLDataLocator_OutputMix { ++ SLuint32 locatorType; ++ SLObjectItf outputMix; ++} SLDataLocator_OutputMix; ++ ++ ++/** BufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_BUFFERQUEUE*/ ++typedef struct SLDataLocator_BufferQueue { ++ SLuint32 locatorType; ++ SLuint32 numBuffers; ++} SLDataLocator_BufferQueue; ++ ++/** MidiBufferQueue-based data locator definition where locatorType must be SL_DATALOCATOR_MIDIBUFFERQUEUE*/ ++typedef struct SLDataLocator_MIDIBufferQueue { ++ SLuint32 locatorType; ++ SLuint32 tpqn; ++ SLuint32 numBuffers; ++} SLDataLocator_MIDIBufferQueue; ++ ++/** Data format defines */ ++#define SL_DATAFORMAT_MIME ((SLuint32) 0x00000001) ++#define SL_DATAFORMAT_PCM ((SLuint32) 0x00000002) ++#define SL_DATAFORMAT_RESERVED3 ((SLuint32) 0x00000003) ++ ++ ++/** MIME-type-based data format definition where formatType must be SL_DATAFORMAT_MIME*/ ++typedef struct SLDataFormat_MIME_ { ++ SLuint32 formatType; ++ SLchar * mimeType; ++ SLuint32 containerType; ++} SLDataFormat_MIME; ++ ++/* Byte order of a block of 16- or 32-bit data */ ++#define SL_BYTEORDER_BIGENDIAN ((SLuint32) 0x00000001) ++#define SL_BYTEORDER_LITTLEENDIAN ((SLuint32) 0x00000002) ++ ++/* Container type */ ++#define SL_CONTAINERTYPE_UNSPECIFIED ((SLuint32) 0x00000001) ++#define SL_CONTAINERTYPE_RAW ((SLuint32) 0x00000002) ++#define SL_CONTAINERTYPE_ASF ((SLuint32) 0x00000003) ++#define SL_CONTAINERTYPE_AVI ((SLuint32) 0x00000004) ++#define SL_CONTAINERTYPE_BMP ((SLuint32) 0x00000005) ++#define SL_CONTAINERTYPE_JPG ((SLuint32) 0x00000006) ++#define SL_CONTAINERTYPE_JPG2000 ((SLuint32) 0x00000007) ++#define SL_CONTAINERTYPE_M4A ((SLuint32) 0x00000008) ++#define SL_CONTAINERTYPE_MP3 ((SLuint32) 0x00000009) ++#define SL_CONTAINERTYPE_MP4 ((SLuint32) 0x0000000A) ++#define SL_CONTAINERTYPE_MPEG_ES ((SLuint32) 0x0000000B) ++#define SL_CONTAINERTYPE_MPEG_PS ((SLuint32) 0x0000000C) ++#define SL_CONTAINERTYPE_MPEG_TS ((SLuint32) 0x0000000D) ++#define SL_CONTAINERTYPE_QT ((SLuint32) 0x0000000E) ++#define SL_CONTAINERTYPE_WAV ((SLuint32) 0x0000000F) ++#define SL_CONTAINERTYPE_XMF_0 ((SLuint32) 0x00000010) ++#define SL_CONTAINERTYPE_XMF_1 ((SLuint32) 0x00000011) ++#define SL_CONTAINERTYPE_XMF_2 ((SLuint32) 0x00000012) ++#define SL_CONTAINERTYPE_XMF_3 ((SLuint32) 0x00000013) ++#define SL_CONTAINERTYPE_XMF_GENERIC ((SLuint32) 0x00000014) ++#define SL_CONTAINERTYPE_AMR ((SLuint32) 0x00000015) ++#define SL_CONTAINERTYPE_AAC ((SLuint32) 0x00000016) ++#define SL_CONTAINERTYPE_3GPP ((SLuint32) 0x00000017) ++#define SL_CONTAINERTYPE_3GA ((SLuint32) 0x00000018) ++#define SL_CONTAINERTYPE_RM ((SLuint32) 0x00000019) ++#define SL_CONTAINERTYPE_DMF ((SLuint32) 0x0000001A) ++#define SL_CONTAINERTYPE_SMF ((SLuint32) 0x0000001B) ++#define SL_CONTAINERTYPE_MOBILE_DLS ((SLuint32) 0x0000001C) ++#define SL_CONTAINERTYPE_OGG ((SLuint32) 0x0000001D) ++ ++ ++/** PCM-type-based data format definition where formatType must be SL_DATAFORMAT_PCM*/ ++typedef struct SLDataFormat_PCM_ { ++ SLuint32 formatType; ++ SLuint32 numChannels; ++ SLuint32 samplesPerSec; ++ SLuint32 bitsPerSample; ++ SLuint32 containerSize; ++ SLuint32 channelMask; ++ SLuint32 endianness; ++} SLDataFormat_PCM; ++ ++typedef struct SLDataSource_ { ++ void *pLocator; ++ void *pFormat; ++} SLDataSource; ++ ++ ++typedef struct SLDataSink_ { ++ void *pLocator; ++ void *pFormat; ++} SLDataSink; ++ ++ ++ ++ ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Standard Object Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_OBJECT; ++ ++/** Object callback */ ++ ++ ++typedef void (SLAPIENTRY *slObjectCallback) ( ++ SLObjectItf caller, ++ const void * pContext, ++ SLuint32 event, ++ SLresult result, ++ SLuint32 param, ++ void *pInterface ++); ++ ++ ++struct SLObjectItf_ { ++ SLresult (*Realize) ( ++ SLObjectItf self, ++ SLboolean async ++ ); ++ SLresult (*Resume) ( ++ SLObjectItf self, ++ SLboolean async ++ ); ++ SLresult (*GetState) ( ++ SLObjectItf self, ++ SLuint32 * pState ++ ); ++ SLresult (*GetInterface) ( ++ SLObjectItf self, ++ const SLInterfaceID iid, ++ void * pInterface ++ ); ++ SLresult (*RegisterCallback) ( ++ SLObjectItf self, ++ slObjectCallback callback, ++ void * pContext ++ ); ++ void (*AbortAsyncOperation) ( ++ SLObjectItf self ++ ); ++ void (*Destroy) ( ++ SLObjectItf self ++ ); ++ SLresult (*SetPriority) ( ++ SLObjectItf self, ++ SLint32 priority, ++ SLboolean preemptable ++ ); ++ SLresult (*GetPriority) ( ++ SLObjectItf self, ++ SLint32 *pPriority, ++ SLboolean *pPreemptable ++ ); ++ SLresult (*SetLossOfControlInterfaces) ( ++ SLObjectItf self, ++ SLint16 numInterfaces, ++ SLInterfaceID * pInterfaceIDs, ++ SLboolean enabled ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Audio IO Device capabilities interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_DEFAULTDEVICEID_AUDIOINPUT ((SLuint32) 0xFFFFFFFF) ++#define SL_DEFAULTDEVICEID_AUDIOOUTPUT ((SLuint32) 0xFFFFFFFE) ++#define SL_DEFAULTDEVICEID_LED ((SLuint32) 0xFFFFFFFD) ++#define SL_DEFAULTDEVICEID_VIBRA ((SLuint32) 0xFFFFFFFC) ++#define SL_DEFAULTDEVICEID_RESERVED1 ((SLuint32) 0xFFFFFFFB) ++ ++ ++#define SL_DEVCONNECTION_INTEGRATED ((SLint16) 0x0001) ++#define SL_DEVCONNECTION_ATTACHED_WIRED ((SLint16) 0x0100) ++#define SL_DEVCONNECTION_ATTACHED_WIRELESS ((SLint16) 0x0200) ++#define SL_DEVCONNECTION_NETWORK ((SLint16) 0x0400) ++ ++ ++#define SL_DEVLOCATION_HANDSET ((SLuint16) 0x0001) ++#define SL_DEVLOCATION_HEADSET ((SLuint16) 0x0002) ++#define SL_DEVLOCATION_CARKIT ((SLuint16) 0x0003) ++#define SL_DEVLOCATION_DOCK ((SLuint16) 0x0004) ++#define SL_DEVLOCATION_REMOTE ((SLuint16) 0x0005) ++/* Note: SL_DEVLOCATION_RESLTE is deprecated, use SL_DEVLOCATION_REMOTE instead. */ ++#define SL_DEVLOCATION_RESLTE ((SLuint16) 0x0005) ++ ++ ++#define SL_DEVSCOPE_UNKNOWN ((SLuint16) 0x0001) ++#define SL_DEVSCOPE_ENVIRONMENT ((SLuint16) 0x0002) ++#define SL_DEVSCOPE_USER ((SLuint16) 0x0003) ++ ++ ++typedef struct SLAudioInputDescriptor_ { ++ SLchar *deviceName; ++ SLint16 deviceConnection; ++ SLint16 deviceScope; ++ SLint16 deviceLocation; ++ SLboolean isForTelephony; ++ SLmilliHertz minSampleRate; ++ SLmilliHertz maxSampleRate; ++ SLboolean isFreqRangeContinuous; ++ SLmilliHertz *samplingRatesSupported; ++ SLint16 numOfSamplingRatesSupported; ++ SLint16 maxChannels; ++} SLAudioInputDescriptor; ++ ++ ++typedef struct SLAudioOutputDescriptor_ { ++ SLchar *pDeviceName; ++ SLint16 deviceConnection; ++ SLint16 deviceScope; ++ SLint16 deviceLocation; ++ SLboolean isForTelephony; ++ SLmilliHertz minSampleRate; ++ SLmilliHertz maxSampleRate; ++ SLboolean isFreqRangeContinuous; ++ SLmilliHertz *samplingRatesSupported; ++ SLint16 numOfSamplingRatesSupported; ++ SLint16 maxChannels; ++} SLAudioOutputDescriptor; ++ ++ ++ ++extern const SLInterfaceID SL_IID_AUDIOIODEVICECAPABILITIES; ++ ++struct SLAudioIODeviceCapabilitiesItf_; ++typedef const struct SLAudioIODeviceCapabilitiesItf_ * const * SLAudioIODeviceCapabilitiesItf; ++ ++ ++typedef void (SLAPIENTRY *slAvailableAudioInputsChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf caller, ++ void *pContext, ++ SLuint32 deviceID, ++ SLint32 numInputs, ++ SLboolean isNew ++); ++ ++ ++typedef void (SLAPIENTRY *slAvailableAudioOutputsChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf caller, ++ void *pContext, ++ SLuint32 deviceID, ++ SLint32 numOutputs, ++ SLboolean isNew ++); ++ ++typedef void (SLAPIENTRY *slDefaultDeviceIDMapChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf caller, ++ void *pContext, ++ SLboolean isOutput, ++ SLint32 numDevices ++); ++ ++ ++struct SLAudioIODeviceCapabilitiesItf_ { ++ SLresult (*GetAvailableAudioInputs)( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLint32 *pNumInputs, ++ SLuint32 *pInputDeviceIDs ++ ); ++ SLresult (*QueryAudioInputCapabilities)( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 deviceId, ++ SLAudioInputDescriptor *pDescriptor ++ ); ++ SLresult (*RegisterAvailableAudioInputsChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ slAvailableAudioInputsChangedCallback callback, ++ void *pContext ++ ); ++ SLresult (*GetAvailableAudioOutputs)( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLint32 *pNumOutputs, ++ SLuint32 *pOutputDeviceIDs ++ ); ++ SLresult (*QueryAudioOutputCapabilities)( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 deviceId, ++ SLAudioOutputDescriptor *pDescriptor ++ ); ++ SLresult (*RegisterAvailableAudioOutputsChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ slAvailableAudioOutputsChangedCallback callback, ++ void *pContext ++ ); ++ SLresult (*RegisterDefaultDeviceIDMapChangedCallback) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ slDefaultDeviceIDMapChangedCallback callback, ++ void *pContext ++ ); ++ SLresult (*GetAssociatedAudioInputs) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 deviceId, ++ SLint32 *pNumAudioInputs, ++ SLuint32 *pAudioInputDeviceIDs ++ ); ++ SLresult (*GetAssociatedAudioOutputs) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 deviceId, ++ SLint32 *pNumAudioOutputs, ++ SLuint32 *pAudioOutputDeviceIDs ++ ); ++ SLresult (*GetDefaultAudioDevices) ( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 defaultDeviceID, ++ SLint32 *pNumAudioDevices, ++ SLuint32 *pAudioDeviceIDs ++ ); ++ SLresult (*QuerySampleFormatsSupported)( ++ SLAudioIODeviceCapabilitiesItf self, ++ SLuint32 deviceId, ++ SLmilliHertz samplingRate, ++ SLint32 *pSampleFormats, ++ SLint32 *pNumOfSampleFormats ++ ); ++}; ++ ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Capabilities of the LED array IODevice */ ++/*---------------------------------------------------------------------------*/ ++ ++typedef struct SLLEDDescriptor_ { ++ SLuint8 ledCount; ++ SLuint8 primaryLED; ++ SLuint32 colorMask; ++} SLLEDDescriptor; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* LED Array interface */ ++/*---------------------------------------------------------------------------*/ ++ ++typedef struct SLHSL_ { ++ SLmillidegree hue; ++ SLpermille saturation; ++ SLpermille lightness; ++} SLHSL; ++ ++ ++extern const SLInterfaceID SL_IID_LED; ++ ++struct SLLEDArrayItf_; ++typedef const struct SLLEDArrayItf_ * const * SLLEDArrayItf; ++ ++struct SLLEDArrayItf_ { ++ SLresult (*ActivateLEDArray) ( ++ SLLEDArrayItf self, ++ SLuint32 lightMask ++ ); ++ SLresult (*IsLEDArrayActivated) ( ++ SLLEDArrayItf self, ++ SLuint32 *lightMask ++ ); ++ SLresult (*SetColor) ( ++ SLLEDArrayItf self, ++ SLuint8 index, ++ const SLHSL *color ++ ); ++ SLresult (*GetColor) ( ++ SLLEDArrayItf self, ++ SLuint8 index, ++ SLHSL *color ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Capabilities of the Vibra IODevice */ ++/*---------------------------------------------------------------------------*/ ++ ++typedef struct SLVibraDescriptor_ { ++ SLboolean supportsFrequency; ++ SLboolean supportsIntensity; ++ SLmilliHertz minFrequency; ++ SLmilliHertz maxFrequency; ++} SLVibraDescriptor; ++ ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Vibra interface */ ++/*---------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_VIBRA; ++ ++ ++struct SLVibraItf_; ++typedef const struct SLVibraItf_ * const * SLVibraItf; ++ ++struct SLVibraItf_ { ++ SLresult (*Vibrate) ( ++ SLVibraItf self, ++ SLboolean vibrate ++ ); ++ SLresult (*IsVibrating) ( ++ SLVibraItf self, ++ SLboolean *pVibrating ++ ); ++ SLresult (*SetFrequency) ( ++ SLVibraItf self, ++ SLmilliHertz frequency ++ ); ++ SLresult (*GetFrequency) ( ++ SLVibraItf self, ++ SLmilliHertz *pFrequency ++ ); ++ SLresult (*SetIntensity) ( ++ SLVibraItf self, ++ SLpermille intensity ++ ); ++ SLresult (*GetIntensity) ( ++ SLVibraItf self, ++ SLpermille *pIntensity ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Meta data extraction related types and interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_CHARACTERENCODING_UNKNOWN ((SLuint32) 0x00000000) ++#define SL_CHARACTERENCODING_BINARY ((SLuint32) 0x00000001) ++#define SL_CHARACTERENCODING_ASCII ((SLuint32) 0x00000002) ++#define SL_CHARACTERENCODING_BIG5 ((SLuint32) 0x00000003) ++#define SL_CHARACTERENCODING_CODEPAGE1252 ((SLuint32) 0x00000004) ++#define SL_CHARACTERENCODING_GB2312 ((SLuint32) 0x00000005) ++#define SL_CHARACTERENCODING_HZGB2312 ((SLuint32) 0x00000006) ++#define SL_CHARACTERENCODING_GB12345 ((SLuint32) 0x00000007) ++#define SL_CHARACTERENCODING_GB18030 ((SLuint32) 0x00000008) ++#define SL_CHARACTERENCODING_GBK ((SLuint32) 0x00000009) ++#define SL_CHARACTERENCODING_IMAPUTF7 ((SLuint32) 0x0000000A) ++#define SL_CHARACTERENCODING_ISO2022JP ((SLuint32) 0x0000000B) ++#define SL_CHARACTERENCODING_ISO2022JP1 ((SLuint32) 0x0000000B) ++#define SL_CHARACTERENCODING_ISO88591 ((SLuint32) 0x0000000C) ++#define SL_CHARACTERENCODING_ISO885910 ((SLuint32) 0x0000000D) ++#define SL_CHARACTERENCODING_ISO885913 ((SLuint32) 0x0000000E) ++#define SL_CHARACTERENCODING_ISO885914 ((SLuint32) 0x0000000F) ++#define SL_CHARACTERENCODING_ISO885915 ((SLuint32) 0x00000010) ++#define SL_CHARACTERENCODING_ISO88592 ((SLuint32) 0x00000011) ++#define SL_CHARACTERENCODING_ISO88593 ((SLuint32) 0x00000012) ++#define SL_CHARACTERENCODING_ISO88594 ((SLuint32) 0x00000013) ++#define SL_CHARACTERENCODING_ISO88595 ((SLuint32) 0x00000014) ++#define SL_CHARACTERENCODING_ISO88596 ((SLuint32) 0x00000015) ++#define SL_CHARACTERENCODING_ISO88597 ((SLuint32) 0x00000016) ++#define SL_CHARACTERENCODING_ISO88598 ((SLuint32) 0x00000017) ++#define SL_CHARACTERENCODING_ISO88599 ((SLuint32) 0x00000018) ++#define SL_CHARACTERENCODING_ISOEUCJP ((SLuint32) 0x00000019) ++#define SL_CHARACTERENCODING_SHIFTJIS ((SLuint32) 0x0000001A) ++#define SL_CHARACTERENCODING_SMS7BIT ((SLuint32) 0x0000001B) ++#define SL_CHARACTERENCODING_UTF7 ((SLuint32) 0x0000001C) ++#define SL_CHARACTERENCODING_UTF8 ((SLuint32) 0x0000001D) ++#define SL_CHARACTERENCODING_JAVACONFORMANTUTF8 ((SLuint32) 0x0000001E) ++#define SL_CHARACTERENCODING_UTF16BE ((SLuint32) 0x0000001F) ++#define SL_CHARACTERENCODING_UTF16LE ((SLuint32) 0x00000020) ++ ++ ++#define SL_METADATA_FILTER_KEY ((SLuint8) 0x01) ++#define SL_METADATA_FILTER_LANG ((SLuint8) 0x02) ++#define SL_METADATA_FILTER_ENCODING ((SLuint8) 0x04) ++ ++ ++typedef struct SLMetadataInfo_ { ++ SLuint32 size; ++ SLuint32 encoding; ++ SLchar langCountry[16]; ++ SLuint8 data[1]; ++} SLMetadataInfo; ++ ++extern const SLInterfaceID SL_IID_METADATAEXTRACTION; ++ ++struct SLMetadataExtractionItf_; ++typedef const struct SLMetadataExtractionItf_ * const * SLMetadataExtractionItf; ++ ++ ++struct SLMetadataExtractionItf_ { ++ SLresult (*GetItemCount) ( ++ SLMetadataExtractionItf self, ++ SLuint32 *pItemCount ++ ); ++ SLresult (*GetKeySize) ( ++ SLMetadataExtractionItf self, ++ SLuint32 index, ++ SLuint32 *pKeySize ++ ); ++ SLresult (*GetKey) ( ++ SLMetadataExtractionItf self, ++ SLuint32 index, ++ SLuint32 keySize, ++ SLMetadataInfo *pKey ++ ); ++ SLresult (*GetValueSize) ( ++ SLMetadataExtractionItf self, ++ SLuint32 index, ++ SLuint32 *pValueSize ++ ); ++ SLresult (*GetValue) ( ++ SLMetadataExtractionItf self, ++ SLuint32 index, ++ SLuint32 valueSize, ++ SLMetadataInfo *pValue ++ ); ++ SLresult (*AddKeyFilter) ( ++ SLMetadataExtractionItf self, ++ SLuint32 keySize, ++ const void *pKey, ++ SLuint32 keyEncoding, ++ const SLchar *pValueLangCountry, ++ SLuint32 valueEncoding, ++ SLuint8 filterMask ++ ); ++ SLresult (*ClearKeyFilter) ( ++ SLMetadataExtractionItf self ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Meta data traversal related types and interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_METADATATRAVERSALMODE_ALL ((SLuint32) 0x00000001) ++#define SL_METADATATRAVERSALMODE_NODE ((SLuint32) 0x00000002) ++ ++ ++#define SL_NODETYPE_UNSPECIFIED ((SLuint32) 0x00000001) ++#define SL_NODETYPE_AUDIO ((SLuint32) 0x00000002) ++#define SL_NODETYPE_VIDEO ((SLuint32) 0x00000003) ++#define SL_NODETYPE_IMAGE ((SLuint32) 0x00000004) ++ ++#define SL_NODE_PARENT 0xFFFFFFFF ++ ++extern const SLInterfaceID SL_IID_METADATATRAVERSAL; ++ ++struct SLMetadataTraversalItf_; ++typedef const struct SLMetadataTraversalItf_ * const * SLMetadataTraversalItf; ++ ++struct SLMetadataTraversalItf_ { ++ SLresult (*SetMode) ( ++ SLMetadataTraversalItf self, ++ SLuint32 mode ++ ); ++ SLresult (*GetChildCount) ( ++ SLMetadataTraversalItf self, ++ SLuint32 *pCount ++ ); ++ SLresult (*GetChildMIMETypeSize) ( ++ SLMetadataTraversalItf self, ++ SLuint32 index, ++ SLuint32 *pSize ++ ); ++ SLresult (*GetChildInfo) ( ++ SLMetadataTraversalItf self, ++ SLuint32 index, ++ SLint32 *pNodeID, ++ SLuint32 *pType, ++ SLuint32 size, ++ SLchar *pMimeType ++ ); ++ SLresult (*SetActiveNode) ( ++ SLMetadataTraversalItf self, ++ SLuint32 index ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Dynamic Source types and interface */ ++/*---------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_DYNAMICSOURCE; ++ ++struct SLDynamicSourceItf_; ++typedef const struct SLDynamicSourceItf_ * const * SLDynamicSourceItf; ++ ++struct SLDynamicSourceItf_ { ++ SLresult (*SetSource) ( ++ SLDynamicSourceItf self, ++ SLDataSource *pDataSource ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Output Mix interface */ ++/*---------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_OUTPUTMIX; ++ ++struct SLOutputMixItf_; ++typedef const struct SLOutputMixItf_ * const * SLOutputMixItf; ++ ++typedef void (SLAPIENTRY *slMixDeviceChangeCallback) ( ++ SLOutputMixItf caller, ++ void *pContext ++); ++ ++ ++struct SLOutputMixItf_ { ++ SLresult (*GetDestinationOutputDeviceIDs) ( ++ SLOutputMixItf self, ++ SLint32 *pNumDevices, ++ SLuint32 *pDeviceIDs ++ ); ++ SLresult (*RegisterDeviceChangeCallback) ( ++ SLOutputMixItf self, ++ slMixDeviceChangeCallback callback, ++ void *pContext ++ ); ++ SLresult (*ReRoute)( ++ SLOutputMixItf self, ++ SLint32 numOutputDevices, ++ SLuint32 *pOutputDeviceIDs ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Playback interface */ ++/*---------------------------------------------------------------------------*/ ++ ++/** Playback states */ ++#define SL_PLAYSTATE_STOPPED ((SLuint32) 0x00000001) ++#define SL_PLAYSTATE_PAUSED ((SLuint32) 0x00000002) ++#define SL_PLAYSTATE_PLAYING ((SLuint32) 0x00000003) ++ ++/** Play events **/ ++#define SL_PLAYEVENT_HEADATEND ((SLuint32) 0x00000001) ++#define SL_PLAYEVENT_HEADATMARKER ((SLuint32) 0x00000002) ++#define SL_PLAYEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) ++#define SL_PLAYEVENT_HEADMOVING ((SLuint32) 0x00000008) ++#define SL_PLAYEVENT_HEADSTALLED ((SLuint32) 0x00000010) ++ ++#define SL_TIME_UNKNOWN ((SLuint32) 0xFFFFFFFF) ++ ++ ++extern const SLInterfaceID SL_IID_PLAY; ++ ++/** Playback interface methods */ ++ ++struct SLPlayItf_; ++typedef const struct SLPlayItf_ * const * SLPlayItf; ++ ++typedef void (SLAPIENTRY *slPlayCallback) ( ++ SLPlayItf caller, ++ void *pContext, ++ SLuint32 event ++); ++ ++struct SLPlayItf_ { ++ SLresult (*SetPlayState) ( ++ SLPlayItf self, ++ SLuint32 state ++ ); ++ SLresult (*GetPlayState) ( ++ SLPlayItf self, ++ SLuint32 *pState ++ ); ++ SLresult (*GetDuration) ( ++ SLPlayItf self, ++ SLmillisecond *pMsec ++ ); ++ SLresult (*GetPosition) ( ++ SLPlayItf self, ++ SLmillisecond *pMsec ++ ); ++ SLresult (*RegisterCallback) ( ++ SLPlayItf self, ++ slPlayCallback callback, ++ void *pContext ++ ); ++ SLresult (*SetCallbackEventsMask) ( ++ SLPlayItf self, ++ SLuint32 eventFlags ++ ); ++ SLresult (*GetCallbackEventsMask) ( ++ SLPlayItf self, ++ SLuint32 *pEventFlags ++ ); ++ SLresult (*SetMarkerPosition) ( ++ SLPlayItf self, ++ SLmillisecond mSec ++ ); ++ SLresult (*ClearMarkerPosition) ( ++ SLPlayItf self ++ ); ++ SLresult (*GetMarkerPosition) ( ++ SLPlayItf self, ++ SLmillisecond *pMsec ++ ); ++ SLresult (*SetPositionUpdatePeriod) ( ++ SLPlayItf self, ++ SLmillisecond mSec ++ ); ++ SLresult (*GetPositionUpdatePeriod) ( ++ SLPlayItf self, ++ SLmillisecond *pMsec ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Prefetch status interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_PREFETCHEVENT_STATUSCHANGE ((SLuint32) 0x00000001) ++#define SL_PREFETCHEVENT_FILLLEVELCHANGE ((SLuint32) 0x00000002) ++ ++#define SL_PREFETCHSTATUS_UNDERFLOW ((SLuint32) 0x00000001) ++#define SL_PREFETCHSTATUS_SUFFICIENTDATA ((SLuint32) 0x00000002) ++#define SL_PREFETCHSTATUS_OVERFLOW ((SLuint32) 0x00000003) ++ ++ ++extern const SLInterfaceID SL_IID_PREFETCHSTATUS; ++ ++ ++/** Prefetch status interface methods */ ++ ++struct SLPrefetchStatusItf_; ++typedef const struct SLPrefetchStatusItf_ * const * SLPrefetchStatusItf; ++ ++typedef void (SLAPIENTRY *slPrefetchCallback) ( ++ SLPrefetchStatusItf caller, ++ void *pContext, ++ SLuint32 event ++); ++ ++struct SLPrefetchStatusItf_ { ++ SLresult (*GetPrefetchStatus) ( ++ SLPrefetchStatusItf self, ++ SLuint32 *pStatus ++ ); ++ SLresult (*GetFillLevel) ( ++ SLPrefetchStatusItf self, ++ SLpermille *pLevel ++ ); ++ SLresult (*RegisterCallback) ( ++ SLPrefetchStatusItf self, ++ slPrefetchCallback callback, ++ void *pContext ++ ); ++ SLresult (*SetCallbackEventsMask) ( ++ SLPrefetchStatusItf self, ++ SLuint32 eventFlags ++ ); ++ SLresult (*GetCallbackEventsMask) ( ++ SLPrefetchStatusItf self, ++ SLuint32 *pEventFlags ++ ); ++ SLresult (*SetFillUpdatePeriod) ( ++ SLPrefetchStatusItf self, ++ SLpermille period ++ ); ++ SLresult (*GetFillUpdatePeriod) ( ++ SLPrefetchStatusItf self, ++ SLpermille *pPeriod ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Playback Rate interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_RATEPROP_RESERVED1 ((SLuint32) 0x00000001) ++#define SL_RATEPROP_RESERVED2 ((SLuint32) 0x00000002) ++#define SL_RATEPROP_SILENTAUDIO ((SLuint32) 0x00000100) ++#define SL_RATEPROP_STAGGEREDAUDIO ((SLuint32) 0x00000200) ++#define SL_RATEPROP_NOPITCHCORAUDIO ((SLuint32) 0x00000400) ++#define SL_RATEPROP_PITCHCORAUDIO ((SLuint32) 0x00000800) ++ ++ ++extern const SLInterfaceID SL_IID_PLAYBACKRATE; ++ ++struct SLPlaybackRateItf_; ++typedef const struct SLPlaybackRateItf_ * const * SLPlaybackRateItf; ++ ++struct SLPlaybackRateItf_ { ++ SLresult (*SetRate)( ++ SLPlaybackRateItf self, ++ SLpermille rate ++ ); ++ SLresult (*GetRate)( ++ SLPlaybackRateItf self, ++ SLpermille *pRate ++ ); ++ SLresult (*SetPropertyConstraints)( ++ SLPlaybackRateItf self, ++ SLuint32 constraints ++ ); ++ SLresult (*GetProperties)( ++ SLPlaybackRateItf self, ++ SLuint32 *pProperties ++ ); ++ SLresult (*GetCapabilitiesOfRate)( ++ SLPlaybackRateItf self, ++ SLpermille rate, ++ SLuint32 *pCapabilities ++ ); ++ SLresult (*GetRateRange) ( ++ SLPlaybackRateItf self, ++ SLuint8 index, ++ SLpermille *pMinRate, ++ SLpermille *pMaxRate, ++ SLpermille *pStepSize, ++ SLuint32 *pCapabilities ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Seek Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_SEEKMODE_FAST ((SLuint32) 0x0001) ++#define SL_SEEKMODE_ACCURATE ((SLuint32) 0x0002) ++ ++extern const SLInterfaceID SL_IID_SEEK; ++ ++struct SLSeekItf_; ++typedef const struct SLSeekItf_ * const * SLSeekItf; ++ ++struct SLSeekItf_ { ++ SLresult (*SetPosition)( ++ SLSeekItf self, ++ SLmillisecond pos, ++ SLuint32 seekMode ++ ); ++ SLresult (*SetLoop)( ++ SLSeekItf self, ++ SLboolean loopEnable, ++ SLmillisecond startPos, ++ SLmillisecond endPos ++ ); ++ SLresult (*GetLoop)( ++ SLSeekItf self, ++ SLboolean *pLoopEnabled, ++ SLmillisecond *pStartPos, ++ SLmillisecond *pEndPos ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Standard Recording Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++/** Recording states */ ++#define SL_RECORDSTATE_STOPPED ((SLuint32) 0x00000001) ++#define SL_RECORDSTATE_PAUSED ((SLuint32) 0x00000002) ++#define SL_RECORDSTATE_RECORDING ((SLuint32) 0x00000003) ++ ++ ++/** Record event **/ ++#define SL_RECORDEVENT_HEADATLIMIT ((SLuint32) 0x00000001) ++#define SL_RECORDEVENT_HEADATMARKER ((SLuint32) 0x00000002) ++#define SL_RECORDEVENT_HEADATNEWPOS ((SLuint32) 0x00000004) ++#define SL_RECORDEVENT_HEADMOVING ((SLuint32) 0x00000008) ++#define SL_RECORDEVENT_HEADSTALLED ((SLuint32) 0x00000010) ++/* Note: SL_RECORDEVENT_BUFFER_INSUFFICIENT is deprecated, use SL_RECORDEVENT_BUFFER_FULL instead. */ ++#define SL_RECORDEVENT_BUFFER_INSUFFICIENT ((SLuint32) 0x00000020) ++#define SL_RECORDEVENT_BUFFER_FULL ((SLuint32) 0x00000020) ++ ++ ++extern const SLInterfaceID SL_IID_RECORD; ++ ++struct SLRecordItf_; ++typedef const struct SLRecordItf_ * const * SLRecordItf; ++ ++typedef void (SLAPIENTRY *slRecordCallback) ( ++ SLRecordItf caller, ++ void *pContext, ++ SLuint32 event ++); ++ ++/** Recording interface methods */ ++struct SLRecordItf_ { ++ SLresult (*SetRecordState) ( ++ SLRecordItf self, ++ SLuint32 state ++ ); ++ SLresult (*GetRecordState) ( ++ SLRecordItf self, ++ SLuint32 *pState ++ ); ++ SLresult (*SetDurationLimit) ( ++ SLRecordItf self, ++ SLmillisecond msec ++ ); ++ SLresult (*GetPosition) ( ++ SLRecordItf self, ++ SLmillisecond *pMsec ++ ); ++ SLresult (*RegisterCallback) ( ++ SLRecordItf self, ++ slRecordCallback callback, ++ void *pContext ++ ); ++ SLresult (*SetCallbackEventsMask) ( ++ SLRecordItf self, ++ SLuint32 eventFlags ++ ); ++ SLresult (*GetCallbackEventsMask) ( ++ SLRecordItf self, ++ SLuint32 *pEventFlags ++ ); ++ SLresult (*SetMarkerPosition) ( ++ SLRecordItf self, ++ SLmillisecond mSec ++ ); ++ SLresult (*ClearMarkerPosition) ( ++ SLRecordItf self ++ ); ++ SLresult (*GetMarkerPosition) ( ++ SLRecordItf self, ++ SLmillisecond *pMsec ++ ); ++ SLresult (*SetPositionUpdatePeriod) ( ++ SLRecordItf self, ++ SLmillisecond mSec ++ ); ++ SLresult (*GetPositionUpdatePeriod) ( ++ SLRecordItf self, ++ SLmillisecond *pMsec ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Equalizer interface */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_EQUALIZER_UNDEFINED ((SLuint16) 0xFFFF) ++ ++extern const SLInterfaceID SL_IID_EQUALIZER; ++ ++struct SLEqualizerItf_; ++typedef const struct SLEqualizerItf_ * const * SLEqualizerItf; ++ ++struct SLEqualizerItf_ { ++ SLresult (*SetEnabled)( ++ SLEqualizerItf self, ++ SLboolean enabled ++ ); ++ SLresult (*IsEnabled)( ++ SLEqualizerItf self, ++ SLboolean *pEnabled ++ ); ++ SLresult (*GetNumberOfBands)( ++ SLEqualizerItf self, ++ SLuint16 *pAmount ++ ); ++ SLresult (*GetBandLevelRange)( ++ SLEqualizerItf self, ++ SLmillibel *pMin, ++ SLmillibel *pMax ++ ); ++ SLresult (*SetBandLevel)( ++ SLEqualizerItf self, ++ SLuint16 band, ++ SLmillibel level ++ ); ++ SLresult (*GetBandLevel)( ++ SLEqualizerItf self, ++ SLuint16 band, ++ SLmillibel *pLevel ++ ); ++ SLresult (*GetCenterFreq)( ++ SLEqualizerItf self, ++ SLuint16 band, ++ SLmilliHertz *pCenter ++ ); ++ SLresult (*GetBandFreqRange)( ++ SLEqualizerItf self, ++ SLuint16 band, ++ SLmilliHertz *pMin, ++ SLmilliHertz *pMax ++ ); ++ SLresult (*GetBand)( ++ SLEqualizerItf self, ++ SLmilliHertz frequency, ++ SLuint16 *pBand ++ ); ++ SLresult (*GetCurrentPreset)( ++ SLEqualizerItf self, ++ SLuint16 *pPreset ++ ); ++ SLresult (*UsePreset)( ++ SLEqualizerItf self, ++ SLuint16 index ++ ); ++ SLresult (*GetNumberOfPresets)( ++ SLEqualizerItf self, ++ SLuint16 *pNumPresets ++ ); ++ SLresult (*GetPresetName)( ++ SLEqualizerItf self, ++ SLuint16 index, ++ const SLchar ** ppName ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Volume Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_VOLUME; ++ ++struct SLVolumeItf_; ++typedef const struct SLVolumeItf_ * const * SLVolumeItf; ++ ++struct SLVolumeItf_ { ++ SLresult (*SetVolumeLevel) ( ++ SLVolumeItf self, ++ SLmillibel level ++ ); ++ SLresult (*GetVolumeLevel) ( ++ SLVolumeItf self, ++ SLmillibel *pLevel ++ ); ++ SLresult (*GetMaxVolumeLevel) ( ++ SLVolumeItf self, ++ SLmillibel *pMaxLevel ++ ); ++ SLresult (*SetMute) ( ++ SLVolumeItf self, ++ SLboolean mute ++ ); ++ SLresult (*GetMute) ( ++ SLVolumeItf self, ++ SLboolean *pMute ++ ); ++ SLresult (*EnableStereoPosition) ( ++ SLVolumeItf self, ++ SLboolean enable ++ ); ++ SLresult (*IsEnabledStereoPosition) ( ++ SLVolumeItf self, ++ SLboolean *pEnable ++ ); ++ SLresult (*SetStereoPosition) ( ++ SLVolumeItf self, ++ SLpermille stereoPosition ++ ); ++ SLresult (*GetStereoPosition) ( ++ SLVolumeItf self, ++ SLpermille *pStereoPosition ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Device Volume Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_DEVICEVOLUME; ++ ++struct SLDeviceVolumeItf_; ++typedef const struct SLDeviceVolumeItf_ * const * SLDeviceVolumeItf; ++ ++struct SLDeviceVolumeItf_ { ++ SLresult (*GetVolumeScale) ( ++ SLDeviceVolumeItf self, ++ SLuint32 deviceID, ++ SLint32 *pMinValue, ++ SLint32 *pMaxValue, ++ SLboolean *pIsMillibelScale ++ ); ++ SLresult (*SetVolume) ( ++ SLDeviceVolumeItf self, ++ SLuint32 deviceID, ++ SLint32 volume ++ ); ++ SLresult (*GetVolume) ( ++ SLDeviceVolumeItf self, ++ SLuint32 deviceID, ++ SLint32 *pVolume ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Buffer Queue Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_BUFFERQUEUE; ++ ++struct SLBufferQueueItf_; ++typedef const struct SLBufferQueueItf_ * const * SLBufferQueueItf; ++ ++typedef void (SLAPIENTRY *slBufferQueueCallback)( ++ SLBufferQueueItf caller, ++ void *pContext ++); ++ ++/** Buffer queue state **/ ++ ++typedef struct SLBufferQueueState_ { ++ SLuint32 count; ++ SLuint32 playIndex; ++} SLBufferQueueState; ++ ++ ++struct SLBufferQueueItf_ { ++ SLresult (*Enqueue) ( ++ SLBufferQueueItf self, ++ const void *pBuffer, ++ SLuint32 size ++ ); ++ SLresult (*Clear) ( ++ SLBufferQueueItf self ++ ); ++ SLresult (*GetState) ( ++ SLBufferQueueItf self, ++ SLBufferQueueState *pState ++ ); ++ SLresult (*RegisterCallback) ( ++ SLBufferQueueItf self, ++ slBufferQueueCallback callback, ++ void* pContext ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* PresetReverb */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_REVERBPRESET_NONE ((SLuint16) 0x0000) ++#define SL_REVERBPRESET_SMALLROOM ((SLuint16) 0x0001) ++#define SL_REVERBPRESET_MEDIUMROOM ((SLuint16) 0x0002) ++#define SL_REVERBPRESET_LARGEROOM ((SLuint16) 0x0003) ++#define SL_REVERBPRESET_MEDIUMHALL ((SLuint16) 0x0004) ++#define SL_REVERBPRESET_LARGEHALL ((SLuint16) 0x0005) ++#define SL_REVERBPRESET_PLATE ((SLuint16) 0x0006) ++ ++ ++extern const SLInterfaceID SL_IID_PRESETREVERB; ++ ++struct SLPresetReverbItf_; ++typedef const struct SLPresetReverbItf_ * const * SLPresetReverbItf; ++ ++struct SLPresetReverbItf_ { ++ SLresult (*SetPreset) ( ++ SLPresetReverbItf self, ++ SLuint16 preset ++ ); ++ SLresult (*GetPreset) ( ++ SLPresetReverbItf self, ++ SLuint16 *pPreset ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* EnvironmentalReverb */ ++/*---------------------------------------------------------------------------*/ ++ ++#define SL_I3DL2_ENVIRONMENT_PRESET_DEFAULT \ ++ { SL_MILLIBEL_MIN, 0, 1000, 500, SL_MILLIBEL_MIN, 20, SL_MILLIBEL_MIN, 40, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_GENERIC \ ++ { -1000, -100, 1490, 830, -2602, 7, 200, 11, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL \ ++ { -1000,-6000, 170, 100, -1204, 1, 207, 2, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_ROOM \ ++ { -1000, -454, 400, 830, -1646, 2, 53, 3, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_BATHROOM \ ++ { -1000,-1200, 1490, 540, -370, 7, 1030, 11, 1000, 600 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM \ ++ { -1000,-6000, 500, 100, -1376, 3, -1104, 4, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_STONEROOM \ ++ { -1000, -300, 2310, 640, -711, 12, 83, 17, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM \ ++ { -1000, -476, 4320, 590, -789, 20, -289, 30, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL \ ++ { -1000, -500, 3920, 700, -1230, 20, -2, 29, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_CAVE \ ++ { -1000, 0, 2910, 1300, -602, 15, -302, 22, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_ARENA \ ++ { -1000, -698, 7240, 330, -1166, 20, 16, 30, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_HANGAR \ ++ { -1000,-1000, 10050, 230, -602, 20, 198, 30, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY \ ++ { -1000,-4000, 300, 100, -1831, 2, -1630, 30, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_HALLWAY \ ++ { -1000, -300, 1490, 590, -1219, 7, 441, 11, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR \ ++ { -1000, -237, 2700, 790, -1214, 13, 395, 20, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_ALLEY \ ++ { -1000, -270, 1490, 860, -1204, 7, -4, 11, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_FOREST \ ++ { -1000,-3300, 1490, 540, -2560, 162, -613, 88, 790,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_CITY \ ++ { -1000, -800, 1490, 670, -2273, 7, -2217, 11, 500,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS \ ++ { -1000,-2500, 1490, 210, -2780, 300, -2014, 100, 270,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_QUARRY \ ++ { -1000,-1000, 1490, 830, SL_MILLIBEL_MIN, 61, 500, 25, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_PLAIN \ ++ { -1000,-2000, 1490, 500, -2466, 179, -2514, 100, 210,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT \ ++ { -1000, 0, 1650, 1500, -1363, 8, -1153, 12, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE \ ++ { -1000,-1000, 2810, 140, 429, 14, 648, 21, 800, 600 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_UNDERWATER \ ++ { -1000,-4000, 1490, 100, -449, 7, 1700, 11, 1000,1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_SMALLROOM \ ++ { -1000,-600, 1100, 830, -400, 5, 500, 10, 1000, 1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM \ ++ { -1000,-600, 1300, 830, -1000, 20, -200, 20, 1000, 1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEROOM \ ++ { -1000,-600, 1500, 830, -1600, 5, -1000, 40, 1000, 1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL \ ++ { -1000,-600, 1800, 700, -1300, 15, -800, 30, 1000, 1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_LARGEHALL \ ++ { -1000,-600, 1800, 700, -2000, 30, -1400, 60, 1000, 1000 } ++#define SL_I3DL2_ENVIRONMENT_PRESET_PLATE \ ++ { -1000,-200, 1300, 900, 0, 2, 0, 10, 1000, 750 } ++ ++ ++typedef struct SLEnvironmentalReverbSettings_ { ++ SLmillibel roomLevel; ++ SLmillibel roomHFLevel; ++ SLmillisecond decayTime; ++ SLpermille decayHFRatio; ++ SLmillibel reflectionsLevel; ++ SLmillisecond reflectionsDelay; ++ SLmillibel reverbLevel; ++ SLmillisecond reverbDelay; ++ SLpermille diffusion; ++ SLpermille density; ++} SLEnvironmentalReverbSettings; ++ ++ ++ ++ ++extern const SLInterfaceID SL_IID_ENVIRONMENTALREVERB; ++ ++ ++struct SLEnvironmentalReverbItf_; ++typedef const struct SLEnvironmentalReverbItf_ * const * SLEnvironmentalReverbItf; ++ ++struct SLEnvironmentalReverbItf_ { ++ SLresult (*SetRoomLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel room ++ ); ++ SLresult (*GetRoomLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel *pRoom ++ ); ++ SLresult (*SetRoomHFLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel roomHF ++ ); ++ SLresult (*GetRoomHFLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel *pRoomHF ++ ); ++ SLresult (*SetDecayTime) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond decayTime ++ ); ++ SLresult (*GetDecayTime) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond *pDecayTime ++ ); ++ SLresult (*SetDecayHFRatio) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille decayHFRatio ++ ); ++ SLresult (*GetDecayHFRatio) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille *pDecayHFRatio ++ ); ++ SLresult (*SetReflectionsLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel reflectionsLevel ++ ); ++ SLresult (*GetReflectionsLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel *pReflectionsLevel ++ ); ++ SLresult (*SetReflectionsDelay) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond reflectionsDelay ++ ); ++ SLresult (*GetReflectionsDelay) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond *pReflectionsDelay ++ ); ++ SLresult (*SetReverbLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel reverbLevel ++ ); ++ SLresult (*GetReverbLevel) ( ++ SLEnvironmentalReverbItf self, ++ SLmillibel *pReverbLevel ++ ); ++ SLresult (*SetReverbDelay) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond reverbDelay ++ ); ++ SLresult (*GetReverbDelay) ( ++ SLEnvironmentalReverbItf self, ++ SLmillisecond *pReverbDelay ++ ); ++ SLresult (*SetDiffusion) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille diffusion ++ ); ++ SLresult (*GetDiffusion) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille *pDiffusion ++ ); ++ SLresult (*SetDensity) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille density ++ ); ++ SLresult (*GetDensity) ( ++ SLEnvironmentalReverbItf self, ++ SLpermille *pDensity ++ ); ++ SLresult (*SetEnvironmentalReverbProperties) ( ++ SLEnvironmentalReverbItf self, ++ const SLEnvironmentalReverbSettings *pProperties ++ ); ++ SLresult (*GetEnvironmentalReverbProperties) ( ++ SLEnvironmentalReverbItf self, ++ SLEnvironmentalReverbSettings *pProperties ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Effects Send Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_EFFECTSEND; ++ ++struct SLEffectSendItf_; ++typedef const struct SLEffectSendItf_ * const * SLEffectSendItf; ++ ++struct SLEffectSendItf_ { ++ SLresult (*EnableEffectSend) ( ++ SLEffectSendItf self, ++ const void *pAuxEffect, ++ SLboolean enable, ++ SLmillibel initialLevel ++ ); ++ SLresult (*IsEnabled) ( ++ SLEffectSendItf self, ++ const void * pAuxEffect, ++ SLboolean *pEnable ++ ); ++ SLresult (*SetDirectLevel) ( ++ SLEffectSendItf self, ++ SLmillibel directLevel ++ ); ++ SLresult (*GetDirectLevel) ( ++ SLEffectSendItf self, ++ SLmillibel *pDirectLevel ++ ); ++ SLresult (*SetSendLevel) ( ++ SLEffectSendItf self, ++ const void *pAuxEffect, ++ SLmillibel sendLevel ++ ); ++ SLresult (*GetSendLevel)( ++ SLEffectSendItf self, ++ const void *pAuxEffect, ++ SLmillibel *pSendLevel ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Grouping Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_3DGROUPING; ++ ++ ++struct SL3DGroupingItf_ ; ++typedef const struct SL3DGroupingItf_ * const * SL3DGroupingItf; ++ ++struct SL3DGroupingItf_ { ++ SLresult (*Set3DGroup) ( ++ SL3DGroupingItf self, ++ SLObjectItf group ++ ); ++ SLresult (*Get3DGroup) ( ++ SL3DGroupingItf self, ++ SLObjectItf *pGroup ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Commit Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_3DCOMMIT; ++ ++struct SL3DCommitItf_; ++typedef const struct SL3DCommitItf_* const * SL3DCommitItf; ++ ++struct SL3DCommitItf_ { ++ SLresult (*Commit) ( ++ SL3DCommitItf self ++ ); ++ SLresult (*SetDeferred) ( ++ SL3DCommitItf self, ++ SLboolean deferred ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Location Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++typedef struct SLVec3D_ { ++ SLint32 x; ++ SLint32 y; ++ SLint32 z; ++} SLVec3D; ++ ++extern const SLInterfaceID SL_IID_3DLOCATION; ++ ++struct SL3DLocationItf_; ++typedef const struct SL3DLocationItf_ * const * SL3DLocationItf; ++ ++struct SL3DLocationItf_ { ++ SLresult (*SetLocationCartesian) ( ++ SL3DLocationItf self, ++ const SLVec3D *pLocation ++ ); ++ SLresult (*SetLocationSpherical) ( ++ SL3DLocationItf self, ++ SLmillidegree azimuth, ++ SLmillidegree elevation, ++ SLmillimeter distance ++ ); ++ SLresult (*Move) ( ++ SL3DLocationItf self, ++ const SLVec3D *pMovement ++ ); ++ SLresult (*GetLocationCartesian) ( ++ SL3DLocationItf self, ++ SLVec3D *pLocation ++ ); ++ SLresult (*SetOrientationVectors) ( ++ SL3DLocationItf self, ++ const SLVec3D *pFront, ++ const SLVec3D *pAbove ++ ); ++ SLresult (*SetOrientationAngles) ( ++ SL3DLocationItf self, ++ SLmillidegree heading, ++ SLmillidegree pitch, ++ SLmillidegree roll ++ ); ++ SLresult (*Rotate) ( ++ SL3DLocationItf self, ++ SLmillidegree theta, ++ const SLVec3D *pAxis ++ ); ++ SLresult (*GetOrientationVectors) ( ++ SL3DLocationItf self, ++ SLVec3D *pFront, ++ SLVec3D *pUp ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Doppler Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_3DDOPPLER; ++ ++struct SL3DDopplerItf_; ++typedef const struct SL3DDopplerItf_ * const * SL3DDopplerItf; ++ ++struct SL3DDopplerItf_ { ++ SLresult (*SetVelocityCartesian) ( ++ SL3DDopplerItf self, ++ const SLVec3D *pVelocity ++ ); ++ SLresult (*SetVelocitySpherical) ( ++ SL3DDopplerItf self, ++ SLmillidegree azimuth, ++ SLmillidegree elevation, ++ SLmillimeter speed ++ ); ++ SLresult (*GetVelocityCartesian) ( ++ SL3DDopplerItf self, ++ SLVec3D *pVelocity ++ ); ++ SLresult (*SetDopplerFactor) ( ++ SL3DDopplerItf self, ++ SLpermille dopplerFactor ++ ); ++ SLresult (*GetDopplerFactor) ( ++ SL3DDopplerItf self, ++ SLpermille *pDopplerFactor ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Source Interface and associated defines */ ++/* --------------------------------------------------------------------------*/ ++ ++#define SL_ROLLOFFMODEL_EXPONENTIAL ((SLuint32) 0x00000000) ++#define SL_ROLLOFFMODEL_LINEAR ((SLuint32) 0x00000001) ++ ++ ++extern const SLInterfaceID SL_IID_3DSOURCE; ++ ++struct SL3DSourceItf_; ++typedef const struct SL3DSourceItf_ * const * SL3DSourceItf; ++ ++struct SL3DSourceItf_ { ++ SLresult (*SetHeadRelative) ( ++ SL3DSourceItf self, ++ SLboolean headRelative ++ ); ++ SLresult (*GetHeadRelative) ( ++ SL3DSourceItf self, ++ SLboolean *pHeadRelative ++ ); ++ SLresult (*SetRolloffDistances) ( ++ SL3DSourceItf self, ++ SLmillimeter minDistance, ++ SLmillimeter maxDistance ++ ); ++ SLresult (*GetRolloffDistances) ( ++ SL3DSourceItf self, ++ SLmillimeter *pMinDistance, ++ SLmillimeter *pMaxDistance ++ ); ++ SLresult (*SetRolloffMaxDistanceMute) ( ++ SL3DSourceItf self, ++ SLboolean mute ++ ); ++ SLresult (*GetRolloffMaxDistanceMute) ( ++ SL3DSourceItf self, ++ SLboolean *pMute ++ ); ++ SLresult (*SetRolloffFactor) ( ++ SL3DSourceItf self, ++ SLpermille rolloffFactor ++ ); ++ SLresult (*GetRolloffFactor) ( ++ SL3DSourceItf self, ++ SLpermille *pRolloffFactor ++ ); ++ SLresult (*SetRoomRolloffFactor) ( ++ SL3DSourceItf self, ++ SLpermille roomRolloffFactor ++ ); ++ SLresult (*GetRoomRolloffFactor) ( ++ SL3DSourceItf self, ++ SLpermille *pRoomRolloffFactor ++ ); ++ SLresult (*SetRolloffModel) ( ++ SL3DSourceItf self, ++ SLuint8 model ++ ); ++ SLresult (*GetRolloffModel) ( ++ SL3DSourceItf self, ++ SLuint8 *pModel ++ ); ++ SLresult (*SetCone) ( ++ SL3DSourceItf self, ++ SLmillidegree innerAngle, ++ SLmillidegree outerAngle, ++ SLmillibel outerLevel ++ ); ++ SLresult (*GetCone) ( ++ SL3DSourceItf self, ++ SLmillidegree *pInnerAngle, ++ SLmillidegree *pOuterAngle, ++ SLmillibel *pOuterLevel ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* 3D Macroscopic Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_3DMACROSCOPIC; ++ ++struct SL3DMacroscopicItf_; ++typedef const struct SL3DMacroscopicItf_ * const * SL3DMacroscopicItf; ++ ++struct SL3DMacroscopicItf_ { ++ SLresult (*SetSize) ( ++ SL3DMacroscopicItf self, ++ SLmillimeter width, ++ SLmillimeter height, ++ SLmillimeter depth ++ ); ++ SLresult (*GetSize) ( ++ SL3DMacroscopicItf self, ++ SLmillimeter *pWidth, ++ SLmillimeter *pHeight, ++ SLmillimeter *pDepth ++ ); ++ SLresult (*SetOrientationAngles) ( ++ SL3DMacroscopicItf self, ++ SLmillidegree heading, ++ SLmillidegree pitch, ++ SLmillidegree roll ++ ); ++ SLresult (*SetOrientationVectors) ( ++ SL3DMacroscopicItf self, ++ const SLVec3D *pFront, ++ const SLVec3D *pAbove ++ ); ++ SLresult (*Rotate) ( ++ SL3DMacroscopicItf self, ++ SLmillidegree theta, ++ const SLVec3D *pAxis ++ ); ++ SLresult (*GetOrientationVectors) ( ++ SL3DMacroscopicItf self, ++ SLVec3D *pFront, ++ SLVec3D *pUp ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Mute Solo Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_MUTESOLO; ++ ++struct SLMuteSoloItf_; ++typedef const struct SLMuteSoloItf_ * const * SLMuteSoloItf; ++ ++struct SLMuteSoloItf_ { ++ SLresult (*SetChannelMute) ( ++ SLMuteSoloItf self, ++ SLuint8 chan, ++ SLboolean mute ++ ); ++ SLresult (*GetChannelMute) ( ++ SLMuteSoloItf self, ++ SLuint8 chan, ++ SLboolean *pMute ++ ); ++ SLresult (*SetChannelSolo) ( ++ SLMuteSoloItf self, ++ SLuint8 chan, ++ SLboolean solo ++ ); ++ SLresult (*GetChannelSolo) ( ++ SLMuteSoloItf self, ++ SLuint8 chan, ++ SLboolean *pSolo ++ ); ++ SLresult (*GetNumChannels) ( ++ SLMuteSoloItf self, ++ SLuint8 *pNumChannels ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Dynamic Interface Management Interface and associated types and macros */ ++/* --------------------------------------------------------------------------*/ ++ ++#define SL_DYNAMIC_ITF_EVENT_RUNTIME_ERROR ((SLuint32) 0x00000001) ++#define SL_DYNAMIC_ITF_EVENT_ASYNC_TERMINATION ((SLuint32) 0x00000002) ++#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST ((SLuint32) 0x00000003) ++#define SL_DYNAMIC_ITF_EVENT_RESOURCES_LOST_PERMANENTLY ((SLuint32) 0x00000004) ++#define SL_DYNAMIC_ITF_EVENT_RESOURCES_AVAILABLE ((SLuint32) 0x00000005) ++ ++ ++ ++ ++extern const SLInterfaceID SL_IID_DYNAMICINTERFACEMANAGEMENT; ++ ++struct SLDynamicInterfaceManagementItf_; ++typedef const struct SLDynamicInterfaceManagementItf_ * const * SLDynamicInterfaceManagementItf; ++ ++typedef void (SLAPIENTRY *slDynamicInterfaceManagementCallback) ( ++ SLDynamicInterfaceManagementItf caller, ++ void * pContext, ++ SLuint32 event, ++ SLresult result, ++ const SLInterfaceID iid ++); ++ ++ ++struct SLDynamicInterfaceManagementItf_ { ++ SLresult (*AddInterface) ( ++ SLDynamicInterfaceManagementItf self, ++ const SLInterfaceID iid, ++ SLboolean async ++ ); ++ SLresult (*RemoveInterface) ( ++ SLDynamicInterfaceManagementItf self, ++ const SLInterfaceID iid ++ ); ++ SLresult (*ResumeInterface) ( ++ SLDynamicInterfaceManagementItf self, ++ const SLInterfaceID iid, ++ SLboolean async ++ ); ++ SLresult (*RegisterCallback) ( ++ SLDynamicInterfaceManagementItf self, ++ slDynamicInterfaceManagementCallback callback, ++ void * pContext ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Midi Message Interface and associated types */ ++/* --------------------------------------------------------------------------*/ ++ ++#define SL_MIDIMESSAGETYPE_NOTE_ON_OFF ((SLuint32) 0x00000001) ++#define SL_MIDIMESSAGETYPE_POLY_PRESSURE ((SLuint32) 0x00000002) ++#define SL_MIDIMESSAGETYPE_CONTROL_CHANGE ((SLuint32) 0x00000003) ++#define SL_MIDIMESSAGETYPE_PROGRAM_CHANGE ((SLuint32) 0x00000004) ++#define SL_MIDIMESSAGETYPE_CHANNEL_PRESSURE ((SLuint32) 0x00000005) ++#define SL_MIDIMESSAGETYPE_PITCH_BEND ((SLuint32) 0x00000006) ++#define SL_MIDIMESSAGETYPE_SYSTEM_MESSAGE ((SLuint32) 0x00000007) ++ ++ ++extern const SLInterfaceID SL_IID_MIDIMESSAGE; ++ ++struct SLMIDIMessageItf_; ++typedef const struct SLMIDIMessageItf_ * const * SLMIDIMessageItf; ++ ++typedef void (SLAPIENTRY *slMetaEventCallback) ( ++ SLMIDIMessageItf caller, ++ void *pContext, ++ SLuint8 type, ++ SLuint32 length, ++ const SLuint8 *pData, ++ SLuint32 tick, ++ SLuint16 track ++); ++ ++typedef void (SLAPIENTRY *slMIDIMessageCallback) ( ++ SLMIDIMessageItf caller, ++ void *pContext, ++ SLuint8 statusByte, ++ SLuint32 length, ++ const SLuint8 *pData, ++ SLuint32 tick, ++ SLuint16 track ++); ++ ++struct SLMIDIMessageItf_ { ++ SLresult (*SendMessage) ( ++ SLMIDIMessageItf self, ++ const SLuint8 *data, ++ SLuint32 length ++ ); ++ SLresult (*RegisterMetaEventCallback) ( ++ SLMIDIMessageItf self, ++ slMetaEventCallback callback, ++ void *pContext ++ ); ++ SLresult (*RegisterMIDIMessageCallback) ( ++ SLMIDIMessageItf self, ++ slMIDIMessageCallback callback, ++ void *pContext ++ ); ++ SLresult (*AddMIDIMessageCallbackFilter) ( ++ SLMIDIMessageItf self, ++ SLuint32 messageType ++ ); ++ SLresult (*ClearMIDIMessageCallbackFilter) ( ++ SLMIDIMessageItf self ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Midi Mute Solo interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_MIDIMUTESOLO; ++ ++struct SLMIDIMuteSoloItf_; ++typedef const struct SLMIDIMuteSoloItf_ * const * SLMIDIMuteSoloItf; ++ ++struct SLMIDIMuteSoloItf_ { ++ SLresult (*SetChannelMute) ( ++ SLMIDIMuteSoloItf self, ++ SLuint8 channel, ++ SLboolean mute ++ ); ++ SLresult (*GetChannelMute) ( ++ SLMIDIMuteSoloItf self, ++ SLuint8 channel, ++ SLboolean *pMute ++ ); ++ SLresult (*SetChannelSolo) ( ++ SLMIDIMuteSoloItf self, ++ SLuint8 channel, ++ SLboolean solo ++ ); ++ SLresult (*GetChannelSolo) ( ++ SLMIDIMuteSoloItf self, ++ SLuint8 channel, ++ SLboolean *pSolo ++ ); ++ SLresult (*GetTrackCount) ( ++ SLMIDIMuteSoloItf self, ++ SLuint16 *pCount ++ ); ++ SLresult (*SetTrackMute) ( ++ SLMIDIMuteSoloItf self, ++ SLuint16 track, ++ SLboolean mute ++ ); ++ SLresult (*GetTrackMute) ( ++ SLMIDIMuteSoloItf self, ++ SLuint16 track, ++ SLboolean *pMute ++ ); ++ SLresult (*SetTrackSolo) ( ++ SLMIDIMuteSoloItf self, ++ SLuint16 track, ++ SLboolean solo ++ ); ++ SLresult (*GetTrackSolo) ( ++ SLMIDIMuteSoloItf self, ++ SLuint16 track, ++ SLboolean *pSolo ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Midi Tempo interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_MIDITEMPO; ++ ++struct SLMIDITempoItf_; ++typedef const struct SLMIDITempoItf_ * const * SLMIDITempoItf; ++ ++struct SLMIDITempoItf_ { ++ SLresult (*SetTicksPerQuarterNote) ( ++ SLMIDITempoItf self, ++ SLuint32 tpqn ++ ); ++ SLresult (*GetTicksPerQuarterNote) ( ++ SLMIDITempoItf self, ++ SLuint32 *pTpqn ++ ); ++ SLresult (*SetMicrosecondsPerQuarterNote) ( ++ SLMIDITempoItf self, ++ SLmicrosecond uspqn ++ ); ++ SLresult (*GetMicrosecondsPerQuarterNote) ( ++ SLMIDITempoItf self, ++ SLmicrosecond *uspqn ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Midi Time interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_MIDITIME; ++ ++struct SLMIDITimeItf_; ++typedef const struct SLMIDITimeItf_ * const * SLMIDITimeItf; ++ ++struct SLMIDITimeItf_ { ++ SLresult (*GetDuration) ( ++ SLMIDITimeItf self, ++ SLuint32 *pDuration ++ ); ++ SLresult (*SetPosition) ( ++ SLMIDITimeItf self, ++ SLuint32 position ++ ); ++ SLresult (*GetPosition) ( ++ SLMIDITimeItf self, ++ SLuint32 *pPosition ++ ); ++ SLresult (*SetLoopPoints) ( ++ SLMIDITimeItf self, ++ SLuint32 startTick, ++ SLuint32 numTicks ++ ); ++ SLresult (*GetLoopPoints) ( ++ SLMIDITimeItf self, ++ SLuint32 *pStartTick, ++ SLuint32 *pNumTicks ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Audio Decoder Capabilities Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++/*Audio Codec related defines*/ ++ ++#define SL_RATECONTROLMODE_CONSTANTBITRATE ((SLuint32) 0x00000001) ++#define SL_RATECONTROLMODE_VARIABLEBITRATE ((SLuint32) 0x00000002) ++ ++#define SL_AUDIOCODEC_PCM ((SLuint32) 0x00000001) ++#define SL_AUDIOCODEC_MP3 ((SLuint32) 0x00000002) ++#define SL_AUDIOCODEC_AMR ((SLuint32) 0x00000003) ++#define SL_AUDIOCODEC_AMRWB ((SLuint32) 0x00000004) ++#define SL_AUDIOCODEC_AMRWBPLUS ((SLuint32) 0x00000005) ++#define SL_AUDIOCODEC_AAC ((SLuint32) 0x00000006) ++#define SL_AUDIOCODEC_WMA ((SLuint32) 0x00000007) ++#define SL_AUDIOCODEC_REAL ((SLuint32) 0x00000008) ++ ++#define SL_AUDIOPROFILE_PCM ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOPROFILE_MPEG1_L3 ((SLuint32) 0x00000001) ++#define SL_AUDIOPROFILE_MPEG2_L3 ((SLuint32) 0x00000002) ++#define SL_AUDIOPROFILE_MPEG25_L3 ((SLuint32) 0x00000003) ++ ++#define SL_AUDIOCHANMODE_MP3_MONO ((SLuint32) 0x00000001) ++#define SL_AUDIOCHANMODE_MP3_STEREO ((SLuint32) 0x00000002) ++#define SL_AUDIOCHANMODE_MP3_JOINTSTEREO ((SLuint32) 0x00000003) ++#define SL_AUDIOCHANMODE_MP3_DUAL ((SLuint32) 0x00000004) ++ ++#define SL_AUDIOPROFILE_AMR ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOSTREAMFORMAT_CONFORMANCE ((SLuint32) 0x00000001) ++#define SL_AUDIOSTREAMFORMAT_IF1 ((SLuint32) 0x00000002) ++#define SL_AUDIOSTREAMFORMAT_IF2 ((SLuint32) 0x00000003) ++#define SL_AUDIOSTREAMFORMAT_FSF ((SLuint32) 0x00000004) ++#define SL_AUDIOSTREAMFORMAT_RTPPAYLOAD ((SLuint32) 0x00000005) ++#define SL_AUDIOSTREAMFORMAT_ITU ((SLuint32) 0x00000006) ++ ++#define SL_AUDIOPROFILE_AMRWB ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOPROFILE_AMRWBPLUS ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOPROFILE_AAC_AAC ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOMODE_AAC_MAIN ((SLuint32) 0x00000001) ++#define SL_AUDIOMODE_AAC_LC ((SLuint32) 0x00000002) ++#define SL_AUDIOMODE_AAC_SSR ((SLuint32) 0x00000003) ++#define SL_AUDIOMODE_AAC_LTP ((SLuint32) 0x00000004) ++#define SL_AUDIOMODE_AAC_HE ((SLuint32) 0x00000005) ++#define SL_AUDIOMODE_AAC_SCALABLE ((SLuint32) 0x00000006) ++#define SL_AUDIOMODE_AAC_ERLC ((SLuint32) 0x00000007) ++#define SL_AUDIOMODE_AAC_LD ((SLuint32) 0x00000008) ++#define SL_AUDIOMODE_AAC_HE_PS ((SLuint32) 0x00000009) ++#define SL_AUDIOMODE_AAC_HE_MPS ((SLuint32) 0x0000000A) ++ ++#define SL_AUDIOSTREAMFORMAT_MP2ADTS ((SLuint32) 0x00000001) ++#define SL_AUDIOSTREAMFORMAT_MP4ADTS ((SLuint32) 0x00000002) ++#define SL_AUDIOSTREAMFORMAT_MP4LOAS ((SLuint32) 0x00000003) ++#define SL_AUDIOSTREAMFORMAT_MP4LATM ((SLuint32) 0x00000004) ++#define SL_AUDIOSTREAMFORMAT_ADIF ((SLuint32) 0x00000005) ++#define SL_AUDIOSTREAMFORMAT_MP4FF ((SLuint32) 0x00000006) ++#define SL_AUDIOSTREAMFORMAT_RAW ((SLuint32) 0x00000007) ++ ++#define SL_AUDIOPROFILE_WMA7 ((SLuint32) 0x00000001) ++#define SL_AUDIOPROFILE_WMA8 ((SLuint32) 0x00000002) ++#define SL_AUDIOPROFILE_WMA9 ((SLuint32) 0x00000003) ++#define SL_AUDIOPROFILE_WMA10 ((SLuint32) 0x00000004) ++ ++#define SL_AUDIOMODE_WMA_LEVEL1 ((SLuint32) 0x00000001) ++#define SL_AUDIOMODE_WMA_LEVEL2 ((SLuint32) 0x00000002) ++#define SL_AUDIOMODE_WMA_LEVEL3 ((SLuint32) 0x00000003) ++#define SL_AUDIOMODE_WMA_LEVEL4 ((SLuint32) 0x00000004) ++#define SL_AUDIOMODE_WMAPRO_LEVELM0 ((SLuint32) 0x00000005) ++#define SL_AUDIOMODE_WMAPRO_LEVELM1 ((SLuint32) 0x00000006) ++#define SL_AUDIOMODE_WMAPRO_LEVELM2 ((SLuint32) 0x00000007) ++#define SL_AUDIOMODE_WMAPRO_LEVELM3 ((SLuint32) 0x00000008) ++ ++#define SL_AUDIOPROFILE_REALAUDIO ((SLuint32) 0x00000001) ++ ++#define SL_AUDIOMODE_REALAUDIO_G2 ((SLuint32) 0x00000001) ++#define SL_AUDIOMODE_REALAUDIO_8 ((SLuint32) 0x00000002) ++#define SL_AUDIOMODE_REALAUDIO_10 ((SLuint32) 0x00000003) ++#define SL_AUDIOMODE_REALAUDIO_SURROUND ((SLuint32) 0x00000004) ++ ++typedef struct SLAudioCodecDescriptor_ { ++ SLuint32 maxChannels; ++ SLuint32 minBitsPerSample; ++ SLuint32 maxBitsPerSample; ++ SLmilliHertz minSampleRate; ++ SLmilliHertz maxSampleRate; ++ SLboolean isFreqRangeContinuous; ++ SLmilliHertz *pSampleRatesSupported; ++ SLuint32 numSampleRatesSupported; ++ SLuint32 minBitRate; ++ SLuint32 maxBitRate; ++ SLboolean isBitrateRangeContinuous; ++ SLuint32 *pBitratesSupported; ++ SLuint32 numBitratesSupported; ++ SLuint32 profileSetting; ++ SLuint32 modeSetting; ++} SLAudioCodecDescriptor; ++ ++/*Structure used to retrieve the profile and level settings supported by an audio encoder */ ++ ++typedef struct SLAudioCodecProfileMode_ { ++ SLuint32 profileSetting; ++ SLuint32 modeSetting; ++} SLAudioCodecProfileMode; ++ ++extern const SLInterfaceID SL_IID_AUDIODECODERCAPABILITIES; ++ ++struct SLAudioDecoderCapabilitiesItf_; ++typedef const struct SLAudioDecoderCapabilitiesItf_ * const * SLAudioDecoderCapabilitiesItf; ++ ++struct SLAudioDecoderCapabilitiesItf_ { ++ SLresult (*GetAudioDecoders) ( ++ SLAudioDecoderCapabilitiesItf self, ++ SLuint32 * pNumDecoders , ++ SLuint32 *pDecoderIds ++ ); ++ SLresult (*GetAudioDecoderCapabilities) ( ++ SLAudioDecoderCapabilitiesItf self, ++ SLuint32 decoderId, ++ SLuint32 *pIndex, ++ SLAudioCodecDescriptor *pDescriptor ++ ); ++}; ++ ++ ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Audio Encoder Capabilities Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++/* Structure used when setting audio encoding parameters */ ++ ++typedef struct SLAudioEncoderSettings_ { ++ SLuint32 encoderId; ++ SLuint32 channelsIn; ++ SLuint32 channelsOut; ++ SLmilliHertz sampleRate; ++ SLuint32 bitRate; ++ SLuint32 bitsPerSample; ++ SLuint32 rateControl; ++ SLuint32 profileSetting; ++ SLuint32 levelSetting; ++ SLuint32 channelMode; ++ SLuint32 streamFormat; ++ SLuint32 encodeOptions; ++ SLuint32 blockAlignment; ++} SLAudioEncoderSettings; ++ ++extern const SLInterfaceID SL_IID_AUDIOENCODERCAPABILITIES; ++ ++struct SLAudioEncoderCapabilitiesItf_; ++typedef const struct SLAudioEncoderCapabilitiesItf_ * const * SLAudioEncoderCapabilitiesItf; ++ ++struct SLAudioEncoderCapabilitiesItf_ { ++ SLresult (*GetAudioEncoders) ( ++ SLAudioEncoderCapabilitiesItf self, ++ SLuint32 *pNumEncoders , ++ SLuint32 *pEncoderIds ++ ); ++ SLresult (*GetAudioEncoderCapabilities) ( ++ SLAudioEncoderCapabilitiesItf self, ++ SLuint32 encoderId, ++ SLuint32 *pIndex, ++ SLAudioCodecDescriptor * pDescriptor ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Audio Encoder Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_AUDIOENCODER; ++ ++struct SLAudioEncoderItf_; ++typedef const struct SLAudioEncoderItf_ * const * SLAudioEncoderItf; ++ ++struct SLAudioEncoderItf_ { ++ SLresult (*SetEncoderSettings) ( ++ SLAudioEncoderItf self, ++ SLAudioEncoderSettings *pSettings ++ ); ++ SLresult (*GetEncoderSettings) ( ++ SLAudioEncoderItf self, ++ SLAudioEncoderSettings *pSettings ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Bass Boost Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_BASSBOOST; ++ ++struct SLBassBoostItf_; ++typedef const struct SLBassBoostItf_ * const * SLBassBoostItf; ++ ++struct SLBassBoostItf_ { ++ SLresult (*SetEnabled)( ++ SLBassBoostItf self, ++ SLboolean enabled ++ ); ++ SLresult (*IsEnabled)( ++ SLBassBoostItf self, ++ SLboolean *pEnabled ++ ); ++ SLresult (*SetStrength)( ++ SLBassBoostItf self, ++ SLpermille strength ++ ); ++ SLresult (*GetRoundedStrength)( ++ SLBassBoostItf self, ++ SLpermille *pStrength ++ ); ++ SLresult (*IsStrengthSupported)( ++ SLBassBoostItf self, ++ SLboolean *pSupported ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Pitch Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_PITCH; ++ ++struct SLPitchItf_; ++typedef const struct SLPitchItf_ * const * SLPitchItf; ++ ++struct SLPitchItf_ { ++ SLresult (*SetPitch) ( ++ SLPitchItf self, ++ SLpermille pitch ++ ); ++ SLresult (*GetPitch) ( ++ SLPitchItf self, ++ SLpermille *pPitch ++ ); ++ SLresult (*GetPitchCapabilities) ( ++ SLPitchItf self, ++ SLpermille *pMinPitch, ++ SLpermille *pMaxPitch ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Rate Pitch Interface */ ++/* RatePitchItf is an interface for controlling the rate a sound is played */ ++/* back. A change in rate will cause a change in pitch. */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_RATEPITCH; ++ ++struct SLRatePitchItf_; ++typedef const struct SLRatePitchItf_ * const * SLRatePitchItf; ++ ++struct SLRatePitchItf_ { ++ SLresult (*SetRate) ( ++ SLRatePitchItf self, ++ SLpermille rate ++ ); ++ SLresult (*GetRate) ( ++ SLRatePitchItf self, ++ SLpermille *pRate ++ ); ++ SLresult (*GetRatePitchCapabilities) ( ++ SLRatePitchItf self, ++ SLpermille *pMinRate, ++ SLpermille *pMaxRate ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Virtualizer Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_VIRTUALIZER; ++ ++struct SLVirtualizerItf_; ++typedef const struct SLVirtualizerItf_ * const * SLVirtualizerItf; ++ ++struct SLVirtualizerItf_ { ++ SLresult (*SetEnabled)( ++ SLVirtualizerItf self, ++ SLboolean enabled ++ ); ++ SLresult (*IsEnabled)( ++ SLVirtualizerItf self, ++ SLboolean *pEnabled ++ ); ++ SLresult (*SetStrength)( ++ SLVirtualizerItf self, ++ SLpermille strength ++ ); ++ SLresult (*GetRoundedStrength)( ++ SLVirtualizerItf self, ++ SLpermille *pStrength ++ ); ++ SLresult (*IsStrengthSupported)( ++ SLVirtualizerItf self, ++ SLboolean *pSupported ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Visualization Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_VISUALIZATION; ++ ++struct SLVisualizationItf_; ++typedef const struct SLVisualizationItf_ * const * SLVisualizationItf; ++ ++typedef void (SLAPIENTRY *slVisualizationCallback) ( ++ void *pContext, ++ const SLuint8 waveform[], ++ const SLuint8 fft[], ++ SLmilliHertz samplerate ++); ++ ++struct SLVisualizationItf_{ ++ SLresult (*RegisterVisualizationCallback)( ++ SLVisualizationItf self, ++ slVisualizationCallback callback, ++ void *pContext, ++ SLmilliHertz rate ++ ); ++ SLresult (*GetMaxRate)( ++ SLVisualizationItf self, ++ SLmilliHertz* pRate ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Engine Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_ENGINE; ++ ++struct SLEngineItf_; ++typedef const struct SLEngineItf_ * const * SLEngineItf; ++ ++ ++struct SLEngineItf_ { ++ ++ SLresult (*CreateLEDDevice) ( ++ SLEngineItf self, ++ SLObjectItf * pDevice, ++ SLuint32 deviceID, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateVibraDevice) ( ++ SLEngineItf self, ++ SLObjectItf * pDevice, ++ SLuint32 deviceID, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateAudioPlayer) ( ++ SLEngineItf self, ++ SLObjectItf * pPlayer, ++ SLDataSource *pAudioSrc, ++ SLDataSink *pAudioSnk, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateAudioRecorder) ( ++ SLEngineItf self, ++ SLObjectItf * pRecorder, ++ SLDataSource *pAudioSrc, ++ SLDataSink *pAudioSnk, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateMidiPlayer) ( ++ SLEngineItf self, ++ SLObjectItf * pPlayer, ++ SLDataSource *pMIDISrc, ++ SLDataSource *pBankSrc, ++ SLDataSink *pAudioOutput, ++ SLDataSink *pVibra, ++ SLDataSink *pLEDArray, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateListener) ( ++ SLEngineItf self, ++ SLObjectItf * pListener, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*Create3DGroup) ( ++ SLEngineItf self, ++ SLObjectItf * pGroup, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateOutputMix) ( ++ SLEngineItf self, ++ SLObjectItf * pMix, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateMetadataExtractor) ( ++ SLEngineItf self, ++ SLObjectItf * pMetadataExtractor, ++ SLDataSource * pDataSource, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*CreateExtensionObject) ( ++ SLEngineItf self, ++ SLObjectItf * pObject, ++ void * pParameters, ++ SLuint32 objectID, ++ SLuint32 numInterfaces, ++ const SLInterfaceID * pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++ ); ++ SLresult (*QueryNumSupportedInterfaces) ( ++ SLEngineItf self, ++ SLuint32 objectID, ++ SLuint32 * pNumSupportedInterfaces ++ ); ++ SLresult (*QuerySupportedInterfaces) ( ++ SLEngineItf self, ++ SLuint32 objectID, ++ SLuint32 index, ++ SLInterfaceID * pInterfaceId ++ ); ++ SLresult (*QueryNumSupportedExtensions) ( ++ SLEngineItf self, ++ SLuint32 * pNumExtensions ++ ); ++ SLresult (*QuerySupportedExtension) ( ++ SLEngineItf self, ++ SLuint32 index, ++ SLchar * pExtensionName, ++ SLint16 * pNameLength ++ ); ++ SLresult (*IsExtensionSupported) ( ++ SLEngineItf self, ++ const SLchar * pExtensionName, ++ SLboolean * pSupported ++ ); ++}; ++ ++ ++/*---------------------------------------------------------------------------*/ ++/* Engine Capabilities Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_ENGINECAPABILITIES; ++ ++struct SLEngineCapabilitiesItf_; ++typedef const struct SLEngineCapabilitiesItf_ * const * SLEngineCapabilitiesItf; ++ ++struct SLEngineCapabilitiesItf_ { ++ SLresult (*QuerySupportedProfiles) ( ++ SLEngineCapabilitiesItf self, ++ SLuint16 *pProfilesSupported ++ ); ++ SLresult (*QueryAvailableVoices) ( ++ SLEngineCapabilitiesItf self, ++ SLuint16 voiceType, ++ SLint16 *pNumMaxVoices, ++ SLboolean *pIsAbsoluteMax, ++ SLint16 *pNumFreeVoices ++ ); ++ SLresult (*QueryNumberOfMIDISynthesizers) ( ++ SLEngineCapabilitiesItf self, ++ SLint16 *pNumMIDIsynthesizers ++ ); ++ SLresult (*QueryAPIVersion) ( ++ SLEngineCapabilitiesItf self, ++ SLint16 *pMajor, ++ SLint16 *pMinor, ++ SLint16 *pStep ++ ); ++ SLresult (*QueryLEDCapabilities) ( ++ SLEngineCapabilitiesItf self, ++ SLuint32 *pIndex, ++ SLuint32 *pLEDDeviceID, ++ SLLEDDescriptor *pDescriptor ++ ); ++ SLresult (*QueryVibraCapabilities) ( ++ SLEngineCapabilitiesItf self, ++ SLuint32 *pIndex, ++ SLuint32 *pVibraDeviceID, ++ SLVibraDescriptor *pDescriptor ++ ); ++ SLresult (*IsThreadSafe) ( ++ SLEngineCapabilitiesItf self, ++ SLboolean *pIsThreadSafe ++ ); ++}; ++ ++/*---------------------------------------------------------------------------*/ ++/* Thread Sync Interface */ ++/* --------------------------------------------------------------------------*/ ++ ++ ++extern const SLInterfaceID SL_IID_THREADSYNC; ++ ++struct SLThreadSyncItf_; ++typedef const struct SLThreadSyncItf_ * const * SLThreadSyncItf; ++ ++ ++struct SLThreadSyncItf_ { ++ SLresult (*EnterCriticalSection) ( ++ SLThreadSyncItf self ++ ); ++ SLresult (*ExitCriticalSection) ( ++ SLThreadSyncItf self ++ ); ++}; ++ ++ ++/*****************************************************************************/ ++/* SL engine constructor */ ++/*****************************************************************************/ ++ ++#define SL_ENGINEOPTION_THREADSAFE ((SLuint32) 0x00000001) ++#define SL_ENGINEOPTION_LOSSOFCONTROL ((SLuint32) 0x00000002) ++ ++typedef struct SLEngineOption_ { ++ SLuint32 feature; ++ SLuint32 data; ++} SLEngineOption; ++ ++ ++SLresult SLAPIENTRY slCreateEngine( ++ SLObjectItf *pEngine, ++ SLuint32 numOptions, ++ const SLEngineOption *pEngineOptions, ++ SLuint32 numInterfaces, ++ const SLInterfaceID *pInterfaceIds, ++ const SLboolean * pInterfaceRequired ++); ++ ++SLresult SLAPIENTRY slQueryNumSupportedEngineInterfaces( ++ SLuint32 * pNumSupportedInterfaces ++); ++ ++SLresult SLAPIENTRY slQuerySupportedEngineInterfaces( ++ SLuint32 index, ++ SLInterfaceID * pInterfaceId ++); ++ ++#ifdef __cplusplus ++} /* extern "C" */ ++#endif ++ ++#endif /* OPENSL_ES_H_ */ +diff --git a/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_OpenHarmony.h b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_OpenHarmony.h +new file mode 100644 +index 0000000..8feed06 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_OpenHarmony.h +@@ -0,0 +1,78 @@ ++/* ++ * Copyright (c) 2022 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef OPENSLES_OPENHARMONY_H ++#define OPENSLES_OPENHARMONY_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include "OpenSLES.h" ++#include "OpenSLES_Platform.h" ++ ++/*---------------------------------------------------------------------------*/ ++/* OH Buffer Queue Interface */ ++/*---------------------------------------------------------------------------*/ ++ ++extern const SLInterfaceID SL_IID_OH_BUFFERQUEUE; ++ ++struct SLOHBufferQueueItf_; ++typedef const struct SLOHBufferQueueItf_ * const * SLOHBufferQueueItf; ++ ++typedef void (SLAPIENTRY *SlOHBufferQueueCallback)( ++ SLOHBufferQueueItf caller, ++ void *pContext, ++ SLuint32 size ++); ++ ++/** OH Buffer queue state **/ ++ ++typedef struct SLOHBufferQueueState_ { ++ SLuint32 count; ++ SLuint32 index; ++} SLOHBufferQueueState; ++ ++ ++struct SLOHBufferQueueItf_ { ++ SLresult (*Enqueue) ( ++ SLOHBufferQueueItf self, ++ const void *buffer, ++ SLuint32 size ++ ); ++ SLresult (*Clear) ( ++ SLOHBufferQueueItf self ++ ); ++ SLresult (*GetState) ( ++ SLOHBufferQueueItf self, ++ SLOHBufferQueueState *state ++ ); ++ SLresult (*GetBuffer) ( ++ SLOHBufferQueueItf self, ++ SLuint8** buffer, ++ SLuint32* size ++ ); ++ SLresult (*RegisterCallback) ( ++ SLOHBufferQueueItf self, ++ SlOHBufferQueueCallback callback, ++ void* pContext ++ ); ++}; ++ ++#ifdef __cplusplus ++} /* extern "C" */ ++#endif ++ ++#endif /* OPENSLES_OPENHARMONY_H */ +diff --git a/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_Platform.h b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_Platform.h +new file mode 100644 +index 0000000..afce98a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/SLES/OpenSLES_Platform.h +@@ -0,0 +1,47 @@ ++/* ++ * Copyright (c) 2007-2009 The Khronos Group Inc. ++ * ++ * Permission is hereby granted, free of charge, to any person obtaining a copy of ++ * this software and /or associated documentation files (the "Materials "), to ++ * deal in the Materials without restriction, including without limitation the ++ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Materials, and to permit persons to whom the Materials are ++ * furnished to do so, subject to ++ * the following conditions: ++ * ++ * The above copyright notice and this permission notice shall be included ++ * in all copies or substantial portions of the Materials. ++ * ++ * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ++ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ++ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE ++ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER ++ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, ++ * OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE ++ * MATERIALS. ++ * ++ * OpenSLES_Platform.h - OpenSL ES version 1.0 ++ * ++ */ ++ ++/****************************************************************************/ ++/* NOTE: This file contains definitions for the base types and the */ ++/* SLAPIENTRY macro. This file **WILL NEED TO BE EDITED** to provide */ ++/* the correct definitions specific to the platform being used. */ ++/****************************************************************************/ ++ ++#ifndef _OPENSLES_PLATFORM_H_ ++#define _OPENSLES_PLATFORM_H_ ++ ++typedef unsigned char sl_uint8_t; ++typedef signed char sl_int8_t; ++typedef unsigned short sl_uint16_t; ++typedef signed short sl_int16_t; ++typedef unsigned long sl_uint32_t; ++typedef signed long sl_int32_t; ++ ++#ifndef SLAPIENTRY ++#define SLAPIENTRY /* override per-platform */ ++#endif ++ ++#endif /* _OPENSLES_PLATFORM_H_ */ +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/auxvec.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/auxvec.h +new file mode 100644 +index 0000000..4735fd5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/auxvec.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_AUXVEC_H ++#define __ASM_AUXVEC_H ++#define AT_SYSINFO_EHDR 33 ++#define AT_MINSIGSTKSZ 51 ++#define AT_VECTOR_SIZE_ARCH 2 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bitsperlong.h +new file mode 100644 +index 0000000..c409c19 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bitsperlong.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_BITSPERLONG_H ++#define __ASM_BITSPERLONG_H ++#define __BITS_PER_LONG 64 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bpf_perf_event.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..cad04bf +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/bpf_perf_event.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_BPF_PERF_EVENT_H__ ++#define _UAPI__ASM_BPF_PERF_EVENT_H__ ++#include ++typedef struct user_pt_regs bpf_user_pt_regs_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/byteorder.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/byteorder.h +new file mode 100644 +index 0000000..c3174b1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/byteorder.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_BYTEORDER_H ++#define __ASM_BYTEORDER_H ++#ifdef __AARCH64EB__ ++#include ++#else ++#include ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/errno.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/errno.h +new file mode 100644 +index 0000000..392cd94 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/errno.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/fcntl.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/fcntl.h +new file mode 100644 +index 0000000..e9e0e01 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/fcntl.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_FCNTL_H ++#define __ASM_FCNTL_H ++#define O_DIRECTORY 040000 ++#define O_NOFOLLOW 0100000 ++#define O_DIRECT 0200000 ++#define O_LARGEFILE 0400000 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/hwcap.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/hwcap.h +new file mode 100644 +index 0000000..8a70a52 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/hwcap.h +@@ -0,0 +1,72 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_HWCAP_H ++#define _UAPI__ASM_HWCAP_H ++#define HWCAP_FP (1 << 0) ++#define HWCAP_ASIMD (1 << 1) ++#define HWCAP_EVTSTRM (1 << 2) ++#define HWCAP_AES (1 << 3) ++#define HWCAP_PMULL (1 << 4) ++#define HWCAP_SHA1 (1 << 5) ++#define HWCAP_SHA2 (1 << 6) ++#define HWCAP_CRC32 (1 << 7) ++#define HWCAP_ATOMICS (1 << 8) ++#define HWCAP_FPHP (1 << 9) ++#define HWCAP_ASIMDHP (1 << 10) ++#define HWCAP_CPUID (1 << 11) ++#define HWCAP_ASIMDRDM (1 << 12) ++#define HWCAP_JSCVT (1 << 13) ++#define HWCAP_FCMA (1 << 14) ++#define HWCAP_LRCPC (1 << 15) ++#define HWCAP_DCPOP (1 << 16) ++#define HWCAP_SHA3 (1 << 17) ++#define HWCAP_SM3 (1 << 18) ++#define HWCAP_SM4 (1 << 19) ++#define HWCAP_ASIMDDP (1 << 20) ++#define HWCAP_SHA512 (1 << 21) ++#define HWCAP_SVE (1 << 22) ++#define HWCAP_ASIMDFHM (1 << 23) ++#define HWCAP_DIT (1 << 24) ++#define HWCAP_USCAT (1 << 25) ++#define HWCAP_ILRCPC (1 << 26) ++#define HWCAP_FLAGM (1 << 27) ++#define HWCAP_SSBS (1 << 28) ++#define HWCAP_SB (1 << 29) ++#define HWCAP_PACA (1 << 30) ++#define HWCAP_PACG (1UL << 31) ++#define HWCAP2_DCPODP (1 << 0) ++#define HWCAP2_SVE2 (1 << 1) ++#define HWCAP2_SVEAES (1 << 2) ++#define HWCAP2_SVEPMULL (1 << 3) ++#define HWCAP2_SVEBITPERM (1 << 4) ++#define HWCAP2_SVESHA3 (1 << 5) ++#define HWCAP2_SVESM4 (1 << 6) ++#define HWCAP2_FLAGM2 (1 << 7) ++#define HWCAP2_FRINT (1 << 8) ++#define HWCAP2_SVEI8MM (1 << 9) ++#define HWCAP2_SVEF32MM (1 << 10) ++#define HWCAP2_SVEF64MM (1 << 11) ++#define HWCAP2_SVEBF16 (1 << 12) ++#define HWCAP2_I8MM (1 << 13) ++#define HWCAP2_BF16 (1 << 14) ++#define HWCAP2_DGH (1 << 15) ++#define HWCAP2_RNG (1 << 16) ++#define HWCAP2_BTI (1 << 17) ++#define HWCAP2_MTE (1 << 18) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctl.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctl.h +new file mode 100644 +index 0000000..7b7bd37 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctl.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctls.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctls.h +new file mode 100644 +index 0000000..0c66935 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ioctls.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ipcbuf.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ipcbuf.h +new file mode 100644 +index 0000000..0021f14 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ipcbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm.h +new file mode 100644 +index 0000000..32b6a2b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm.h +@@ -0,0 +1,237 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ARM_KVM_H__ ++#define __ARM_KVM_H__ ++#define KVM_SPSR_EL1 0 ++#define KVM_SPSR_SVC KVM_SPSR_EL1 ++#define KVM_SPSR_ABT 1 ++#define KVM_SPSR_UND 2 ++#define KVM_SPSR_IRQ 3 ++#define KVM_SPSR_FIQ 4 ++#define KVM_NR_SPSR 5 ++#ifndef __ASSEMBLY__ ++#include ++#include ++#include ++#include ++#define __KVM_HAVE_GUEST_DEBUG ++#define __KVM_HAVE_IRQ_LINE ++#define __KVM_HAVE_READONLY_MEM ++#define __KVM_HAVE_VCPU_EVENTS ++#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 ++#define KVM_REG_SIZE(id) (1U << (((id) & KVM_REG_SIZE_MASK) >> KVM_REG_SIZE_SHIFT)) ++struct kvm_regs { ++ struct user_pt_regs regs; ++ __u64 sp_el1; ++ __u64 elr_el1; ++ __u64 spsr[KVM_NR_SPSR]; ++ struct user_fpsimd_state fp_regs; ++}; ++#define KVM_ARM_TARGET_AEM_V8 0 ++#define KVM_ARM_TARGET_FOUNDATION_V8 1 ++#define KVM_ARM_TARGET_CORTEX_A57 2 ++#define KVM_ARM_TARGET_XGENE_POTENZA 3 ++#define KVM_ARM_TARGET_CORTEX_A53 4 ++#define KVM_ARM_TARGET_GENERIC_V8 5 ++#define KVM_ARM_NUM_TARGETS 6 ++#define KVM_ARM_DEVICE_TYPE_SHIFT 0 ++#define KVM_ARM_DEVICE_TYPE_MASK (0xffff << KVM_ARM_DEVICE_TYPE_SHIFT) ++#define KVM_ARM_DEVICE_ID_SHIFT 16 ++#define KVM_ARM_DEVICE_ID_MASK (0xffff << KVM_ARM_DEVICE_ID_SHIFT) ++#define KVM_ARM_DEVICE_VGIC_V2 0 ++#define KVM_VGIC_V2_ADDR_TYPE_DIST 0 ++#define KVM_VGIC_V2_ADDR_TYPE_CPU 1 ++#define KVM_VGIC_V2_DIST_SIZE 0x1000 ++#define KVM_VGIC_V2_CPU_SIZE 0x2000 ++#define KVM_VGIC_V3_ADDR_TYPE_DIST 2 ++#define KVM_VGIC_V3_ADDR_TYPE_REDIST 3 ++#define KVM_VGIC_ITS_ADDR_TYPE 4 ++#define KVM_VGIC_V3_ADDR_TYPE_REDIST_REGION 5 ++#define KVM_VGIC_V3_DIST_SIZE SZ_64K ++#define KVM_VGIC_V3_REDIST_SIZE (2 * SZ_64K) ++#define KVM_VGIC_V3_ITS_SIZE (2 * SZ_64K) ++#define KVM_ARM_VCPU_POWER_OFF 0 ++#define KVM_ARM_VCPU_EL1_32BIT 1 ++#define KVM_ARM_VCPU_PSCI_0_2 2 ++#define KVM_ARM_VCPU_PMU_V3 3 ++#define KVM_ARM_VCPU_SVE 4 ++#define KVM_ARM_VCPU_PTRAUTH_ADDRESS 5 ++#define KVM_ARM_VCPU_PTRAUTH_GENERIC 6 ++struct kvm_vcpu_init { ++ __u32 target; ++ __u32 features[7]; ++}; ++struct kvm_sregs { ++}; ++struct kvm_fpu { ++}; ++#define KVM_ARM_MAX_DBG_REGS 16 ++struct kvm_guest_debug_arch { ++ __u64 dbg_bcr[KVM_ARM_MAX_DBG_REGS]; ++ __u64 dbg_bvr[KVM_ARM_MAX_DBG_REGS]; ++ __u64 dbg_wcr[KVM_ARM_MAX_DBG_REGS]; ++ __u64 dbg_wvr[KVM_ARM_MAX_DBG_REGS]; ++}; ++struct kvm_debug_exit_arch { ++ __u32 hsr; ++ __u64 far; ++}; ++#define KVM_GUESTDBG_USE_SW_BP (1 << 16) ++#define KVM_GUESTDBG_USE_HW (1 << 17) ++struct kvm_sync_regs { ++ __u64 device_irq_level; ++}; ++struct kvm_arch_memory_slot { ++}; ++struct kvm_pmu_event_filter { ++ __u16 base_event; ++ __u16 nevents; ++#define KVM_PMU_EVENT_ALLOW 0 ++#define KVM_PMU_EVENT_DENY 1 ++ __u8 action; ++ __u8 pad[3]; ++}; ++struct kvm_vcpu_events { ++ struct { ++ __u8 serror_pending; ++ __u8 serror_has_esr; ++ __u8 ext_dabt_pending; ++ __u8 pad[5]; ++ __u64 serror_esr; ++ } exception; ++ __u32 reserved[12]; ++}; ++#define KVM_REG_ARM_COPROC_MASK 0x000000000FFF0000 ++#define KVM_REG_ARM_COPROC_SHIFT 16 ++#define KVM_REG_ARM_CORE (0x0010 << KVM_REG_ARM_COPROC_SHIFT) ++#define KVM_REG_ARM_CORE_REG(name) (offsetof(struct kvm_regs, name) / sizeof(__u32)) ++#define KVM_REG_ARM_DEMUX (0x0011 << KVM_REG_ARM_COPROC_SHIFT) ++#define KVM_REG_ARM_DEMUX_ID_MASK 0x000000000000FF00 ++#define KVM_REG_ARM_DEMUX_ID_SHIFT 8 ++#define KVM_REG_ARM_DEMUX_ID_CCSIDR (0x00 << KVM_REG_ARM_DEMUX_ID_SHIFT) ++#define KVM_REG_ARM_DEMUX_VAL_MASK 0x00000000000000FF ++#define KVM_REG_ARM_DEMUX_VAL_SHIFT 0 ++#define KVM_REG_ARM64_SYSREG (0x0013 << KVM_REG_ARM_COPROC_SHIFT) ++#define KVM_REG_ARM64_SYSREG_OP0_MASK 0x000000000000c000 ++#define KVM_REG_ARM64_SYSREG_OP0_SHIFT 14 ++#define KVM_REG_ARM64_SYSREG_OP1_MASK 0x0000000000003800 ++#define KVM_REG_ARM64_SYSREG_OP1_SHIFT 11 ++#define KVM_REG_ARM64_SYSREG_CRN_MASK 0x0000000000000780 ++#define KVM_REG_ARM64_SYSREG_CRN_SHIFT 7 ++#define KVM_REG_ARM64_SYSREG_CRM_MASK 0x0000000000000078 ++#define KVM_REG_ARM64_SYSREG_CRM_SHIFT 3 ++#define KVM_REG_ARM64_SYSREG_OP2_MASK 0x0000000000000007 ++#define KVM_REG_ARM64_SYSREG_OP2_SHIFT 0 ++#define ARM64_SYS_REG_SHIFT_MASK(x,n) (((x) << KVM_REG_ARM64_SYSREG_ ##n ##_SHIFT) & KVM_REG_ARM64_SYSREG_ ##n ##_MASK) ++#define __ARM64_SYS_REG(op0,op1,crn,crm,op2) (KVM_REG_ARM64 | KVM_REG_ARM64_SYSREG | ARM64_SYS_REG_SHIFT_MASK(op0, OP0) | ARM64_SYS_REG_SHIFT_MASK(op1, OP1) | ARM64_SYS_REG_SHIFT_MASK(crn, CRN) | ARM64_SYS_REG_SHIFT_MASK(crm, CRM) | ARM64_SYS_REG_SHIFT_MASK(op2, OP2)) ++#define ARM64_SYS_REG(...) (__ARM64_SYS_REG(__VA_ARGS__) | KVM_REG_SIZE_U64) ++#define KVM_REG_ARM_PTIMER_CTL ARM64_SYS_REG(3, 3, 14, 2, 1) ++#define KVM_REG_ARM_PTIMER_CVAL ARM64_SYS_REG(3, 3, 14, 2, 2) ++#define KVM_REG_ARM_PTIMER_CNT ARM64_SYS_REG(3, 3, 14, 0, 1) ++#define KVM_REG_ARM_TIMER_CTL ARM64_SYS_REG(3, 3, 14, 3, 1) ++#define KVM_REG_ARM_TIMER_CVAL ARM64_SYS_REG(3, 3, 14, 0, 2) ++#define KVM_REG_ARM_TIMER_CNT ARM64_SYS_REG(3, 3, 14, 3, 2) ++#define KVM_REG_ARM_FW (0x0014 << KVM_REG_ARM_COPROC_SHIFT) ++#define KVM_REG_ARM_FW_REG(r) (KVM_REG_ARM64 | KVM_REG_SIZE_U64 | KVM_REG_ARM_FW | ((r) & 0xffff)) ++#define KVM_REG_ARM_PSCI_VERSION KVM_REG_ARM_FW_REG(0) ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1 KVM_REG_ARM_FW_REG(1) ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_AVAIL 0 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_AVAIL 1 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_1_NOT_REQUIRED 2 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2 KVM_REG_ARM_FW_REG(2) ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_AVAIL 0 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_UNKNOWN 1 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_AVAIL 2 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_NOT_REQUIRED 3 ++#define KVM_REG_ARM_SMCCC_ARCH_WORKAROUND_2_ENABLED (1U << 4) ++#define KVM_REG_ARM64_SVE (0x15 << KVM_REG_ARM_COPROC_SHIFT) ++#define KVM_REG_ARM64_SVE_ZREG_BASE 0 ++#define KVM_REG_ARM64_SVE_PREG_BASE 0x400 ++#define KVM_REG_ARM64_SVE_FFR_BASE 0x600 ++#define KVM_ARM64_SVE_NUM_ZREGS __SVE_NUM_ZREGS ++#define KVM_ARM64_SVE_NUM_PREGS __SVE_NUM_PREGS ++#define KVM_ARM64_SVE_MAX_SLICES 32 ++#define KVM_REG_ARM64_SVE_ZREG(n,i) (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_ZREG_BASE | KVM_REG_SIZE_U2048 | (((n) & (KVM_ARM64_SVE_NUM_ZREGS - 1)) << 5) | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) ++#define KVM_REG_ARM64_SVE_PREG(n,i) (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_PREG_BASE | KVM_REG_SIZE_U256 | (((n) & (KVM_ARM64_SVE_NUM_PREGS - 1)) << 5) | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) ++#define KVM_REG_ARM64_SVE_FFR(i) (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_ARM64_SVE_FFR_BASE | KVM_REG_SIZE_U256 | ((i) & (KVM_ARM64_SVE_MAX_SLICES - 1))) ++#define KVM_ARM64_SVE_VQ_MIN __SVE_VQ_MIN ++#define KVM_ARM64_SVE_VQ_MAX __SVE_VQ_MAX ++#define KVM_REG_ARM64_SVE_VLS (KVM_REG_ARM64 | KVM_REG_ARM64_SVE | KVM_REG_SIZE_U512 | 0xffff) ++#define KVM_ARM64_SVE_VLS_WORDS ((KVM_ARM64_SVE_VQ_MAX - KVM_ARM64_SVE_VQ_MIN) / 64 + 1) ++#define KVM_DEV_ARM_VGIC_GRP_ADDR 0 ++#define KVM_DEV_ARM_VGIC_GRP_DIST_REGS 1 ++#define KVM_DEV_ARM_VGIC_GRP_CPU_REGS 2 ++#define KVM_DEV_ARM_VGIC_CPUID_SHIFT 32 ++#define KVM_DEV_ARM_VGIC_CPUID_MASK (0xffULL << KVM_DEV_ARM_VGIC_CPUID_SHIFT) ++#define KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT 32 ++#define KVM_DEV_ARM_VGIC_V3_MPIDR_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_V3_MPIDR_SHIFT) ++#define KVM_DEV_ARM_VGIC_OFFSET_SHIFT 0 ++#define KVM_DEV_ARM_VGIC_OFFSET_MASK (0xffffffffULL << KVM_DEV_ARM_VGIC_OFFSET_SHIFT) ++#define KVM_DEV_ARM_VGIC_SYSREG_INSTR_MASK (0xffff) ++#define KVM_DEV_ARM_VGIC_GRP_NR_IRQS 3 ++#define KVM_DEV_ARM_VGIC_GRP_CTRL 4 ++#define KVM_DEV_ARM_VGIC_GRP_REDIST_REGS 5 ++#define KVM_DEV_ARM_VGIC_GRP_CPU_SYSREGS 6 ++#define KVM_DEV_ARM_VGIC_GRP_LEVEL_INFO 7 ++#define KVM_DEV_ARM_VGIC_GRP_ITS_REGS 8 ++#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT 10 ++#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_MASK (0x3fffffULL << KVM_DEV_ARM_VGIC_LINE_LEVEL_INFO_SHIFT) ++#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff ++#define VGIC_LEVEL_INFO_LINE_LEVEL 0 ++#define KVM_DEV_ARM_VGIC_CTRL_INIT 0 ++#define KVM_DEV_ARM_ITS_SAVE_TABLES 1 ++#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2 ++#define KVM_DEV_ARM_VGIC_SAVE_PENDING_TABLES 3 ++#define KVM_DEV_ARM_ITS_CTRL_RESET 4 ++#define KVM_ARM_VCPU_PMU_V3_CTRL 0 ++#define KVM_ARM_VCPU_PMU_V3_IRQ 0 ++#define KVM_ARM_VCPU_PMU_V3_INIT 1 ++#define KVM_ARM_VCPU_PMU_V3_FILTER 2 ++#define KVM_ARM_VCPU_TIMER_CTRL 1 ++#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0 ++#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1 ++#define KVM_ARM_VCPU_PVTIME_CTRL 2 ++#define KVM_ARM_VCPU_PVTIME_IPA 0 ++#define KVM_ARM_IRQ_VCPU2_SHIFT 28 ++#define KVM_ARM_IRQ_VCPU2_MASK 0xf ++#define KVM_ARM_IRQ_TYPE_SHIFT 24 ++#define KVM_ARM_IRQ_TYPE_MASK 0xf ++#define KVM_ARM_IRQ_VCPU_SHIFT 16 ++#define KVM_ARM_IRQ_VCPU_MASK 0xff ++#define KVM_ARM_IRQ_NUM_SHIFT 0 ++#define KVM_ARM_IRQ_NUM_MASK 0xffff ++#define KVM_ARM_IRQ_TYPE_CPU 0 ++#define KVM_ARM_IRQ_TYPE_SPI 1 ++#define KVM_ARM_IRQ_TYPE_PPI 2 ++#define KVM_ARM_IRQ_CPU_IRQ 0 ++#define KVM_ARM_IRQ_CPU_FIQ 1 ++#define KVM_ARM_IRQ_GIC_MAX 127 ++#define KVM_NR_IRQCHIPS 1 ++#define KVM_PSCI_FN_BASE 0x95c1ba5e ++#define KVM_PSCI_FN(n) (KVM_PSCI_FN_BASE + (n)) ++#define KVM_PSCI_FN_CPU_SUSPEND KVM_PSCI_FN(0) ++#define KVM_PSCI_FN_CPU_OFF KVM_PSCI_FN(1) ++#define KVM_PSCI_FN_CPU_ON KVM_PSCI_FN(2) ++#define KVM_PSCI_FN_MIGRATE KVM_PSCI_FN(3) ++#define KVM_PSCI_RET_SUCCESS PSCI_RET_SUCCESS ++#define KVM_PSCI_RET_NI PSCI_RET_NOT_SUPPORTED ++#define KVM_PSCI_RET_INVAL PSCI_RET_INVALID_PARAMS ++#define KVM_PSCI_RET_DENIED PSCI_RET_DENIED ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm_para.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm_para.h +new file mode 100644 +index 0000000..e19f7a0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/kvm_para.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/mman.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/mman.h +new file mode 100644 +index 0000000..98f72cf +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/mman.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_MMAN_H ++#define _UAPI__ASM_MMAN_H ++#include ++#define PROT_BTI 0x10 ++#define PROT_MTE 0x20 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/msgbuf.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/msgbuf.h +new file mode 100644 +index 0000000..7809e3c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/msgbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/param.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/param.h +new file mode 100644 +index 0000000..3bd70ed +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/param.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_PARAM_H ++#define __ASM_PARAM_H ++#define EXEC_PAGESIZE 65536 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/perf_regs.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/perf_regs.h +new file mode 100644 +index 0000000..71d496f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/perf_regs.h +@@ -0,0 +1,57 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_ARM64_PERF_REGS_H ++#define _ASM_ARM64_PERF_REGS_H ++enum perf_event_arm_regs { ++ PERF_REG_ARM64_X0, ++ PERF_REG_ARM64_X1, ++ PERF_REG_ARM64_X2, ++ PERF_REG_ARM64_X3, ++ PERF_REG_ARM64_X4, ++ PERF_REG_ARM64_X5, ++ PERF_REG_ARM64_X6, ++ PERF_REG_ARM64_X7, ++ PERF_REG_ARM64_X8, ++ PERF_REG_ARM64_X9, ++ PERF_REG_ARM64_X10, ++ PERF_REG_ARM64_X11, ++ PERF_REG_ARM64_X12, ++ PERF_REG_ARM64_X13, ++ PERF_REG_ARM64_X14, ++ PERF_REG_ARM64_X15, ++ PERF_REG_ARM64_X16, ++ PERF_REG_ARM64_X17, ++ PERF_REG_ARM64_X18, ++ PERF_REG_ARM64_X19, ++ PERF_REG_ARM64_X20, ++ PERF_REG_ARM64_X21, ++ PERF_REG_ARM64_X22, ++ PERF_REG_ARM64_X23, ++ PERF_REG_ARM64_X24, ++ PERF_REG_ARM64_X25, ++ PERF_REG_ARM64_X26, ++ PERF_REG_ARM64_X27, ++ PERF_REG_ARM64_X28, ++ PERF_REG_ARM64_X29, ++ PERF_REG_ARM64_LR, ++ PERF_REG_ARM64_SP, ++ PERF_REG_ARM64_PC, ++ PERF_REG_ARM64_MAX, ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/poll.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/poll.h +new file mode 100644 +index 0000000..d7e8adc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/poll.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/posix_types.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/posix_types.h +new file mode 100644 +index 0000000..9ae7bfc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/posix_types.h +@@ -0,0 +1,25 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_POSIX_TYPES_H ++#define __ASM_POSIX_TYPES_H ++typedef unsigned short __kernel_old_uid_t; ++typedef unsigned short __kernel_old_gid_t; ++#define __kernel_old_uid_t __kernel_old_uid_t ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ptrace.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ptrace.h +new file mode 100644 +index 0000000..480efcf +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ptrace.h +@@ -0,0 +1,129 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_PTRACE_H ++#define _UAPI__ASM_PTRACE_H ++#include ++#include ++#include ++#define PSR_MODE_EL0t 0x00000000 ++#define PSR_MODE_EL1t 0x00000004 ++#define PSR_MODE_EL1h 0x00000005 ++#define PSR_MODE_EL2t 0x00000008 ++#define PSR_MODE_EL2h 0x00000009 ++#define PSR_MODE_EL3t 0x0000000c ++#define PSR_MODE_EL3h 0x0000000d ++#define PSR_MODE_MASK 0x0000000f ++#define PSR_MODE32_BIT 0x00000010 ++#define PSR_F_BIT 0x00000040 ++#define PSR_I_BIT 0x00000080 ++#define PSR_A_BIT 0x00000100 ++#define PSR_D_BIT 0x00000200 ++#define PSR_BTYPE_MASK 0x00000c00 ++#define PSR_SSBS_BIT 0x00001000 ++#define PSR_PAN_BIT 0x00400000 ++#define PSR_UAO_BIT 0x00800000 ++#define PSR_DIT_BIT 0x01000000 ++#define PSR_TCO_BIT 0x02000000 ++#define PSR_V_BIT 0x10000000 ++#define PSR_C_BIT 0x20000000 ++#define PSR_Z_BIT 0x40000000 ++#define PSR_N_BIT 0x80000000 ++#define PSR_BTYPE_SHIFT 10 ++#define PSR_f 0xff000000 ++#define PSR_s 0x00ff0000 ++#define PSR_x 0x0000ff00 ++#define PSR_c 0x000000ff ++#define PSR_BTYPE_NONE (0b00 << PSR_BTYPE_SHIFT) ++#define PSR_BTYPE_JC (0b01 << PSR_BTYPE_SHIFT) ++#define PSR_BTYPE_C (0b10 << PSR_BTYPE_SHIFT) ++#define PSR_BTYPE_J (0b11 << PSR_BTYPE_SHIFT) ++#define PTRACE_SYSEMU 31 ++#define PTRACE_SYSEMU_SINGLESTEP 32 ++#define PTRACE_PEEKMTETAGS 33 ++#define PTRACE_POKEMTETAGS 34 ++#ifndef __ASSEMBLY__ ++struct user_pt_regs { ++ __u64 regs[31]; ++ __u64 sp; ++ __u64 pc; ++ __u64 pstate; ++}; ++struct user_fpsimd_state { ++ __uint128_t vregs[32]; ++ __u32 fpsr; ++ __u32 fpcr; ++ __u32 __reserved[2]; ++}; ++struct user_hwdebug_state { ++ __u32 dbg_info; ++ __u32 pad; ++ struct { ++ __u64 addr; ++ __u32 ctrl; ++ __u32 pad; ++ } dbg_regs[16]; ++}; ++struct user_sve_header { ++ __u32 size; ++ __u32 max_size; ++ __u16 vl; ++ __u16 max_vl; ++ __u16 flags; ++ __u16 __reserved; ++}; ++#define SVE_PT_REGS_MASK (1 << 0) ++#define SVE_PT_REGS_FPSIMD 0 ++#define SVE_PT_REGS_SVE SVE_PT_REGS_MASK ++#define SVE_PT_VL_INHERIT ((1 << 17) >> 16) ++#define SVE_PT_VL_ONEXEC ((1 << 18) >> 16) ++#define SVE_PT_REGS_OFFSET ((sizeof(struct user_sve_header) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) ++#define SVE_PT_FPSIMD_OFFSET SVE_PT_REGS_OFFSET ++#define SVE_PT_FPSIMD_SIZE(vq,flags) (sizeof(struct user_fpsimd_state)) ++#define SVE_PT_SVE_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) ++#define SVE_PT_SVE_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) ++#define SVE_PT_SVE_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) ++#define SVE_PT_SVE_FPSR_SIZE sizeof(__u32) ++#define SVE_PT_SVE_FPCR_SIZE sizeof(__u32) ++#define SVE_PT_SVE_OFFSET SVE_PT_REGS_OFFSET ++#define SVE_PT_SVE_ZREGS_OFFSET (SVE_PT_REGS_OFFSET + __SVE_ZREGS_OFFSET) ++#define SVE_PT_SVE_ZREG_OFFSET(vq,n) (SVE_PT_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) ++#define SVE_PT_SVE_ZREGS_SIZE(vq) (SVE_PT_SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - SVE_PT_SVE_ZREGS_OFFSET) ++#define SVE_PT_SVE_PREGS_OFFSET(vq) (SVE_PT_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) ++#define SVE_PT_SVE_PREG_OFFSET(vq,n) (SVE_PT_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) ++#define SVE_PT_SVE_PREGS_SIZE(vq) (SVE_PT_SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - SVE_PT_SVE_PREGS_OFFSET(vq)) ++#define SVE_PT_SVE_FFR_OFFSET(vq) (SVE_PT_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) ++#define SVE_PT_SVE_FPSR_OFFSET(vq) ((SVE_PT_SVE_FFR_OFFSET(vq) + SVE_PT_SVE_FFR_SIZE(vq) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) ++#define SVE_PT_SVE_FPCR_OFFSET(vq) (SVE_PT_SVE_FPSR_OFFSET(vq) + SVE_PT_SVE_FPSR_SIZE) ++#define SVE_PT_SVE_SIZE(vq,flags) ((SVE_PT_SVE_FPCR_OFFSET(vq) + SVE_PT_SVE_FPCR_SIZE - SVE_PT_SVE_OFFSET + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) ++#define SVE_PT_SIZE(vq,flags) (((flags) & SVE_PT_REGS_MASK) == SVE_PT_REGS_SVE ? SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) : SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags)) ++struct user_pac_mask { ++ __u64 data_mask; ++ __u64 insn_mask; ++}; ++struct user_pac_address_keys { ++ __uint128_t apiakey; ++ __uint128_t apibkey; ++ __uint128_t apdakey; ++ __uint128_t apdbkey; ++}; ++struct user_pac_generic_keys { ++ __uint128_t apgakey; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/resource.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/resource.h +new file mode 100644 +index 0000000..371adb5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/resource.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sembuf.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sembuf.h +new file mode 100644 +index 0000000..6ce6549 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sembuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/setup.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/setup.h +new file mode 100644 +index 0000000..eac94e0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/setup.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_SETUP_H ++#define __ASM_SETUP_H ++#include ++#define COMMAND_LINE_SIZE 2048 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/shmbuf.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/shmbuf.h +new file mode 100644 +index 0000000..fe8b1be +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/shmbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sigcontext.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sigcontext.h +new file mode 100644 +index 0000000..518079d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sigcontext.h +@@ -0,0 +1,85 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_SIGCONTEXT_H ++#define _UAPI__ASM_SIGCONTEXT_H ++#ifndef __ASSEMBLY__ ++#include ++struct sigcontext { ++ __u64 fault_address; ++ __u64 regs[31]; ++ __u64 sp; ++ __u64 pc; ++ __u64 pstate; ++ __u8 __reserved[4096] __attribute__((__aligned__(16))); ++}; ++struct _aarch64_ctx { ++ __u32 magic; ++ __u32 size; ++}; ++#define FPSIMD_MAGIC 0x46508001 ++struct fpsimd_context { ++ struct _aarch64_ctx head; ++ __u32 fpsr; ++ __u32 fpcr; ++ __uint128_t vregs[32]; ++}; ++#define ESR_MAGIC 0x45535201 ++struct esr_context { ++ struct _aarch64_ctx head; ++ __u64 esr; ++}; ++#define EXTRA_MAGIC 0x45585401 ++struct extra_context { ++ struct _aarch64_ctx head; ++ __u64 datap; ++ __u32 size; ++ __u32 __reserved[3]; ++}; ++#define SVE_MAGIC 0x53564501 ++struct sve_context { ++ struct _aarch64_ctx head; ++ __u16 vl; ++ __u16 __reserved[3]; ++}; ++#endif ++#include ++#define SVE_VQ_BYTES __SVE_VQ_BYTES ++#define SVE_VQ_MIN __SVE_VQ_MIN ++#define SVE_VQ_MAX __SVE_VQ_MAX ++#define SVE_VL_MIN __SVE_VL_MIN ++#define SVE_VL_MAX __SVE_VL_MAX ++#define SVE_NUM_ZREGS __SVE_NUM_ZREGS ++#define SVE_NUM_PREGS __SVE_NUM_PREGS ++#define sve_vl_valid(vl) __sve_vl_valid(vl) ++#define sve_vq_from_vl(vl) __sve_vq_from_vl(vl) ++#define sve_vl_from_vq(vq) __sve_vl_from_vq(vq) ++#define SVE_SIG_ZREG_SIZE(vq) __SVE_ZREG_SIZE(vq) ++#define SVE_SIG_PREG_SIZE(vq) __SVE_PREG_SIZE(vq) ++#define SVE_SIG_FFR_SIZE(vq) __SVE_FFR_SIZE(vq) ++#define SVE_SIG_REGS_OFFSET ((sizeof(struct sve_context) + (__SVE_VQ_BYTES - 1)) / __SVE_VQ_BYTES * __SVE_VQ_BYTES) ++#define SVE_SIG_ZREGS_OFFSET (SVE_SIG_REGS_OFFSET + __SVE_ZREGS_OFFSET) ++#define SVE_SIG_ZREG_OFFSET(vq,n) (SVE_SIG_REGS_OFFSET + __SVE_ZREG_OFFSET(vq, n)) ++#define SVE_SIG_ZREGS_SIZE(vq) __SVE_ZREGS_SIZE(vq) ++#define SVE_SIG_PREGS_OFFSET(vq) (SVE_SIG_REGS_OFFSET + __SVE_PREGS_OFFSET(vq)) ++#define SVE_SIG_PREG_OFFSET(vq,n) (SVE_SIG_REGS_OFFSET + __SVE_PREG_OFFSET(vq, n)) ++#define SVE_SIG_PREGS_SIZE(vq) __SVE_PREGS_SIZE(vq) ++#define SVE_SIG_FFR_OFFSET(vq) (SVE_SIG_REGS_OFFSET + __SVE_FFR_OFFSET(vq)) ++#define SVE_SIG_REGS_SIZE(vq) (__SVE_FFR_OFFSET(vq) + __SVE_FFR_SIZE(vq)) ++#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/siginfo.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/siginfo.h +new file mode 100644 +index 0000000..a31ebb2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/siginfo.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/signal.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/signal.h +new file mode 100644 +index 0000000..7630b75 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/signal.h +@@ -0,0 +1,25 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_SIGNAL_H ++#define __ASM_SIGNAL_H ++#define SA_RESTORER 0x04000000 ++#define MINSIGSTKSZ 5120 ++#define SIGSTKSZ 16384 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/socket.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/socket.h +new file mode 100644 +index 0000000..50a9874 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/socket.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sockios.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sockios.h +new file mode 100644 +index 0000000..710db92 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sockios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/stat.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/stat.h +new file mode 100644 +index 0000000..af7ebfc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/stat.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/statfs.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/statfs.h +new file mode 100644 +index 0000000..4a96c7e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/statfs.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_STATFS_H ++#define __ASM_STATFS_H ++#define ARCH_PACK_COMPAT_STATFS64 __attribute__((packed, aligned(4))) ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sve_context.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sve_context.h +new file mode 100644 +index 0000000..ff0063e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/sve_context.h +@@ -0,0 +1,42 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_SVE_CONTEXT_H ++#define _UAPI__ASM_SVE_CONTEXT_H ++#include ++#define __SVE_VQ_BYTES 16 ++#define __SVE_VQ_MIN 1 ++#define __SVE_VQ_MAX 512 ++#define __SVE_VL_MIN (__SVE_VQ_MIN * __SVE_VQ_BYTES) ++#define __SVE_VL_MAX (__SVE_VQ_MAX * __SVE_VQ_BYTES) ++#define __SVE_NUM_ZREGS 32 ++#define __SVE_NUM_PREGS 16 ++#define __sve_vl_valid(vl) ((vl) % __SVE_VQ_BYTES == 0 && (vl) >= __SVE_VL_MIN && (vl) <= __SVE_VL_MAX) ++#define __sve_vq_from_vl(vl) ((vl) / __SVE_VQ_BYTES) ++#define __sve_vl_from_vq(vq) ((vq) * __SVE_VQ_BYTES) ++#define __SVE_ZREG_SIZE(vq) ((__u32) (vq) * __SVE_VQ_BYTES) ++#define __SVE_PREG_SIZE(vq) ((__u32) (vq) * (__SVE_VQ_BYTES / 8)) ++#define __SVE_FFR_SIZE(vq) __SVE_PREG_SIZE(vq) ++#define __SVE_ZREGS_OFFSET 0 ++#define __SVE_ZREG_OFFSET(vq,n) (__SVE_ZREGS_OFFSET + __SVE_ZREG_SIZE(vq) * (n)) ++#define __SVE_ZREGS_SIZE(vq) (__SVE_ZREG_OFFSET(vq, __SVE_NUM_ZREGS) - __SVE_ZREGS_OFFSET) ++#define __SVE_PREGS_OFFSET(vq) (__SVE_ZREGS_OFFSET + __SVE_ZREGS_SIZE(vq)) ++#define __SVE_PREG_OFFSET(vq,n) (__SVE_PREGS_OFFSET(vq) + __SVE_PREG_SIZE(vq) * (n)) ++#define __SVE_PREGS_SIZE(vq) (__SVE_PREG_OFFSET(vq, __SVE_NUM_PREGS) - __SVE_PREGS_OFFSET(vq)) ++#define __SVE_FFR_OFFSET(vq) (__SVE_PREGS_OFFSET(vq) + __SVE_PREGS_SIZE(vq)) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/swab.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/swab.h +new file mode 100644 +index 0000000..0049f53 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/swab.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termbits.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termbits.h +new file mode 100644 +index 0000000..42af6fe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termbits.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termios.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termios.h +new file mode 100644 +index 0000000..feca4c6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/termios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/types.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/types.h +new file mode 100644 +index 0000000..8250f43 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/types.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ucontext.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ucontext.h +new file mode 100644 +index 0000000..24dc60a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/ucontext.h +@@ -0,0 +1,30 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_UCONTEXT_H ++#define _UAPI__ASM_UCONTEXT_H ++#include ++struct ucontext { ++ unsigned long uc_flags; ++ struct ucontext * uc_link; ++ stack_t uc_stack; ++ sigset_t uc_sigmask; ++ __u8 __linux_unused[1024 / 8 - sizeof(sigset_t)]; ++ struct sigcontext uc_mcontext; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/unistd.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/unistd.h +new file mode 100644 +index 0000000..e93f3f1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/asm/unistd.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#define __ARCH_WANT_RENAMEAT ++#define __ARCH_WANT_NEW_STAT ++#define __ARCH_WANT_SET_GET_RLIMIT ++#define __ARCH_WANT_TIME32_SYSCALLS ++#define __ARCH_WANT_SYS_CLONE3 ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/alltypes.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/alltypes.h +new file mode 100644 +index 0000000..04d8c0b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/alltypes.h +@@ -0,0 +1,423 @@ ++#define _Addr long ++#define _Int64 long ++#define _Reg long ++ ++#if __AARCH64EB__ ++#define __BYTE_ORDER 4321 ++#else ++#define __BYTE_ORDER 1234 ++#endif ++ ++#define __LONG_MAX 0x7fffffffffffffffL ++ ++#ifndef __cplusplus ++#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) ++typedef unsigned wchar_t; ++#define __DEFINED_wchar_t ++#endif ++ ++#endif ++#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) ++typedef unsigned wint_t; ++#define __DEFINED_wint_t ++#endif ++ ++ ++#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) ++typedef int blksize_t; ++#define __DEFINED_blksize_t ++#endif ++ ++#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) ++typedef unsigned int nlink_t; ++#define __DEFINED_nlink_t ++#endif ++ ++ ++#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) ++typedef float float_t; ++#define __DEFINED_float_t ++#endif ++ ++#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) ++typedef double double_t; ++#define __DEFINED_double_t ++#endif ++ ++ ++#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) ++typedef struct { long long __ll; long double __ld; } max_align_t; ++#define __DEFINED_max_align_t ++#endif ++ ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#define __USE_TIME_BITS64 1 ++ ++#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) ++typedef unsigned _Addr size_t; ++#define __DEFINED_size_t ++#endif ++ ++#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) ++typedef unsigned _Addr uintptr_t; ++#define __DEFINED_uintptr_t ++#endif ++ ++#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) ++typedef _Addr ptrdiff_t; ++#define __DEFINED_ptrdiff_t ++#endif ++ ++#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) ++typedef _Addr ssize_t; ++#define __DEFINED_ssize_t ++#endif ++ ++#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) ++typedef _Addr intptr_t; ++#define __DEFINED_intptr_t ++#endif ++ ++#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) ++typedef _Addr regoff_t; ++#define __DEFINED_regoff_t ++#endif ++ ++#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) ++typedef _Reg register_t; ++#define __DEFINED_register_t ++#endif ++ ++#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) ++typedef _Int64 time_t; ++#define __DEFINED_time_t ++#endif ++ ++#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) ++typedef _Int64 suseconds_t; ++#define __DEFINED_suseconds_t ++#endif ++ ++ ++#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) ++typedef signed char int8_t; ++#define __DEFINED_int8_t ++#endif ++ ++#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) ++typedef signed short int16_t; ++#define __DEFINED_int16_t ++#endif ++ ++#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) ++typedef signed int int32_t; ++#define __DEFINED_int32_t ++#endif ++ ++#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) ++typedef signed _Int64 int64_t; ++#define __DEFINED_int64_t ++#endif ++ ++#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) ++typedef signed _Int64 intmax_t; ++#define __DEFINED_intmax_t ++#endif ++ ++#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) ++typedef unsigned char uint8_t; ++#define __DEFINED_uint8_t ++#endif ++ ++#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) ++typedef unsigned short uint16_t; ++#define __DEFINED_uint16_t ++#endif ++ ++#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) ++typedef unsigned int uint32_t; ++#define __DEFINED_uint32_t ++#endif ++ ++#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) ++typedef unsigned _Int64 uint64_t; ++#define __DEFINED_uint64_t ++#endif ++ ++#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) ++typedef unsigned _Int64 u_int64_t; ++#define __DEFINED_u_int64_t ++#endif ++ ++#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) ++typedef unsigned _Int64 uintmax_t; ++#define __DEFINED_uintmax_t ++#endif ++ ++ ++#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) ++typedef unsigned mode_t; ++#define __DEFINED_mode_t ++#endif ++ ++#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) ++typedef unsigned _Reg nlink_t; ++#define __DEFINED_nlink_t ++#endif ++ ++#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) ++typedef _Int64 off_t; ++#define __DEFINED_off_t ++#endif ++ ++#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) ++typedef unsigned _Int64 ino_t; ++#define __DEFINED_ino_t ++#endif ++ ++#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) ++typedef unsigned _Int64 dev_t; ++#define __DEFINED_dev_t ++#endif ++ ++#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) ++typedef long blksize_t; ++#define __DEFINED_blksize_t ++#endif ++ ++#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) ++typedef _Int64 blkcnt_t; ++#define __DEFINED_blkcnt_t ++#endif ++ ++#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) ++typedef unsigned _Int64 fsblkcnt_t; ++#define __DEFINED_fsblkcnt_t ++#endif ++ ++#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) ++typedef unsigned _Int64 fsfilcnt_t; ++#define __DEFINED_fsfilcnt_t ++#endif ++ ++ ++#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) ++typedef unsigned wint_t; ++#define __DEFINED_wint_t ++#endif ++ ++#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) ++typedef unsigned long wctype_t; ++#define __DEFINED_wctype_t ++#endif ++ ++ ++#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) ++typedef void * timer_t; ++#define __DEFINED_timer_t ++#endif ++ ++#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) ++typedef int clockid_t; ++#define __DEFINED_clockid_t ++#endif ++ ++#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) ++typedef long clock_t; ++#define __DEFINED_clock_t ++#endif ++ ++#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) ++struct timeval { time_t tv_sec; suseconds_t tv_usec; }; ++#define __DEFINED_struct_timeval ++#endif ++ ++#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) ++struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; ++#define __DEFINED_struct_timespec ++#endif ++ ++ ++#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) ++typedef int pid_t; ++#define __DEFINED_pid_t ++#endif ++ ++#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) ++typedef unsigned id_t; ++#define __DEFINED_id_t ++#endif ++ ++#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) ++typedef unsigned uid_t; ++#define __DEFINED_uid_t ++#endif ++ ++#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) ++typedef unsigned gid_t; ++#define __DEFINED_gid_t ++#endif ++ ++#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) ++typedef int key_t; ++#define __DEFINED_key_t ++#endif ++ ++#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) ++typedef unsigned useconds_t; ++#define __DEFINED_useconds_t ++#endif ++ ++ ++#ifdef __cplusplus ++#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) ++typedef unsigned long pthread_t; ++#define __DEFINED_pthread_t ++#endif ++ ++#else ++#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) ++typedef struct __pthread * pthread_t; ++#define __DEFINED_pthread_t ++#endif ++ ++#endif ++#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) ++typedef int pthread_once_t; ++#define __DEFINED_pthread_once_t ++#endif ++ ++#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) ++typedef unsigned pthread_key_t; ++#define __DEFINED_pthread_key_t ++#endif ++ ++#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) ++typedef int pthread_spinlock_t; ++#define __DEFINED_pthread_spinlock_t ++#endif ++ ++#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) ++typedef struct { unsigned __attr; } pthread_mutexattr_t; ++#define __DEFINED_pthread_mutexattr_t ++#endif ++ ++#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) ++typedef struct { unsigned __attr; } pthread_condattr_t; ++#define __DEFINED_pthread_condattr_t ++#endif ++ ++#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) ++typedef struct { unsigned __attr; } pthread_barrierattr_t; ++#define __DEFINED_pthread_barrierattr_t ++#endif ++ ++#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) ++typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; ++#define __DEFINED_pthread_rwlockattr_t ++#endif ++ ++ ++#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) ++struct _IO_FILE { char __x; }; ++#define __DEFINED_struct__IO_FILE ++#endif ++ ++#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) ++typedef struct _IO_FILE FILE; ++#define __DEFINED_FILE ++#endif ++ ++ ++#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) ++typedef __builtin_va_list va_list; ++#define __DEFINED_va_list ++#endif ++ ++#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) ++typedef __builtin_va_list __isoc_va_list; ++#define __DEFINED___isoc_va_list ++#endif ++ ++ ++#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) ++typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; ++#define __DEFINED_mbstate_t ++#endif ++ ++ ++#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) ++typedef struct __locale_struct * locale_t; ++#define __DEFINED_locale_t ++#endif ++ ++ ++#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) ++typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; ++#define __DEFINED_sigset_t ++#endif ++ ++ ++#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) ++struct iovec { void *iov_base; size_t iov_len; }; ++#define __DEFINED_struct_iovec ++#endif ++ ++ ++#if defined(__NEED_struct_winsize) && !defined(__DEFINED_struct_winsize) ++struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; }; ++#define __DEFINED_struct_winsize ++#endif ++ ++ ++#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) ++typedef unsigned socklen_t; ++#define __DEFINED_socklen_t ++#endif ++ ++#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) ++typedef unsigned short sa_family_t; ++#define __DEFINED_sa_family_t ++#endif ++ ++ ++#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) ++typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t; ++#define __DEFINED_pthread_attr_t ++#endif ++ ++#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) ++typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t; ++#define __DEFINED_pthread_mutex_t ++#endif ++ ++#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) ++typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; ++#define __DEFINED_mtx_t ++#endif ++ ++#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) ++typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t; ++#define __DEFINED_pthread_cond_t ++#endif ++ ++#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) ++typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; ++#define __DEFINED_cnd_t ++#endif ++ ++#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) ++typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; ++#define __DEFINED_pthread_rwlock_t ++#endif ++ ++#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) ++typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; ++#define __DEFINED_pthread_barrier_t ++#endif ++ ++ ++#undef _Addr ++#undef _Int64 ++#undef _Reg +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/dirent.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/dirent.h +new file mode 100644 +index 0000000..c845fe8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/dirent.h +@@ -0,0 +1,11 @@ ++#define _DIRENT_HAVE_D_RECLEN ++#define _DIRENT_HAVE_D_OFF ++#define _DIRENT_HAVE_D_TYPE ++ ++struct dirent { ++ ino_t d_ino; ++ off_t d_off; ++ unsigned short d_reclen; ++ unsigned char d_type; ++ char d_name[256]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/errno.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/errno.h +new file mode 100644 +index 0000000..d2e1eee +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/errno.h +@@ -0,0 +1,134 @@ ++#define EPERM 1 ++#define ENOENT 2 ++#define ESRCH 3 ++#define EINTR 4 ++#define EIO 5 ++#define ENXIO 6 ++#define E2BIG 7 ++#define ENOEXEC 8 ++#define EBADF 9 ++#define ECHILD 10 ++#define EAGAIN 11 ++#define ENOMEM 12 ++#define EACCES 13 ++#define EFAULT 14 ++#define ENOTBLK 15 ++#define EBUSY 16 ++#define EEXIST 17 ++#define EXDEV 18 ++#define ENODEV 19 ++#define ENOTDIR 20 ++#define EISDIR 21 ++#define EINVAL 22 ++#define ENFILE 23 ++#define EMFILE 24 ++#define ENOTTY 25 ++#define ETXTBSY 26 ++#define EFBIG 27 ++#define ENOSPC 28 ++#define ESPIPE 29 ++#define EROFS 30 ++#define EMLINK 31 ++#define EPIPE 32 ++#define EDOM 33 ++#define ERANGE 34 ++#define EDEADLK 35 ++#define ENAMETOOLONG 36 ++#define ENOLCK 37 ++#define ENOSYS 38 ++#define ENOTEMPTY 39 ++#define ELOOP 40 ++#define EWOULDBLOCK EAGAIN ++#define ENOMSG 42 ++#define EIDRM 43 ++#define ECHRNG 44 ++#define EL2NSYNC 45 ++#define EL3HLT 46 ++#define EL3RST 47 ++#define ELNRNG 48 ++#define EUNATCH 49 ++#define ENOCSI 50 ++#define EL2HLT 51 ++#define EBADE 52 ++#define EBADR 53 ++#define EXFULL 54 ++#define ENOANO 55 ++#define EBADRQC 56 ++#define EBADSLT 57 ++#define EDEADLOCK EDEADLK ++#define EBFONT 59 ++#define ENOSTR 60 ++#define ENODATA 61 ++#define ETIME 62 ++#define ENOSR 63 ++#define ENONET 64 ++#define ENOPKG 65 ++#define EREMOTE 66 ++#define ENOLINK 67 ++#define EADV 68 ++#define ESRMNT 69 ++#define ECOMM 70 ++#define EPROTO 71 ++#define EMULTIHOP 72 ++#define EDOTDOT 73 ++#define EBADMSG 74 ++#define EOVERFLOW 75 ++#define ENOTUNIQ 76 ++#define EBADFD 77 ++#define EREMCHG 78 ++#define ELIBACC 79 ++#define ELIBBAD 80 ++#define ELIBSCN 81 ++#define ELIBMAX 82 ++#define ELIBEXEC 83 ++#define EILSEQ 84 ++#define ERESTART 85 ++#define ESTRPIPE 86 ++#define EUSERS 87 ++#define ENOTSOCK 88 ++#define EDESTADDRREQ 89 ++#define EMSGSIZE 90 ++#define EPROTOTYPE 91 ++#define ENOPROTOOPT 92 ++#define EPROTONOSUPPORT 93 ++#define ESOCKTNOSUPPORT 94 ++#define EOPNOTSUPP 95 ++#define ENOTSUP EOPNOTSUPP ++#define EPFNOSUPPORT 96 ++#define EAFNOSUPPORT 97 ++#define EADDRINUSE 98 ++#define EADDRNOTAVAIL 99 ++#define ENETDOWN 100 ++#define ENETUNREACH 101 ++#define ENETRESET 102 ++#define ECONNABORTED 103 ++#define ECONNRESET 104 ++#define ENOBUFS 105 ++#define EISCONN 106 ++#define ENOTCONN 107 ++#define ESHUTDOWN 108 ++#define ETOOMANYREFS 109 ++#define ETIMEDOUT 110 ++#define ECONNREFUSED 111 ++#define EHOSTDOWN 112 ++#define EHOSTUNREACH 113 ++#define EALREADY 114 ++#define EINPROGRESS 115 ++#define ESTALE 116 ++#define EUCLEAN 117 ++#define ENOTNAM 118 ++#define ENAVAIL 119 ++#define EISNAM 120 ++#define EREMOTEIO 121 ++#define EDQUOT 122 ++#define ENOMEDIUM 123 ++#define EMEDIUMTYPE 124 ++#define ECANCELED 125 ++#define ENOKEY 126 ++#define EKEYEXPIRED 127 ++#define EKEYREVOKED 128 ++#define EKEYREJECTED 129 ++#define EOWNERDEAD 130 ++#define ENOTRECOVERABLE 131 ++#define ERFKILL 132 ++#define EHWPOISON 133 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fcntl.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fcntl.h +new file mode 100644 +index 0000000..9278797 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fcntl.h +@@ -0,0 +1,38 @@ ++#define O_CREAT 0100 ++#define O_EXCL 0200 ++#define O_NOCTTY 0400 ++#define O_TRUNC 01000 ++#define O_APPEND 02000 ++#define O_NONBLOCK 04000 ++#define O_DSYNC 010000 ++#define O_SYNC 04010000 ++#define O_RSYNC 04010000 ++#define O_DIRECTORY 040000 ++#define O_NOFOLLOW 0100000 ++#define O_CLOEXEC 02000000 ++ ++#define O_ASYNC 020000 ++#define O_DIRECT 0200000 ++#define O_LARGEFILE 0400000 ++#define O_NOATIME 01000000 ++#define O_PATH 010000000 ++#define O_TMPFILE 020040000 ++#define O_NDELAY O_NONBLOCK ++ ++#define F_DUPFD 0 ++#define F_GETFD 1 ++#define F_SETFD 2 ++#define F_GETFL 3 ++#define F_SETFL 4 ++#define F_GETLK 5 ++#define F_SETLK 6 ++#define F_SETLKW 7 ++#define F_SETOWN 8 ++#define F_GETOWN 9 ++#define F_SETSIG 10 ++#define F_GETSIG 11 ++ ++#define F_SETOWN_EX 15 ++#define F_GETOWN_EX 16 ++ ++#define F_GETOWNER_UIDS 17 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fenv.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fenv.h +new file mode 100644 +index 0000000..2f3279a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/fenv.h +@@ -0,0 +1,19 @@ ++#define FE_INVALID 1 ++#define FE_DIVBYZERO 2 ++#define FE_OVERFLOW 4 ++#define FE_UNDERFLOW 8 ++#define FE_INEXACT 16 ++#define FE_ALL_EXCEPT 31 ++#define FE_TONEAREST 0 ++#define FE_DOWNWARD 0x800000 ++#define FE_UPWARD 0x400000 ++#define FE_TOWARDZERO 0xc00000 ++ ++typedef unsigned int fexcept_t; ++ ++typedef struct { ++ unsigned int __fpcr; ++ unsigned int __fpsr; ++} fenv_t; ++ ++#define FE_DFL_ENV ((const fenv_t *) -1) +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/float.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/float.h +new file mode 100644 +index 0000000..719c790 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/float.h +@@ -0,0 +1,16 @@ ++#define FLT_EVAL_METHOD 0 ++ ++#define LDBL_TRUE_MIN 6.47517511943802511092443895822764655e-4966L ++#define LDBL_MIN 3.36210314311209350626267781732175260e-4932L ++#define LDBL_MAX 1.18973149535723176508575932662800702e+4932L ++#define LDBL_EPSILON 1.92592994438723585305597794258492732e-34L ++ ++#define LDBL_MANT_DIG 113 ++#define LDBL_MIN_EXP (-16381) ++#define LDBL_MAX_EXP 16384 ++ ++#define LDBL_DIG 33 ++#define LDBL_MIN_10_EXP (-4931) ++#define LDBL_MAX_10_EXP 4932 ++ ++#define DECIMAL_DIG 36 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/hwcap.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/hwcap.h +new file mode 100644 +index 0000000..424cc4d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/hwcap.h +@@ -0,0 +1,52 @@ ++#define HWCAP_FP (1 << 0) ++#define HWCAP_ASIMD (1 << 1) ++#define HWCAP_EVTSTRM (1 << 2) ++#define HWCAP_AES (1 << 3) ++#define HWCAP_PMULL (1 << 4) ++#define HWCAP_SHA1 (1 << 5) ++#define HWCAP_SHA2 (1 << 6) ++#define HWCAP_CRC32 (1 << 7) ++#define HWCAP_ATOMICS (1 << 8) ++#define HWCAP_FPHP (1 << 9) ++#define HWCAP_ASIMDHP (1 << 10) ++#define HWCAP_CPUID (1 << 11) ++#define HWCAP_ASIMDRDM (1 << 12) ++#define HWCAP_JSCVT (1 << 13) ++#define HWCAP_FCMA (1 << 14) ++#define HWCAP_LRCPC (1 << 15) ++#define HWCAP_DCPOP (1 << 16) ++#define HWCAP_SHA3 (1 << 17) ++#define HWCAP_SM3 (1 << 18) ++#define HWCAP_SM4 (1 << 19) ++#define HWCAP_ASIMDDP (1 << 20) ++#define HWCAP_SHA512 (1 << 21) ++#define HWCAP_SVE (1 << 22) ++#define HWCAP_ASIMDFHM (1 << 23) ++#define HWCAP_DIT (1 << 24) ++#define HWCAP_USCAT (1 << 25) ++#define HWCAP_ILRCPC (1 << 26) ++#define HWCAP_FLAGM (1 << 27) ++#define HWCAP_SSBS (1 << 28) ++#define HWCAP_SB (1 << 29) ++#define HWCAP_PACA (1 << 30) ++#define HWCAP_PACG (1UL << 31) ++ ++#define HWCAP2_DCPODP (1 << 0) ++#define HWCAP2_SVE2 (1 << 1) ++#define HWCAP2_SVEAES (1 << 2) ++#define HWCAP2_SVEPMULL (1 << 3) ++#define HWCAP2_SVEBITPERM (1 << 4) ++#define HWCAP2_SVESHA3 (1 << 5) ++#define HWCAP2_SVESM4 (1 << 6) ++#define HWCAP2_FLAGM2 (1 << 7) ++#define HWCAP2_FRINT (1 << 8) ++#define HWCAP2_SVEI8MM (1 << 9) ++#define HWCAP2_SVEF32MM (1 << 10) ++#define HWCAP2_SVEF64MM (1 << 11) ++#define HWCAP2_SVEBF16 (1 << 12) ++#define HWCAP2_I8MM (1 << 13) ++#define HWCAP2_BF16 (1 << 14) ++#define HWCAP2_DGH (1 << 15) ++#define HWCAP2_RNG (1 << 16) ++#define HWCAP2_BTI (1 << 17) ++#define HWCAP2_MTE (1 << 18) +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/io.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/io.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ioctl.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ioctl.h +new file mode 100644 +index 0000000..60ae8b8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ioctl.h +@@ -0,0 +1,115 @@ ++#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) ) ++#define _IOC_NONE 0U ++#define _IOC_WRITE 1U ++#define _IOC_READ 2U ++ ++#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) ++#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) ++#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) ++#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) ++ ++#define TCGETS 0x5401 ++#define TCSETS 0x5402 ++#define TCSETSW 0x5403 ++#define TCSETSF 0x5404 ++#define TCGETA 0x5405 ++#define TCSETA 0x5406 ++#define TCSETAW 0x5407 ++#define TCSETAF 0x5408 ++#define TCSBRK 0x5409 ++#define TCXONC 0x540A ++#define TCFLSH 0x540B ++#define TIOCEXCL 0x540C ++#define TIOCNXCL 0x540D ++#define TIOCSCTTY 0x540E ++#define TIOCGPGRP 0x540F ++#define TIOCSPGRP 0x5410 ++#define TIOCOUTQ 0x5411 ++#define TIOCSTI 0x5412 ++#define TIOCGWINSZ 0x5413 ++#define TIOCSWINSZ 0x5414 ++#define TIOCMGET 0x5415 ++#define TIOCMBIS 0x5416 ++#define TIOCMBIC 0x5417 ++#define TIOCMSET 0x5418 ++#define TIOCGSOFTCAR 0x5419 ++#define TIOCSSOFTCAR 0x541A ++#define FIONREAD 0x541B ++#define TIOCINQ FIONREAD ++#define TIOCLINUX 0x541C ++#define TIOCCONS 0x541D ++#define TIOCGSERIAL 0x541E ++#define TIOCSSERIAL 0x541F ++#define TIOCPKT 0x5420 ++#define FIONBIO 0x5421 ++#define TIOCNOTTY 0x5422 ++#define TIOCSETD 0x5423 ++#define TIOCGETD 0x5424 ++#define TCSBRKP 0x5425 ++#define TIOCSBRK 0x5427 ++#define TIOCCBRK 0x5428 ++#define TIOCGSID 0x5429 ++#define TIOCGRS485 0x542E ++#define TIOCSRS485 0x542F ++#define TIOCGPTN 0x80045430 ++#define TIOCSPTLCK 0x40045431 ++#define TIOCGDEV 0x80045432 ++#define TCGETX 0x5432 ++#define TCSETX 0x5433 ++#define TCSETXF 0x5434 ++#define TCSETXW 0x5435 ++#define TIOCSIG 0x40045436 ++#define TIOCVHANGUP 0x5437 ++#define TIOCGPKT 0x80045438 ++#define TIOCGPTLCK 0x80045439 ++#define TIOCGEXCL 0x80045440 ++#define TIOCGPTPEER 0x5441 ++#define TIOCGISO7816 0x80285442 ++#define TIOCSISO7816 0xc0285443 ++ ++#define FIONCLEX 0x5450 ++#define FIOCLEX 0x5451 ++#define FIOASYNC 0x5452 ++#define TIOCSERCONFIG 0x5453 ++#define TIOCSERGWILD 0x5454 ++#define TIOCSERSWILD 0x5455 ++#define TIOCGLCKTRMIOS 0x5456 ++#define TIOCSLCKTRMIOS 0x5457 ++#define TIOCSERGSTRUCT 0x5458 ++#define TIOCSERGETLSR 0x5459 ++#define TIOCSERGETMULTI 0x545A ++#define TIOCSERSETMULTI 0x545B ++ ++#define TIOCMIWAIT 0x545C ++#define TIOCGICOUNT 0x545D ++#define FIOQSIZE 0x5460 ++ ++#define TIOCM_LE 0x001 ++#define TIOCM_DTR 0x002 ++#define TIOCM_RTS 0x004 ++#define TIOCM_ST 0x008 ++#define TIOCM_SR 0x010 ++#define TIOCM_CTS 0x020 ++#define TIOCM_CAR 0x040 ++#define TIOCM_RNG 0x080 ++#define TIOCM_DSR 0x100 ++#define TIOCM_CD TIOCM_CAR ++#define TIOCM_RI TIOCM_RNG ++#define TIOCM_OUT1 0x2000 ++#define TIOCM_OUT2 0x4000 ++#define TIOCM_LOOP 0x8000 ++ ++#define FIOSETOWN 0x8901 ++#define SIOCSPGRP 0x8902 ++#define FIOGETOWN 0x8903 ++#define SIOCGPGRP 0x8904 ++#define SIOCATMARK 0x8905 ++#if __LONG_MAX == 0x7fffffff ++#define SIOCGSTAMP _IOR(0x89, 6, char[16]) ++#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) ++#else ++#define SIOCGSTAMP 0x8906 ++#define SIOCGSTAMPNS 0x8907 ++#endif ++ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ioctl_fix.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ioctl_fix.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipc.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipc.h +new file mode 100644 +index 0000000..40d6f3a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipc.h +@@ -0,0 +1,11 @@ ++struct ipc_perm { ++ key_t __ipc_perm_key; ++ uid_t uid; ++ gid_t gid; ++ uid_t cuid; ++ gid_t cgid; ++ mode_t mode; ++ int __ipc_perm_seq; ++ long __pad1; ++ long __pad2; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipcstat.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipcstat.h +new file mode 100644 +index 0000000..0018ad1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ipcstat.h +@@ -0,0 +1 @@ ++#define IPC_STAT 2 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/kd.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/kd.h +new file mode 100644 +index 0000000..33b873f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/kd.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/limits.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/limits.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/link.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/link.h +new file mode 100644 +index 0000000..4a94d8f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/link.h +@@ -0,0 +1 @@ ++typedef uint32_t Elf_Symndx; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/mman.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/mman.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/msg.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/msg.h +new file mode 100644 +index 0000000..2e23ca2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/msg.h +@@ -0,0 +1,12 @@ ++struct msqid_ds { ++ struct ipc_perm msg_perm; ++ time_t msg_stime; ++ time_t msg_rtime; ++ time_t msg_ctime; ++ unsigned long msg_cbytes; ++ msgqnum_t msg_qnum; ++ msglen_t msg_qbytes; ++ pid_t msg_lspid; ++ pid_t msg_lrpid; ++ unsigned long __unused[2]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/poll.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/poll.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/posix.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/posix.h +new file mode 100644 +index 0000000..c37b94c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/posix.h +@@ -0,0 +1,2 @@ ++#define _POSIX_V6_LP64_OFF64 1 ++#define _POSIX_V7_LP64_OFF64 1 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ptrace.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/ptrace.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/reg.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/reg.h +new file mode 100644 +index 0000000..2633f39 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/reg.h +@@ -0,0 +1,2 @@ ++#undef __WORDSIZE ++#define __WORDSIZE 64 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/resource.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/resource.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/sem.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/sem.h +new file mode 100644 +index 0000000..5184eb5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/sem.h +@@ -0,0 +1,14 @@ ++struct semid_ds { ++ struct ipc_perm sem_perm; ++ time_t sem_otime; ++ time_t sem_ctime; ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ unsigned short sem_nsems; ++ char __sem_nsems_pad[sizeof(long)-sizeof(short)]; ++#else ++ char __sem_nsems_pad[sizeof(long)-sizeof(short)]; ++ unsigned short sem_nsems; ++#endif ++ long __unused3; ++ long __unused4; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/setjmp.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/setjmp.h +new file mode 100644 +index 0000000..54bc261 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/setjmp.h +@@ -0,0 +1 @@ ++typedef unsigned long __jmp_buf[22]; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/shm.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/shm.h +new file mode 100644 +index 0000000..da07a2a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/shm.h +@@ -0,0 +1,24 @@ ++#define SHMLBA (4*4096) ++ ++struct shmid_ds { ++ struct ipc_perm shm_perm; ++ size_t shm_segsz; ++ time_t shm_atime; ++ time_t shm_dtime; ++ time_t shm_ctime; ++ pid_t shm_cpid; ++ pid_t shm_lpid; ++ unsigned long shm_nattch; ++ unsigned long __pad1; ++ unsigned long __pad2; ++}; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/signal.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/signal.h +new file mode 100644 +index 0000000..5098c73 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/signal.h +@@ -0,0 +1,153 @@ ++#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ ++ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++ ++#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define MINSIGSTKSZ 6144 ++#define SIGSTKSZ 12288 ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++typedef unsigned long greg_t; ++typedef unsigned long gregset_t[34]; ++ ++typedef struct { ++ __uint128_t vregs[32]; ++ unsigned int fpsr; ++ unsigned int fpcr; ++} fpregset_t; ++typedef struct sigcontext { ++ unsigned long fault_address; ++ unsigned long regs[31]; ++ unsigned long sp, pc, pstate; ++ long double __reserved[256]; ++} mcontext_t; ++ ++#define FPSIMD_MAGIC 0x46508001 ++#define ESR_MAGIC 0x45535201 ++#define EXTRA_MAGIC 0x45585401 ++#define SVE_MAGIC 0x53564501 ++struct _aarch64_ctx { ++ unsigned int magic; ++ unsigned int size; ++}; ++struct fpsimd_context { ++ struct _aarch64_ctx head; ++ unsigned int fpsr; ++ unsigned int fpcr; ++ __uint128_t vregs[32]; ++}; ++struct esr_context { ++ struct _aarch64_ctx head; ++ unsigned long esr; ++}; ++struct extra_context { ++ struct _aarch64_ctx head; ++ unsigned long datap; ++ unsigned int size; ++ unsigned int __reserved[3]; ++}; ++struct sve_context { ++ struct _aarch64_ctx head; ++ unsigned short vl; ++ unsigned short __reserved[3]; ++}; ++#define SVE_VQ_BYTES 16 ++#define SVE_VQ_MIN 1 ++#define SVE_VQ_MAX 512 ++#define SVE_VL_MIN (SVE_VQ_MIN * SVE_VQ_BYTES) ++#define SVE_VL_MAX (SVE_VQ_MAX * SVE_VQ_BYTES) ++#define SVE_NUM_ZREGS 32 ++#define SVE_NUM_PREGS 16 ++#define sve_vl_valid(vl) \ ++ ((vl) % SVE_VQ_BYTES == 0 && (vl) >= SVE_VL_MIN && (vl) <= SVE_VL_MAX) ++#define sve_vq_from_vl(vl) ((vl) / SVE_VQ_BYTES) ++#define sve_vl_from_vq(vq) ((vq) * SVE_VQ_BYTES) ++#define SVE_SIG_ZREG_SIZE(vq) ((unsigned)(vq) * SVE_VQ_BYTES) ++#define SVE_SIG_PREG_SIZE(vq) ((unsigned)(vq) * (SVE_VQ_BYTES / 8)) ++#define SVE_SIG_FFR_SIZE(vq) SVE_SIG_PREG_SIZE(vq) ++#define SVE_SIG_REGS_OFFSET \ ++ ((sizeof(struct sve_context) + (SVE_VQ_BYTES - 1)) \ ++ / SVE_VQ_BYTES * SVE_VQ_BYTES) ++#define SVE_SIG_ZREGS_OFFSET SVE_SIG_REGS_OFFSET ++#define SVE_SIG_ZREG_OFFSET(vq, n) \ ++ (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREG_SIZE(vq) * (n)) ++#define SVE_SIG_ZREGS_SIZE(vq) \ ++ (SVE_SIG_ZREG_OFFSET(vq, SVE_NUM_ZREGS) - SVE_SIG_ZREGS_OFFSET) ++#define SVE_SIG_PREGS_OFFSET(vq) \ ++ (SVE_SIG_ZREGS_OFFSET + SVE_SIG_ZREGS_SIZE(vq)) ++#define SVE_SIG_PREG_OFFSET(vq, n) \ ++ (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREG_SIZE(vq) * (n)) ++#define SVE_SIG_PREGS_SIZE(vq) \ ++ (SVE_SIG_PREG_OFFSET(vq, SVE_NUM_PREGS) - SVE_SIG_PREGS_OFFSET(vq)) ++#define SVE_SIG_FFR_OFFSET(vq) \ ++ (SVE_SIG_PREGS_OFFSET(vq) + SVE_SIG_PREGS_SIZE(vq)) ++#define SVE_SIG_REGS_SIZE(vq) \ ++ (SVE_SIG_FFR_OFFSET(vq) + SVE_SIG_FFR_SIZE(vq) - SVE_SIG_REGS_OFFSET) ++#define SVE_SIG_CONTEXT_SIZE(vq) (SVE_SIG_REGS_OFFSET + SVE_SIG_REGS_SIZE(vq)) ++#else ++typedef struct { ++ long double __regs[18+256]; ++} mcontext_t; ++#endif ++ ++struct sigaltstack { ++ void *ss_sp; ++ int ss_flags; ++ size_t ss_size; ++}; ++ ++typedef struct __ucontext { ++ unsigned long uc_flags; ++ struct __ucontext *uc_link; ++ stack_t uc_stack; ++ sigset_t uc_sigmask; ++ mcontext_t uc_mcontext; ++} ucontext_t; ++ ++#define SA_NOCLDSTOP 1 ++#define SA_NOCLDWAIT 2 ++#define SA_SIGINFO 4 ++#define SA_ONSTACK 0x08000000 ++#define SA_RESTART 0x10000000 ++#define SA_NODEFER 0x40000000 ++#define SA_RESETHAND 0x80000000 ++#define SA_RESTORER 0x04000000 ++ ++#endif ++ ++#define SIGHUP 1 ++#define SIGINT 2 ++#define SIGQUIT 3 ++#define SIGILL 4 ++#define SIGTRAP 5 ++#define SIGABRT 6 ++#define SIGIOT SIGABRT ++#define SIGBUS 7 ++#define SIGFPE 8 ++#define SIGKILL 9 ++#define SIGUSR1 10 ++#define SIGSEGV 11 ++#define SIGUSR2 12 ++#define SIGPIPE 13 ++#define SIGALRM 14 ++#define SIGTERM 15 ++#define SIGSTKFLT 16 ++#define SIGCHLD 17 ++#define SIGCONT 18 ++#define SIGSTOP 19 ++#define SIGTSTP 20 ++#define SIGTTIN 21 ++#define SIGTTOU 22 ++#define SIGURG 23 ++#define SIGXCPU 24 ++#define SIGXFSZ 25 ++#define SIGVTALRM 26 ++#define SIGPROF 27 ++#define SIGWINCH 28 ++#define SIGIO 29 ++#define SIGPOLL 29 ++#define SIGPWR 30 ++#define SIGSYS 31 ++#define SIGUNUSED SIGSYS ++ ++#define _NSIG 65 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/socket.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/socket.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/soundcard.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/soundcard.h +new file mode 100644 +index 0000000..fade986 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/soundcard.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stat.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stat.h +new file mode 100644 +index 0000000..b7f4221 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stat.h +@@ -0,0 +1,18 @@ ++struct stat { ++ dev_t st_dev; ++ ino_t st_ino; ++ mode_t st_mode; ++ nlink_t st_nlink; ++ uid_t st_uid; ++ gid_t st_gid; ++ dev_t st_rdev; ++ unsigned long __pad; ++ off_t st_size; ++ blksize_t st_blksize; ++ int __pad2; ++ blkcnt_t st_blocks; ++ struct timespec st_atim; ++ struct timespec st_mtim; ++ struct timespec st_ctim; ++ unsigned __unused[2]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/statfs.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/statfs.h +new file mode 100644 +index 0000000..f103f4e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/statfs.h +@@ -0,0 +1,7 @@ ++struct statfs { ++ unsigned long f_type, f_bsize; ++ fsblkcnt_t f_blocks, f_bfree, f_bavail; ++ fsfilcnt_t f_files, f_ffree; ++ fsid_t f_fsid; ++ unsigned long f_namelen, f_frsize, f_flags, f_spare[4]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stdint.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stdint.h +new file mode 100644 +index 0000000..1bb147f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/stdint.h +@@ -0,0 +1,20 @@ ++typedef int32_t int_fast16_t; ++typedef int32_t int_fast32_t; ++typedef uint32_t uint_fast16_t; ++typedef uint32_t uint_fast32_t; ++ ++#define INT_FAST16_MIN INT32_MIN ++#define INT_FAST32_MIN INT32_MIN ++ ++#define INT_FAST16_MAX INT32_MAX ++#define INT_FAST32_MAX INT32_MAX ++ ++#define UINT_FAST16_MAX UINT32_MAX ++#define UINT_FAST32_MAX UINT32_MAX ++ ++#define INTPTR_MIN INT64_MIN ++#define INTPTR_MAX INT64_MAX ++#define UINTPTR_MAX UINT64_MAX ++#define PTRDIFF_MIN INT64_MIN ++#define PTRDIFF_MAX INT64_MAX ++#define SIZE_MAX UINT64_MAX +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/syscall.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/syscall.h +new file mode 100644 +index 0000000..24b5438 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/syscall.h +@@ -0,0 +1,603 @@ ++#define __NR_io_setup 0 ++#define __NR_io_destroy 1 ++#define __NR_io_submit 2 ++#define __NR_io_cancel 3 ++#define __NR_io_getevents 4 ++#define __NR_setxattr 5 ++#define __NR_lsetxattr 6 ++#define __NR_fsetxattr 7 ++#define __NR_getxattr 8 ++#define __NR_lgetxattr 9 ++#define __NR_fgetxattr 10 ++#define __NR_listxattr 11 ++#define __NR_llistxattr 12 ++#define __NR_flistxattr 13 ++#define __NR_removexattr 14 ++#define __NR_lremovexattr 15 ++#define __NR_fremovexattr 16 ++#define __NR_getcwd 17 ++#define __NR_lookup_dcookie 18 ++#define __NR_eventfd2 19 ++#define __NR_epoll_create1 20 ++#define __NR_epoll_ctl 21 ++#define __NR_epoll_pwait 22 ++#define __NR_dup 23 ++#define __NR_dup3 24 ++#define __NR_fcntl 25 ++#define __NR_inotify_init1 26 ++#define __NR_inotify_add_watch 27 ++#define __NR_inotify_rm_watch 28 ++#define __NR_ioctl 29 ++#define __NR_ioprio_set 30 ++#define __NR_ioprio_get 31 ++#define __NR_flock 32 ++#define __NR_mknodat 33 ++#define __NR_mkdirat 34 ++#define __NR_unlinkat 35 ++#define __NR_symlinkat 36 ++#define __NR_linkat 37 ++#define __NR_renameat 38 ++#define __NR_umount2 39 ++#define __NR_mount 40 ++#define __NR_pivot_root 41 ++#define __NR_nfsservctl 42 ++#define __NR_statfs 43 ++#define __NR_fstatfs 44 ++#define __NR_truncate 45 ++#define __NR_ftruncate 46 ++#define __NR_fallocate 47 ++#define __NR_faccessat 48 ++#define __NR_chdir 49 ++#define __NR_fchdir 50 ++#define __NR_chroot 51 ++#define __NR_fchmod 52 ++#define __NR_fchmodat 53 ++#define __NR_fchownat 54 ++#define __NR_fchown 55 ++#define __NR_openat 56 ++#define __NR_close 57 ++#define __NR_vhangup 58 ++#define __NR_pipe2 59 ++#define __NR_quotactl 60 ++#define __NR_getdents64 61 ++#define __NR_lseek 62 ++#define __NR_read 63 ++#define __NR_write 64 ++#define __NR_readv 65 ++#define __NR_writev 66 ++#define __NR_pread64 67 ++#define __NR_pwrite64 68 ++#define __NR_preadv 69 ++#define __NR_pwritev 70 ++#define __NR_sendfile 71 ++#define __NR_pselect6 72 ++#define __NR_ppoll 73 ++#define __NR_signalfd4 74 ++#define __NR_vmsplice 75 ++#define __NR_splice 76 ++#define __NR_tee 77 ++#define __NR_readlinkat 78 ++#define __NR_newfstatat 79 ++#define __NR_fstat 80 ++#define __NR_sync 81 ++#define __NR_fsync 82 ++#define __NR_fdatasync 83 ++#define __NR_sync_file_range 84 ++#define __NR_timerfd_create 85 ++#define __NR_timerfd_settime 86 ++#define __NR_timerfd_gettime 87 ++#define __NR_utimensat 88 ++#define __NR_acct 89 ++#define __NR_capget 90 ++#define __NR_capset 91 ++#define __NR_personality 92 ++#define __NR_exit 93 ++#define __NR_exit_group 94 ++#define __NR_waitid 95 ++#define __NR_set_tid_address 96 ++#define __NR_unshare 97 ++#define __NR_futex 98 ++#define __NR_set_robust_list 99 ++#define __NR_get_robust_list 100 ++#define __NR_nanosleep 101 ++#define __NR_getitimer 102 ++#define __NR_setitimer 103 ++#define __NR_kexec_load 104 ++#define __NR_init_module 105 ++#define __NR_delete_module 106 ++#define __NR_timer_create 107 ++#define __NR_timer_gettime 108 ++#define __NR_timer_getoverrun 109 ++#define __NR_timer_settime 110 ++#define __NR_timer_delete 111 ++#define __NR_clock_settime 112 ++#define __NR_clock_gettime 113 ++#define __NR_clock_getres 114 ++#define __NR_clock_nanosleep 115 ++#define __NR_syslog 116 ++#define __NR_ptrace 117 ++#define __NR_sched_setparam 118 ++#define __NR_sched_setscheduler 119 ++#define __NR_sched_getscheduler 120 ++#define __NR_sched_getparam 121 ++#define __NR_sched_setaffinity 122 ++#define __NR_sched_getaffinity 123 ++#define __NR_sched_yield 124 ++#define __NR_sched_get_priority_max 125 ++#define __NR_sched_get_priority_min 126 ++#define __NR_sched_rr_get_interval 127 ++#define __NR_restart_syscall 128 ++#define __NR_kill 129 ++#define __NR_tkill 130 ++#define __NR_tgkill 131 ++#define __NR_sigaltstack 132 ++#define __NR_rt_sigsuspend 133 ++#define __NR_rt_sigaction 134 ++#define __NR_rt_sigprocmask 135 ++#define __NR_rt_sigpending 136 ++#define __NR_rt_sigtimedwait 137 ++#define __NR_rt_sigqueueinfo 138 ++#define __NR_rt_sigreturn 139 ++#define __NR_setpriority 140 ++#define __NR_getpriority 141 ++#define __NR_reboot 142 ++#define __NR_setregid 143 ++#define __NR_setgid 144 ++#define __NR_setreuid 145 ++#define __NR_setuid 146 ++#define __NR_setresuid 147 ++#define __NR_getresuid 148 ++#define __NR_setresgid 149 ++#define __NR_getresgid 150 ++#define __NR_setfsuid 151 ++#define __NR_setfsgid 152 ++#define __NR_times 153 ++#define __NR_setpgid 154 ++#define __NR_getpgid 155 ++#define __NR_getsid 156 ++#define __NR_setsid 157 ++#define __NR_getgroups 158 ++#define __NR_setgroups 159 ++#define __NR_uname 160 ++#define __NR_sethostname 161 ++#define __NR_setdomainname 162 ++#define __NR_getrlimit 163 ++#define __NR_setrlimit 164 ++#define __NR_getrusage 165 ++#define __NR_umask 166 ++#define __NR_prctl 167 ++#define __NR_getcpu 168 ++#define __NR_gettimeofday 169 ++#define __NR_settimeofday 170 ++#define __NR_adjtimex 171 ++#define __NR_getpid 172 ++#define __NR_getppid 173 ++#define __NR_getuid 174 ++#define __NR_geteuid 175 ++#define __NR_getgid 176 ++#define __NR_getegid 177 ++#define __NR_gettid 178 ++#define __NR_sysinfo 179 ++#define __NR_mq_open 180 ++#define __NR_mq_unlink 181 ++#define __NR_mq_timedsend 182 ++#define __NR_mq_timedreceive 183 ++#define __NR_mq_notify 184 ++#define __NR_mq_getsetattr 185 ++#define __NR_msgget 186 ++#define __NR_msgctl 187 ++#define __NR_msgrcv 188 ++#define __NR_msgsnd 189 ++#define __NR_semget 190 ++#define __NR_semctl 191 ++#define __NR_semtimedop 192 ++#define __NR_semop 193 ++#define __NR_shmget 194 ++#define __NR_shmctl 195 ++#define __NR_shmat 196 ++#define __NR_shmdt 197 ++#define __NR_socket 198 ++#define __NR_socketpair 199 ++#define __NR_bind 200 ++#define __NR_listen 201 ++#define __NR_accept 202 ++#define __NR_connect 203 ++#define __NR_getsockname 204 ++#define __NR_getpeername 205 ++#define __NR_sendto 206 ++#define __NR_recvfrom 207 ++#define __NR_setsockopt 208 ++#define __NR_getsockopt 209 ++#define __NR_shutdown 210 ++#define __NR_sendmsg 211 ++#define __NR_recvmsg 212 ++#define __NR_readahead 213 ++#define __NR_brk 214 ++#define __NR_munmap 215 ++#define __NR_mremap 216 ++#define __NR_add_key 217 ++#define __NR_request_key 218 ++#define __NR_keyctl 219 ++#define __NR_clone 220 ++#define __NR_execve 221 ++#define __NR_mmap 222 ++#define __NR_fadvise64 223 ++#define __NR_swapon 224 ++#define __NR_swapoff 225 ++#define __NR_mprotect 226 ++#define __NR_msync 227 ++#define __NR_mlock 228 ++#define __NR_munlock 229 ++#define __NR_mlockall 230 ++#define __NR_munlockall 231 ++#define __NR_mincore 232 ++#define __NR_madvise 233 ++#define __NR_remap_file_pages 234 ++#define __NR_mbind 235 ++#define __NR_get_mempolicy 236 ++#define __NR_set_mempolicy 237 ++#define __NR_migrate_pages 238 ++#define __NR_move_pages 239 ++#define __NR_rt_tgsigqueueinfo 240 ++#define __NR_perf_event_open 241 ++#define __NR_accept4 242 ++#define __NR_recvmmsg 243 ++#define __NR_wait4 260 ++#define __NR_prlimit64 261 ++#define __NR_fanotify_init 262 ++#define __NR_fanotify_mark 263 ++#define __NR_name_to_handle_at 264 ++#define __NR_open_by_handle_at 265 ++#define __NR_clock_adjtime 266 ++#define __NR_syncfs 267 ++#define __NR_setns 268 ++#define __NR_sendmmsg 269 ++#define __NR_process_vm_readv 270 ++#define __NR_process_vm_writev 271 ++#define __NR_kcmp 272 ++#define __NR_finit_module 273 ++#define __NR_sched_setattr 274 ++#define __NR_sched_getattr 275 ++#define __NR_renameat2 276 ++#define __NR_seccomp 277 ++#define __NR_getrandom 278 ++#define __NR_memfd_create 279 ++#define __NR_bpf 280 ++#define __NR_execveat 281 ++#define __NR_userfaultfd 282 ++#define __NR_membarrier 283 ++#define __NR_mlock2 284 ++#define __NR_copy_file_range 285 ++#define __NR_preadv2 286 ++#define __NR_pwritev2 287 ++#define __NR_pkey_mprotect 288 ++#define __NR_pkey_alloc 289 ++#define __NR_pkey_free 290 ++#define __NR_statx 291 ++#define __NR_io_pgetevents 292 ++#define __NR_rseq 293 ++#define __NR_kexec_file_load 294 ++#define __NR_pidfd_send_signal 424 ++#define __NR_io_uring_setup 425 ++#define __NR_io_uring_enter 426 ++#define __NR_io_uring_register 427 ++#define __NR_open_tree 428 ++#define __NR_move_mount 429 ++#define __NR_fsopen 430 ++#define __NR_fsconfig 431 ++#define __NR_fsmount 432 ++#define __NR_fspick 433 ++#define __NR_pidfd_open 434 ++#define __NR_clone3 435 ++#define __NR_close_range 436 ++#define __NR_openat2 437 ++#define __NR_pidfd_getfd 438 ++#define __NR_faccessat2 439 ++#define __NR_process_madvise 440 ++#define __NR_epoll_pwait2 441 ++#define __NR_mount_setattr 442 ++#define __NR_landlock_create_ruleset 444 ++#define __NR_landlock_add_rule 445 ++#define __NR_landlock_restrict_self 446 ++ ++#define SYS_io_setup 0 ++#define SYS_io_destroy 1 ++#define SYS_io_submit 2 ++#define SYS_io_cancel 3 ++#define SYS_io_getevents 4 ++#define SYS_setxattr 5 ++#define SYS_lsetxattr 6 ++#define SYS_fsetxattr 7 ++#define SYS_getxattr 8 ++#define SYS_lgetxattr 9 ++#define SYS_fgetxattr 10 ++#define SYS_listxattr 11 ++#define SYS_llistxattr 12 ++#define SYS_flistxattr 13 ++#define SYS_removexattr 14 ++#define SYS_lremovexattr 15 ++#define SYS_fremovexattr 16 ++#define SYS_getcwd 17 ++#define SYS_lookup_dcookie 18 ++#define SYS_eventfd2 19 ++#define SYS_epoll_create1 20 ++#define SYS_epoll_ctl 21 ++#define SYS_epoll_pwait 22 ++#define SYS_dup 23 ++#define SYS_dup3 24 ++#define SYS_fcntl 25 ++#define SYS_inotify_init1 26 ++#define SYS_inotify_add_watch 27 ++#define SYS_inotify_rm_watch 28 ++#define SYS_ioctl 29 ++#define SYS_ioprio_set 30 ++#define SYS_ioprio_get 31 ++#define SYS_flock 32 ++#define SYS_mknodat 33 ++#define SYS_mkdirat 34 ++#define SYS_unlinkat 35 ++#define SYS_symlinkat 36 ++#define SYS_linkat 37 ++#define SYS_renameat 38 ++#define SYS_umount2 39 ++#define SYS_mount 40 ++#define SYS_pivot_root 41 ++#define SYS_nfsservctl 42 ++#define SYS_statfs 43 ++#define SYS_fstatfs 44 ++#define SYS_truncate 45 ++#define SYS_ftruncate 46 ++#define SYS_fallocate 47 ++#define SYS_faccessat 48 ++#define SYS_chdir 49 ++#define SYS_fchdir 50 ++#define SYS_chroot 51 ++#define SYS_fchmod 52 ++#define SYS_fchmodat 53 ++#define SYS_fchownat 54 ++#define SYS_fchown 55 ++#define SYS_openat 56 ++#define SYS_close 57 ++#define SYS_vhangup 58 ++#define SYS_pipe2 59 ++#define SYS_quotactl 60 ++#define SYS_getdents64 61 ++#define SYS_lseek 62 ++#define SYS_read 63 ++#define SYS_write 64 ++#define SYS_readv 65 ++#define SYS_writev 66 ++#define SYS_pread64 67 ++#define SYS_pwrite64 68 ++#define SYS_preadv 69 ++#define SYS_pwritev 70 ++#define SYS_sendfile 71 ++#define SYS_pselect6 72 ++#define SYS_ppoll 73 ++#define SYS_signalfd4 74 ++#define SYS_vmsplice 75 ++#define SYS_splice 76 ++#define SYS_tee 77 ++#define SYS_readlinkat 78 ++#define SYS_newfstatat 79 ++#define SYS_fstat 80 ++#define SYS_sync 81 ++#define SYS_fsync 82 ++#define SYS_fdatasync 83 ++#define SYS_sync_file_range 84 ++#define SYS_timerfd_create 85 ++#define SYS_timerfd_settime 86 ++#define SYS_timerfd_gettime 87 ++#define SYS_utimensat 88 ++#define SYS_acct 89 ++#define SYS_capget 90 ++#define SYS_capset 91 ++#define SYS_personality 92 ++#define SYS_exit 93 ++#define SYS_exit_group 94 ++#define SYS_waitid 95 ++#define SYS_set_tid_address 96 ++#define SYS_unshare 97 ++#define SYS_futex 98 ++#define SYS_set_robust_list 99 ++#define SYS_get_robust_list 100 ++#define SYS_nanosleep 101 ++#define SYS_getitimer 102 ++#define SYS_setitimer 103 ++#define SYS_kexec_load 104 ++#define SYS_init_module 105 ++#define SYS_delete_module 106 ++#define SYS_timer_create 107 ++#define SYS_timer_gettime 108 ++#define SYS_timer_getoverrun 109 ++#define SYS_timer_settime 110 ++#define SYS_timer_delete 111 ++#define SYS_clock_settime 112 ++#define SYS_clock_gettime 113 ++#define SYS_clock_getres 114 ++#define SYS_clock_nanosleep 115 ++#define SYS_syslog 116 ++#define SYS_ptrace 117 ++#define SYS_sched_setparam 118 ++#define SYS_sched_setscheduler 119 ++#define SYS_sched_getscheduler 120 ++#define SYS_sched_getparam 121 ++#define SYS_sched_setaffinity 122 ++#define SYS_sched_getaffinity 123 ++#define SYS_sched_yield 124 ++#define SYS_sched_get_priority_max 125 ++#define SYS_sched_get_priority_min 126 ++#define SYS_sched_rr_get_interval 127 ++#define SYS_restart_syscall 128 ++#define SYS_kill 129 ++#define SYS_tkill 130 ++#define SYS_tgkill 131 ++#define SYS_sigaltstack 132 ++#define SYS_rt_sigsuspend 133 ++#define SYS_rt_sigaction 134 ++#define SYS_rt_sigprocmask 135 ++#define SYS_rt_sigpending 136 ++#define SYS_rt_sigtimedwait 137 ++#define SYS_rt_sigqueueinfo 138 ++#define SYS_rt_sigreturn 139 ++#define SYS_setpriority 140 ++#define SYS_getpriority 141 ++#define SYS_reboot 142 ++#define SYS_setregid 143 ++#define SYS_setgid 144 ++#define SYS_setreuid 145 ++#define SYS_setuid 146 ++#define SYS_setresuid 147 ++#define SYS_getresuid 148 ++#define SYS_setresgid 149 ++#define SYS_getresgid 150 ++#define SYS_setfsuid 151 ++#define SYS_setfsgid 152 ++#define SYS_times 153 ++#define SYS_setpgid 154 ++#define SYS_getpgid 155 ++#define SYS_getsid 156 ++#define SYS_setsid 157 ++#define SYS_getgroups 158 ++#define SYS_setgroups 159 ++#define SYS_uname 160 ++#define SYS_sethostname 161 ++#define SYS_setdomainname 162 ++#define SYS_getrlimit 163 ++#define SYS_setrlimit 164 ++#define SYS_getrusage 165 ++#define SYS_umask 166 ++#define SYS_prctl 167 ++#define SYS_getcpu 168 ++#define SYS_gettimeofday 169 ++#define SYS_settimeofday 170 ++#define SYS_adjtimex 171 ++#define SYS_getpid 172 ++#define SYS_getppid 173 ++#define SYS_getuid 174 ++#define SYS_geteuid 175 ++#define SYS_getgid 176 ++#define SYS_getegid 177 ++#define SYS_gettid 178 ++#define SYS_sysinfo 179 ++#define SYS_mq_open 180 ++#define SYS_mq_unlink 181 ++#define SYS_mq_timedsend 182 ++#define SYS_mq_timedreceive 183 ++#define SYS_mq_notify 184 ++#define SYS_mq_getsetattr 185 ++#define SYS_msgget 186 ++#define SYS_msgctl 187 ++#define SYS_msgrcv 188 ++#define SYS_msgsnd 189 ++#define SYS_semget 190 ++#define SYS_semctl 191 ++#define SYS_semtimedop 192 ++#define SYS_semop 193 ++#define SYS_shmget 194 ++#define SYS_shmctl 195 ++#define SYS_shmat 196 ++#define SYS_shmdt 197 ++#define SYS_socket 198 ++#define SYS_socketpair 199 ++#define SYS_bind 200 ++#define SYS_listen 201 ++#define SYS_accept 202 ++#define SYS_connect 203 ++#define SYS_getsockname 204 ++#define SYS_getpeername 205 ++#define SYS_sendto 206 ++#define SYS_recvfrom 207 ++#define SYS_setsockopt 208 ++#define SYS_getsockopt 209 ++#define SYS_shutdown 210 ++#define SYS_sendmsg 211 ++#define SYS_recvmsg 212 ++#define SYS_readahead 213 ++#define SYS_brk 214 ++#define SYS_munmap 215 ++#define SYS_mremap 216 ++#define SYS_add_key 217 ++#define SYS_request_key 218 ++#define SYS_keyctl 219 ++#define SYS_clone 220 ++#define SYS_execve 221 ++#define SYS_mmap 222 ++#define SYS_fadvise64 223 ++#define SYS_swapon 224 ++#define SYS_swapoff 225 ++#define SYS_mprotect 226 ++#define SYS_msync 227 ++#define SYS_mlock 228 ++#define SYS_munlock 229 ++#define SYS_mlockall 230 ++#define SYS_munlockall 231 ++#define SYS_mincore 232 ++#define SYS_madvise 233 ++#define SYS_remap_file_pages 234 ++#define SYS_mbind 235 ++#define SYS_get_mempolicy 236 ++#define SYS_set_mempolicy 237 ++#define SYS_migrate_pages 238 ++#define SYS_move_pages 239 ++#define SYS_rt_tgsigqueueinfo 240 ++#define SYS_perf_event_open 241 ++#define SYS_accept4 242 ++#define SYS_recvmmsg 243 ++#define SYS_wait4 260 ++#define SYS_prlimit64 261 ++#define SYS_fanotify_init 262 ++#define SYS_fanotify_mark 263 ++#define SYS_name_to_handle_at 264 ++#define SYS_open_by_handle_at 265 ++#define SYS_clock_adjtime 266 ++#define SYS_syncfs 267 ++#define SYS_setns 268 ++#define SYS_sendmmsg 269 ++#define SYS_process_vm_readv 270 ++#define SYS_process_vm_writev 271 ++#define SYS_kcmp 272 ++#define SYS_finit_module 273 ++#define SYS_sched_setattr 274 ++#define SYS_sched_getattr 275 ++#define SYS_renameat2 276 ++#define SYS_seccomp 277 ++#define SYS_getrandom 278 ++#define SYS_memfd_create 279 ++#define SYS_bpf 280 ++#define SYS_execveat 281 ++#define SYS_userfaultfd 282 ++#define SYS_membarrier 283 ++#define SYS_mlock2 284 ++#define SYS_copy_file_range 285 ++#define SYS_preadv2 286 ++#define SYS_pwritev2 287 ++#define SYS_pkey_mprotect 288 ++#define SYS_pkey_alloc 289 ++#define SYS_pkey_free 290 ++#define SYS_statx 291 ++#define SYS_io_pgetevents 292 ++#define SYS_rseq 293 ++#define SYS_kexec_file_load 294 ++#define SYS_pidfd_send_signal 424 ++#define SYS_io_uring_setup 425 ++#define SYS_io_uring_enter 426 ++#define SYS_io_uring_register 427 ++#define SYS_open_tree 428 ++#define SYS_move_mount 429 ++#define SYS_fsopen 430 ++#define SYS_fsconfig 431 ++#define SYS_fsmount 432 ++#define SYS_fspick 433 ++#define SYS_pidfd_open 434 ++#define SYS_clone3 435 ++#define SYS_close_range 436 ++#define SYS_openat2 437 ++#define SYS_pidfd_getfd 438 ++#define SYS_faccessat2 439 ++#define SYS_process_madvise 440 ++#define SYS_epoll_pwait2 441 ++#define SYS_mount_setattr 442 ++#define SYS_landlock_create_ruleset 444 ++#define SYS_landlock_add_rule 445 ++#define SYS_landlock_restrict_self 446 +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/termios.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/termios.h +new file mode 100644 +index 0000000..124f71d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/termios.h +@@ -0,0 +1,166 @@ ++struct termios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t __c_ispeed; ++ speed_t __c_ospeed; ++}; ++ ++#define VINTR 0 ++#define VQUIT 1 ++#define VERASE 2 ++#define VKILL 3 ++#define VEOF 4 ++#define VTIME 5 ++#define VMIN 6 ++#define VSWTC 7 ++#define VSTART 8 ++#define VSTOP 9 ++#define VSUSP 10 ++#define VEOL 11 ++#define VREPRINT 12 ++#define VDISCARD 13 ++#define VWERASE 14 ++#define VLNEXT 15 ++#define VEOL2 16 ++ ++#define IGNBRK 0000001 ++#define BRKINT 0000002 ++#define IGNPAR 0000004 ++#define PARMRK 0000010 ++#define INPCK 0000020 ++#define ISTRIP 0000040 ++#define INLCR 0000100 ++#define IGNCR 0000200 ++#define ICRNL 0000400 ++#define IUCLC 0001000 ++#define IXON 0002000 ++#define IXANY 0004000 ++#define IXOFF 0010000 ++#define IMAXBEL 0020000 ++#define IUTF8 0040000 ++ ++#define OPOST 0000001 ++#define OLCUC 0000002 ++#define ONLCR 0000004 ++#define OCRNL 0000010 ++#define ONOCR 0000020 ++#define ONLRET 0000040 ++#define OFILL 0000100 ++#define OFDEL 0000200 ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) ++#define NLDLY 0000400 ++#define NL0 0000000 ++#define NL1 0000400 ++#define CRDLY 0003000 ++#define CR0 0000000 ++#define CR1 0001000 ++#define CR2 0002000 ++#define CR3 0003000 ++#define TABDLY 0014000 ++#define TAB0 0000000 ++#define TAB1 0004000 ++#define TAB2 0010000 ++#define TAB3 0014000 ++#define BSDLY 0020000 ++#define BS0 0000000 ++#define BS1 0020000 ++#define FFDLY 0100000 ++#define FF0 0000000 ++#define FF1 0100000 ++#endif ++ ++#define VTDLY 0040000 ++#define VT0 0000000 ++#define VT1 0040000 ++ ++#define B0 0000000 ++#define B50 0000001 ++#define B75 0000002 ++#define B110 0000003 ++#define B134 0000004 ++#define B150 0000005 ++#define B200 0000006 ++#define B300 0000007 ++#define B600 0000010 ++#define B1200 0000011 ++#define B1800 0000012 ++#define B2400 0000013 ++#define B4800 0000014 ++#define B9600 0000015 ++#define B19200 0000016 ++#define B38400 0000017 ++ ++#define B57600 0010001 ++#define B115200 0010002 ++#define B230400 0010003 ++#define B460800 0010004 ++#define B500000 0010005 ++#define B576000 0010006 ++#define B921600 0010007 ++#define B1000000 0010010 ++#define B1152000 0010011 ++#define B1500000 0010012 ++#define B2000000 0010013 ++#define B2500000 0010014 ++#define B3000000 0010015 ++#define B3500000 0010016 ++#define B4000000 0010017 ++ ++#define CSIZE 0000060 ++#define CS5 0000000 ++#define CS6 0000020 ++#define CS7 0000040 ++#define CS8 0000060 ++#define CSTOPB 0000100 ++#define CREAD 0000200 ++#define PARENB 0000400 ++#define PARODD 0001000 ++#define HUPCL 0002000 ++#define CLOCAL 0004000 ++ ++#define ISIG 0000001 ++#define ICANON 0000002 ++#define ECHO 0000010 ++#define ECHOE 0000020 ++#define ECHOK 0000040 ++#define ECHONL 0000100 ++#define NOFLSH 0000200 ++#define TOSTOP 0000400 ++#define IEXTEN 0100000 ++ ++#define TCOOFF 0 ++#define TCOON 1 ++#define TCIOFF 2 ++#define TCION 3 ++ ++#define TCIFLUSH 0 ++#define TCOFLUSH 1 ++#define TCIOFLUSH 2 ++ ++#define TCSANOW 0 ++#define TCSADRAIN 1 ++#define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define EXTA 0000016 ++#define EXTB 0000017 ++#define CBAUD 0010017 ++#define CBAUDEX 0010000 ++#define CIBAUD 002003600000 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++ ++#define XCASE 0000004 ++#define ECHOCTL 0001000 ++#define ECHOPRT 0002000 ++#define ECHOKE 0004000 ++#define FLUSHO 0010000 ++#define PENDIN 0040000 ++#define EXTPROC 0200000 ++ ++#define XTABS 0014000 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/user.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/user.h +new file mode 100644 +index 0000000..8a1002a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/user.h +@@ -0,0 +1,16 @@ ++struct user_regs_struct { ++ unsigned long long regs[31]; ++ unsigned long long sp; ++ unsigned long long pc; ++ unsigned long long pstate; ++}; ++ ++struct user_fpsimd_struct { ++ __uint128_t vregs[32]; ++ unsigned int fpsr; ++ unsigned int fpcr; ++}; ++ ++#define ELF_NREG 34 ++typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NREG]; ++typedef struct user_fpsimd_struct elf_fpregset_t; +diff --git a/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/vt.h b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/vt.h +new file mode 100644 +index 0000000..834abfb +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aarch64-linux-ohos/bits/vt.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_interface_xcomponent.h b/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_interface_xcomponent.h +new file mode 100644 +index 0000000..13e1cc5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_interface_xcomponent.h +@@ -0,0 +1,519 @@ ++/* ++ * Copyright (c) 2021-2023 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++/** ++ * @addtogroup OH_NativeXComponent Native XComponent ++ * @{ ++ * ++ * @brief Describes the surface and touch event held by the ArkUI XComponent, which can be used for the EGL/OpenGL ES\n ++ * and media data input and displayed on the ArkUI XComponent. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file native_interface_xcomponent.h ++ * ++ * @brief Declares APIs for accessing a Native XComponent. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++#ifndef _NATIVE_INTERFACE_XCOMPONENT_H_ ++#define _NATIVE_INTERFACE_XCOMPONENT_H_ ++ ++#include ++#include ++ ++#include "native_xcomponent_key_event.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define OH_NATIVE_XCOMPONENT_OBJ ("__NATIVE_XCOMPONENT_OBJ__") ++ ++const uint32_t OH_XCOMPONENT_ID_LEN_MAX = 128; ++const uint32_t OH_MAX_TOUCH_POINTS_NUMBER = 10; ++ ++/** ++ * @brief Enumerates the API access states. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++enum { ++ /** Successful. */ ++ OH_NATIVEXCOMPONENT_RESULT_SUCCESS = 0, ++ /** Failed. */ ++ OH_NATIVEXCOMPONENT_RESULT_FAILED = -1, ++ /** Invalid parameters. */ ++ OH_NATIVEXCOMPONENT_RESULT_BAD_PARAMETER = -2, ++}; ++ ++typedef enum { ++ /** Trigger a touch event when a finger is pressed. */ ++ OH_NATIVEXCOMPONENT_DOWN = 0, ++ /** Trigger a touch event when a finger is lifted. */ ++ OH_NATIVEXCOMPONENT_UP, ++ /** Trigger a touch event when a finger moves on the screen in pressed state. */ ++ OH_NATIVEXCOMPONENT_MOVE, ++ /** Trigger an event when a touch event is canceled. */ ++ OH_NATIVEXCOMPONENT_CANCEL, ++ /** Invalid touch type. */ ++ OH_NATIVEXCOMPONENT_UNKNOWN, ++} OH_NativeXComponent_TouchEventType; ++ ++/** ++ * @brief Represents the touch point tool type. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef enum { ++ /** Indicates invalid tool type. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN = 0, ++ /** Indicates a finger. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_FINGER, ++ /** Indicates a stylus. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_PEN, ++ /** Indicates a eraser. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_RUBBER, ++ /** Indicates a brush. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_BRUSH, ++ /** Indicates a pencil. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_PENCIL, ++ /** Indicates a brush. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_AIRBRUSH, ++ /** Indicates a mouse. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_MOUSE, ++ /** Indicates a lens. */ ++ OH_NATIVEXCOMPONENT_TOOL_TYPE_LENS, ++} OH_NativeXComponent_TouchPointToolType; ++ ++/** ++ * @brief Represents the touch event source type. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef enum { ++ /** Indicates an unknown input source type. */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_UNKNOWN = 0, ++ /** Indicates that the input source generates a mouse multi-touch event. */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_MOUSE, ++ /** Indicates that the input source generates a touchscreen multi-touch event. */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHSCREEN, ++ /** Indicates that the input source generates a touchpad multi-touch event. */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_TOUCHPAD, ++ /** Indicates that the input source generates a joystick multi-touch event. */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_JOYSTICK, ++ /** ++ * @brief Indicates that the input source generates a keyboard event. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++ OH_NATIVEXCOMPONENT_SOURCE_TYPE_KEYBOARD, ++} OH_NativeXComponent_EventSourceType; ++ ++/** ++ * @brief Represents the mouse event action. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef enum { ++ OH_NATIVEXCOMPONENT_MOUSE_NONE = 0, ++ OH_NATIVEXCOMPONENT_MOUSE_PRESS, ++ OH_NATIVEXCOMPONENT_MOUSE_RELEASE, ++ OH_NATIVEXCOMPONENT_MOUSE_MOVE, ++} OH_NativeXComponent_MouseEventAction; ++ ++/** ++ * @brief Represents the mouse event button. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef enum { ++ OH_NATIVEXCOMPONENT_NONE_BUTTON = 0, ++ OH_NATIVEXCOMPONENT_LEFT_BUTTON = 0x01, ++ OH_NATIVEXCOMPONENT_RIGHT_BUTTON = 0x02, ++ OH_NATIVEXCOMPONENT_MIDDLE_BUTTON = 0x04, ++ OH_NATIVEXCOMPONENT_BACK_BUTTON = 0x08, ++ OH_NATIVEXCOMPONENT_FORWARD_BUTTON = 0x10, ++} OH_NativeXComponent_MouseEventButton; ++ ++typedef struct { ++ /** Unique identifier of a finger. */ ++ int32_t id; ++ /** X coordinate of the touch point relative to the left edge of the screen. */ ++ float screenX; ++ /** Y coordinate of the touch point relative to the upper edge of the screen. */ ++ float screenY; ++ /** X coordinate of the touch point relative to the left edge of the element to touch. */ ++ float x; ++ /** Y coordinate of the touch point relative to the upper edge of the element to touch. */ ++ float y; ++ /** Touch type of the touch event. */ ++ OH_NativeXComponent_TouchEventType type; ++ /** Contact area between the finger pad and the screen. */ ++ double size; ++ /** Pressure of the current touch event. */ ++ float force; ++ /** Timestamp of the current touch event. */ ++ int64_t timeStamp; ++ /** Whether the current point is pressed. */ ++ bool isPressed; ++} OH_NativeXComponent_TouchPoint; ++ ++// Represents the touch point information. ++typedef struct { ++ /** Unique identifier of a finger. */ ++ int32_t id; ++ /** X coordinate of the touch point relative to the left edge of the screen. */ ++ float screenX; ++ /** Y coordinate of the touch point relative to the upper edge of the screen. */ ++ float screenY; ++ /** X coordinate of the touch point relative to the left edge of the element to touch. */ ++ float x; ++ /** Y coordinate of the touch point relative to the upper edge of the element to touch. */ ++ float y; ++ /** Touch type of the touch event. */ ++ OH_NativeXComponent_TouchEventType type; ++ /** Contact area between the finger pad and the screen. */ ++ double size; ++ /** Pressure of the current touch event. */ ++ float force; ++ /** ID of the device where the current touch event is generated. */ ++ int64_t deviceId; ++ /** Timestamp of the current touch event. */ ++ int64_t timeStamp; ++ /** Array of the current touch points. */ ++ OH_NativeXComponent_TouchPoint touchPoints[OH_MAX_TOUCH_POINTS_NUMBER]; ++ /** Number of current touch points. */ ++ uint32_t numPoints; ++} OH_NativeXComponent_TouchEvent; ++ ++/** ++ * @brief Represents the mouse event information. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef struct { ++ /** X coordinate of the mouse point relative to the left edge of the element to mouse. */ ++ float x; ++ /** Y coordinate of the mouse point relative to the upper edge of the element to mouse. */ ++ float y; ++ /** X coordinate of the mouse point relative to the left edge of the screen. */ ++ float screenX; ++ /** Y coordinate of the mouse point relative to the upper edge of the screen. */ ++ float screenY; ++ /** Timestamp of the current mouse event. */ ++ int64_t timestamp; ++ /** Mouse event action. */ ++ OH_NativeXComponent_MouseEventAction action; ++ /** Mouse event button. */ ++ OH_NativeXComponent_MouseEventButton button; ++} OH_NativeXComponent_MouseEvent; ++ ++/** ++ * @brief Provides an encapsulated OH_NativeXComponent instance. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++typedef struct OH_NativeXComponent OH_NativeXComponent; ++ ++/** ++ * @brief Registers the surface lifecycle and touch event callbacks. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++typedef struct OH_NativeXComponent_Callback { ++ /** Called when the surface is created. */ ++ void (*OnSurfaceCreated)(OH_NativeXComponent* component, void* window); ++ /** Called when the surface is changed. */ ++ void (*OnSurfaceChanged)(OH_NativeXComponent* component, void* window); ++ /** Called when the surface is destroyed. */ ++ void (*OnSurfaceDestroyed)(OH_NativeXComponent* component, void* window); ++ /** Called when a touch event is triggered. */ ++ void (*DispatchTouchEvent)(OH_NativeXComponent* component, void* window); ++} OH_NativeXComponent_Callback; ++ ++/** ++ * @brief Registers the mouse event callbacks. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++typedef struct OH_NativeXComponent_MouseEvent_Callback { ++ /** Called when a mouse event is triggered. */ ++ void (*DispatchMouseEvent)(OH_NativeXComponent* component, void* window); ++ /** Called when a hover event is triggered. */ ++ void (*DispatchHoverEvent)(OH_NativeXComponent* component, bool isHover); ++} OH_NativeXComponent_MouseEvent_Callback; ++ ++struct OH_NativeXComponent_KeyEvent; ++/** ++ * @brief Provides an encapsulated OH_NativeXComponent_KeyEvent instance. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++typedef struct OH_NativeXComponent_KeyEvent OH_NativeXComponent_KeyEvent; ++ ++/** ++ * @brief Obtains the ID of the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param id Indicates the char buffer to keep the ID of this OH_NativeXComponent instance.\n ++ * Notice that a null-terminator will be appended to the char buffer, so the size of the\n ++ * char buffer should be at least as large as the size of the real id length plus 1.\n ++ * It is recommended that the size of the char buffer be [OH_XCOMPONENT_ID_LEN_MAX + 1]. ++ * @param size Indicates the pointer to the length of id, which you can set and receive. ++ * @return Returns the status code of the execution. ++ * @since 8 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetXComponentId(OH_NativeXComponent* component, char* id, uint64_t* size); ++ ++/** ++ * @brief Obtains the size of the surface held by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param window Indicates the native window handler. ++ * @param width Indicates the pointer to the width of the current surface. ++ * @param height Indicates the pointer to the height of the current surface. ++ * @return Returns the status code of the execution. ++ * @since 8 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetXComponentSize( ++ OH_NativeXComponent* component, const void* window, uint64_t* width, uint64_t* height); ++ ++/** ++ * @brief Obtains the offset of the surface held by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param window Indicates the native window handler. ++ * @param x Indicates the pointer to the x coordinate of the current surface. ++ * @param y Indicates the pointer to the y coordinate of the current surface. ++ * @return Returns the status code of the execution. ++ * @since 8 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetXComponentOffset( ++ OH_NativeXComponent* component, const void* window, double* x, double* y); ++ ++/** ++ * @brief Obtains the touch event dispatched by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param window Indicates the native window handler. ++ * @param touchEvent Indicates the pointer to the current touch event. ++ * @return Returns the status code of the execution. ++ * @since 8 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetTouchEvent( ++ OH_NativeXComponent* component, const void* window, OH_NativeXComponent_TouchEvent* touchEvent); ++ ++/** ++ * @brief Obtains the touch pointer tool type by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param pointIndex Indicates the pointer index in the touchPoints. ++ * @param toolType Indicates the tool Type of the pointer. ++ * @return Returns the status code of the execution. ++ * @since 9 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetTouchPointToolType( ++ OH_NativeXComponent* component, uint32_t pointIndex, OH_NativeXComponent_TouchPointToolType* toolType); ++ ++/** ++ * @brief Obtains the touch pointer tiltX by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param pointIndex Indicates the pointer index in the touchPoints. ++ * @param tiltX Indicates the x tilt of the pointer. ++ * @return Returns the status code of the execution. ++ * @since 9 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetTouchPointTiltX(OH_NativeXComponent* component, uint32_t pointIndex, float* tiltX); ++ ++/** ++ * @brief Obtains the touch pointer tiltX by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param pointIndex Indicates the pointer index in the touchPoints. ++ * @param tiltY Indicates the y tilt of the pointer. ++ * @return Returns the status code of the execution. ++ * @since 9 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetTouchPointTiltY(OH_NativeXComponent* component, uint32_t pointIndex, float* tiltY); ++ ++/** ++ * @brief Obtains the mouse event dispatched by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param window Indicates the native window handler. ++ * @param mouseEvent Indicates the pointer to the current mouse event. ++ * @return Returns the status code of the execution. ++ * @since 9 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetMouseEvent( ++ OH_NativeXComponent* component, const void* window, OH_NativeXComponent_MouseEvent* mouseEvent); ++ ++/** ++ * @brief Registers a callback for this OH_NativeXComponent instance. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param callback Indicates the pointer to a surface lifecycle and touch event callback. ++ * @return Returns the status code of the execution. ++ * @since 8 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_RegisterCallback(OH_NativeXComponent* component, OH_NativeXComponent_Callback* callback); ++ ++/** ++ * @brief Registers a callback for this OH_NativeXComponent instance. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param callback Indicates the pointer to a mouse event callback. ++ * @return Returns the status code of the execution. ++ * @since 9 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_RegisterMouseEventCallback( ++ OH_NativeXComponent* component, OH_NativeXComponent_MouseEvent_Callback* callback); ++ ++/** ++ * @brief Registers a callback for this OH_NativeXComponent instance. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param callback Indicates the pointer to a focus event callback. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_RegisterFocusEventCallback( ++ OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); ++ ++/** ++ * @brief Registers a callback for this OH_NativeXComponent instance. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param callback Indicates the pointer to a key event callback. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_RegisterKeyEventCallback( ++ OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); ++ ++/** ++ * @brief Registers a callback for this OH_NativeXComponent instance. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param callback Indicates the pointer to a blur event callback. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_RegisterBlurEventCallback( ++ OH_NativeXComponent* component, void (*callback)(OH_NativeXComponent* component, void* window)); ++ ++/** ++ * @brief Obtains the key event dispatched by the ArkUI XComponent. ++ * ++ * @param component Indicates the pointer to this OH_NativeXComponent instance. ++ * @param keyEvent Indicates the pointer to pointer of OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEvent(OH_NativeXComponent* component, OH_NativeXComponent_KeyEvent** keyEvent); ++ ++/** ++ * @brief Obtains the action of the key event. ++ * ++ * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. ++ * @param action Indicates the action of the OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEventAction( ++ OH_NativeXComponent_KeyEvent* keyEvent, OH_NativeXComponent_KeyAction* action); ++ ++/** ++ * @brief Obtains the keyCode of the key event. ++ * ++ * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. ++ * @param code Indicates the keyCode of the OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEventCode(OH_NativeXComponent_KeyEvent* keyEvent, OH_NativeXComponent_KeyCode* code); ++ ++/** ++ * @brief Obtains the sourceType of the key event. ++ * ++ * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. ++ * @param sourceType Indicates the sourceType of the OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEventSourceType( ++ OH_NativeXComponent_KeyEvent* keyEvent, OH_NativeXComponent_EventSourceType* sourceType); ++ ++/** ++ * @brief Obtains the deviceId of the key event. ++ * ++ * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. ++ * @param deviceId Indicates the deviceId of the OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEventDeviceId(OH_NativeXComponent_KeyEvent* keyEvent, int64_t* deviceId); ++ ++/** ++ * @brief Obtains the timestamp of the key event. ++ * ++ * @param keyEvent Indicates the pointer to this OH_NativeXComponent_KeyEvent instance. ++ * @param timestamp Indicates the timestamp of the OH_NativeXComponent_KeyEvent instance. ++ * @return Returns the status code of the execution. ++ * @since 10 ++ * @version 1.0 ++ */ ++int32_t OH_NativeXComponent_GetKeyEventTimestamp(OH_NativeXComponent_KeyEvent* keyEvent, int64_t* timestamp); ++ ++#ifdef __cplusplus ++}; ++#endif ++#endif // _NATIVE_INTERFACE_XCOMPONENT_H_ +diff --git a/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_xcomponent_key_event.h b/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_xcomponent_key_event.h +new file mode 100644 +index 0000000..5445692 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/ace/xcomponent/native_xcomponent_key_event.h +@@ -0,0 +1,391 @@ ++/* ++ * Copyright (c) 2021-2023 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++/** ++ * @addtogroup OH_NativeXComponent Native XComponent ++ * @{ ++ */ ++ ++/** ++ * @file native_xcomponent_key_event.h ++ * ++ * @brief Declares enums for key event of Native XComponent. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++ ++#ifndef _NATIVE_INTERFACE_XCOMPONENT_KEY_EVENT_H_ ++#define _NATIVE_INTERFACE_XCOMPONENT_KEY_EVENT_H_ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Represents the key event code. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++typedef enum { ++ KEY_UNKNOWN = -1, ++ KEY_FN = 0, ++ KEY_HOME = 1, ++ KEY_BACK = 2, ++ KEY_MEDIA_PLAY_PAUSE = 10, ++ KEY_MEDIA_STOP = 11, ++ KEY_MEDIA_NEXT = 12, ++ KEY_MEDIA_PREVIOUS = 13, ++ KEY_MEDIA_REWIND = 14, ++ KEY_MEDIA_FAST_FORWARD = 15, ++ KEY_VOLUME_UP = 16, ++ KEY_VOLUME_DOWN = 17, ++ KEY_POWER = 18, ++ KEY_CAMERA = 19, ++ KEY_VOLUME_MUTE = 22, ++ KEY_MUTE = 23, ++ KEY_BRIGHTNESS_UP = 40, ++ KEY_BRIGHTNESS_DOWN = 41, ++ KEY_0 = 2000, ++ KEY_1 = 2001, ++ KEY_2 = 2002, ++ KEY_3 = 2003, ++ KEY_4 = 2004, ++ KEY_5 = 2005, ++ KEY_6 = 2006, ++ KEY_7 = 2007, ++ KEY_8 = 2008, ++ KEY_9 = 2009, ++ KEY_STAR = 2010, ++ KEY_POUND = 2011, ++ KEY_DPAD_UP = 2012, ++ KEY_DPAD_DOWN = 2013, ++ KEY_DPAD_LEFT = 2014, ++ KEY_DPAD_RIGHT = 2015, ++ KEY_DPAD_CENTER = 2016, ++ KEY_A = 2017, ++ KEY_B = 2018, ++ KEY_C = 2019, ++ KEY_D = 2020, ++ KEY_E = 2021, ++ KEY_F = 2022, ++ KEY_G = 2023, ++ KEY_H = 2024, ++ KEY_I = 2025, ++ KEY_J = 2026, ++ KEY_K = 2027, ++ KEY_L = 2028, ++ KEY_M = 2029, ++ KEY_N = 2030, ++ KEY_O = 2031, ++ KEY_P = 2032, ++ KEY_Q = 2033, ++ KEY_R = 2034, ++ KEY_S = 2035, ++ KEY_T = 2036, ++ KEY_U = 2037, ++ KEY_V = 2038, ++ KEY_W = 2039, ++ KEY_X = 2040, ++ KEY_Y = 2041, ++ KEY_Z = 2042, ++ KEY_COMMA = 2043, ++ KEY_PERIOD = 2044, ++ KEY_ALT_LEFT = 2045, ++ KEY_ALT_RIGHT = 2046, ++ KEY_SHIFT_LEFT = 2047, ++ KEY_SHIFT_RIGHT = 2048, ++ KEY_TAB = 2049, ++ KEY_SPACE = 2050, ++ KEY_SYM = 2051, ++ KEY_EXPLORER = 2052, ++ KEY_ENVELOPE = 2053, ++ KEY_ENTER = 2054, ++ KEY_DEL = 2055, ++ KEY_GRAVE = 2056, ++ KEY_MINUS = 2057, ++ KEY_EQUALS = 2058, ++ KEY_LEFT_BRACKET = 2059, ++ KEY_RIGHT_BRACKET = 2060, ++ KEY_BACKSLASH = 2061, ++ KEY_SEMICOLON = 2062, ++ KEY_APOSTROPHE = 2063, ++ KEY_SLASH = 2064, ++ KEY_AT = 2065, ++ KEY_PLUS = 2066, ++ KEY_MENU = 2067, ++ KEY_PAGE_UP = 2068, ++ KEY_PAGE_DOWN = 2069, ++ KEY_ESCAPE = 2070, ++ KEY_FORWARD_DEL = 2071, ++ KEY_CTRL_LEFT = 2072, ++ KEY_CTRL_RIGHT = 2073, ++ KEY_CAPS_LOCK = 2074, ++ KEY_SCROLL_LOCK = 2075, ++ KEY_META_LEFT = 2076, ++ KEY_META_RIGHT = 2077, ++ KEY_FUNCTION = 2078, ++ KEY_SYSRQ = 2079, ++ KEY_BREAK = 2080, ++ KEY_MOVE_HOME = 2081, ++ KEY_MOVE_END = 2082, ++ KEY_INSERT = 2083, ++ KEY_FORWARD = 2084, ++ KEY_MEDIA_PLAY = 2085, ++ KEY_MEDIA_PAUSE = 2086, ++ KEY_MEDIA_CLOSE = 2087, ++ KEY_MEDIA_EJECT = 2088, ++ KEY_MEDIA_RECORD = 2089, ++ KEY_F1 = 2090, ++ KEY_F2 = 2091, ++ KEY_F3 = 2092, ++ KEY_F4 = 2093, ++ KEY_F5 = 2094, ++ KEY_F6 = 2095, ++ KEY_F7 = 2096, ++ KEY_F8 = 2097, ++ KEY_F9 = 2098, ++ KEY_F10 = 2099, ++ KEY_F11 = 2100, ++ KEY_F12 = 2101, ++ KEY_NUM_LOCK = 2102, ++ KEY_NUMPAD_0 = 2103, ++ KEY_NUMPAD_1 = 2104, ++ KEY_NUMPAD_2 = 2105, ++ KEY_NUMPAD_3 = 2106, ++ KEY_NUMPAD_4 = 2107, ++ KEY_NUMPAD_5 = 2108, ++ KEY_NUMPAD_6 = 2109, ++ KEY_NUMPAD_7 = 2110, ++ KEY_NUMPAD_8 = 2111, ++ KEY_NUMPAD_9 = 2112, ++ KEY_NUMPAD_DIVIDE = 2113, ++ KEY_NUMPAD_MULTIPLY = 2114, ++ KEY_NUMPAD_SUBTRACT = 2115, ++ KEY_NUMPAD_ADD = 2116, ++ KEY_NUMPAD_DOT = 2117, ++ KEY_NUMPAD_COMMA = 2118, ++ KEY_NUMPAD_ENTER = 2119, ++ KEY_NUMPAD_EQUALS = 2120, ++ KEY_NUMPAD_LEFT_PAREN = 2121, ++ KEY_NUMPAD_RIGHT_PAREN = 2122, ++ KEY_VIRTUAL_MULTITASK = 2210, ++ KEY_SLEEP = 2600, ++ KEY_ZENKAKU_HANKAKU = 2601, ++ KEY_102ND = 2602, ++ KEY_RO = 2603, ++ KEY_KATAKANA = 2604, ++ KEY_HIRAGANA = 2605, ++ KEY_HENKAN = 2606, ++ KEY_KATAKANA_HIRAGANA = 2607, ++ KEY_MUHENKAN = 2608, ++ KEY_LINEFEED = 2609, ++ KEY_MACRO = 2610, ++ KEY_NUMPAD_PLUSMINUS = 2611, ++ KEY_SCALE = 2612, ++ KEY_HANGUEL = 2613, ++ KEY_HANJA = 2614, ++ KEY_YEN = 2615, ++ KEY_STOP = 2616, ++ KEY_AGAIN = 2617, ++ KEY_PROPS = 2618, ++ KEY_UNDO = 2619, ++ KEY_COPY = 2620, ++ KEY_OPEN = 2621, ++ KEY_PASTE = 2622, ++ KEY_FIND = 2623, ++ KEY_CUT = 2624, ++ KEY_HELP = 2625, ++ KEY_CALC = 2626, ++ KEY_FILE = 2627, ++ KEY_BOOKMARKS = 2628, ++ KEY_NEXT = 2629, ++ KEY_PLAYPAUSE = 2630, ++ KEY_PREVIOUS = 2631, ++ KEY_STOPCD = 2632, ++ KEY_CONFIG = 2634, ++ KEY_REFRESH = 2635, ++ KEY_EXIT = 2636, ++ KEY_EDIT = 2637, ++ KEY_SCROLLUP = 2638, ++ KEY_SCROLLDOWN = 2639, ++ KEY_NEW = 2640, ++ KEY_REDO = 2641, ++ KEY_CLOSE = 2642, ++ KEY_PLAY = 2643, ++ KEY_BASSBOOST = 2644, ++ KEY_PRINT = 2645, ++ KEY_CHAT = 2646, ++ KEY_FINANCE = 2647, ++ KEY_CANCEL = 2648, ++ KEY_KBDILLUM_TOGGLE = 2649, ++ KEY_KBDILLUM_DOWN = 2650, ++ KEY_KBDILLUM_UP = 2651, ++ KEY_SEND = 2652, ++ KEY_REPLY = 2653, ++ KEY_FORWARDMAIL = 2654, ++ KEY_SAVE = 2655, ++ KEY_DOCUMENTS = 2656, ++ KEY_VIDEO_NEXT = 2657, ++ KEY_VIDEO_PREV = 2658, ++ KEY_BRIGHTNESS_CYCLE = 2659, ++ KEY_BRIGHTNESS_ZERO = 2660, ++ KEY_DISPLAY_OFF = 2661, ++ KEY_BTN_MISC = 2662, ++ KEY_GOTO = 2663, ++ KEY_INFO = 2664, ++ KEY_PROGRAM = 2665, ++ KEY_PVR = 2666, ++ KEY_SUBTITLE = 2667, ++ KEY_FULL_SCREEN = 2668, ++ KEY_KEYBOARD = 2669, ++ KEY_ASPECT_RATIO = 2670, ++ KEY_PC = 2671, ++ KEY_TV = 2672, ++ KEY_TV2 = 2673, ++ KEY_VCR = 2674, ++ KEY_VCR2 = 2675, ++ KEY_SAT = 2676, ++ KEY_CD = 2677, ++ KEY_TAPE = 2678, ++ KEY_TUNER = 2679, ++ KEY_PLAYER = 2680, ++ KEY_DVD = 2681, ++ KEY_AUDIO = 2682, ++ KEY_VIDEO = 2683, ++ KEY_MEMO = 2684, ++ KEY_CALENDAR = 2685, ++ KEY_RED = 2686, ++ KEY_GREEN = 2687, ++ KEY_YELLOW = 2688, ++ KEY_BLUE = 2689, ++ KEY_CHANNELUP = 2690, ++ KEY_CHANNELDOWN = 2691, ++ KEY_LAST = 2692, ++ KEY_RESTART = 2693, ++ KEY_SLOW = 2694, ++ KEY_SHUFFLE = 2695, ++ KEY_VIDEOPHONE = 2696, ++ KEY_GAMES = 2697, ++ KEY_ZOOMIN = 2698, ++ KEY_ZOOMOUT = 2699, ++ KEY_ZOOMRESET = 2700, ++ KEY_WORDPROCESSOR = 2701, ++ KEY_EDITOR = 2702, ++ KEY_SPREADSHEET = 2703, ++ KEY_GRAPHICSEDITOR = 2704, ++ KEY_PRESENTATION = 2705, ++ KEY_DATABASE = 2706, ++ KEY_NEWS = 2707, ++ KEY_VOICEMAIL = 2708, ++ KEY_ADDRESSBOOK = 2709, ++ KEY_MESSENGER = 2710, ++ KEY_BRIGHTNESS_TOGGLE = 2711, ++ KEY_SPELLCHECK = 2712, ++ KEY_COFFEE = 2713, ++ KEY_MEDIA_REPEAT = 2714, ++ KEY_IMAGES = 2715, ++ KEY_BUTTONCONFIG = 2716, ++ KEY_TASKMANAGER = 2717, ++ KEY_JOURNAL = 2718, ++ KEY_CONTROLPANEL = 2719, ++ KEY_APPSELECT = 2720, ++ KEY_SCREENSAVER = 2721, ++ KEY_ASSISTANT = 2722, ++ KEY_KBD_LAYOUT_NEXT = 2723, ++ KEY_BRIGHTNESS_MIN = 2724, ++ KEY_BRIGHTNESS_MAX = 2725, ++ KEY_KBDINPUTASSIST_PREV = 2726, ++ KEY_KBDINPUTASSIST_NEXT = 2727, ++ KEY_KBDINPUTASSIST_PREVGROUP = 2728, ++ KEY_KBDINPUTASSIST_NEXTGROUP = 2729, ++ KEY_KBDINPUTASSIST_ACCEPT = 2730, ++ KEY_KBDINPUTASSIST_CANCEL = 2731, ++ KEY_FRONT = 2800, ++ KEY_SETUP = 2801, ++ KEY_WAKEUP = 2802, ++ KEY_SENDFILE = 2803, ++ KEY_DELETEFILE = 2804, ++ KEY_XFER = 2805, ++ KEY_PROG1 = 2806, ++ KEY_PROG2 = 2807, ++ KEY_MSDOS = 2808, ++ KEY_SCREENLOCK = 2809, ++ KEY_DIRECTION_ROTATE_DISPLAY = 2810, ++ KEY_CYCLEWINDOWS = 2811, ++ KEY_COMPUTER = 2812, ++ KEY_EJECTCLOSECD = 2813, ++ KEY_ISO = 2814, ++ KEY_MOVE = 2815, ++ KEY_F13 = 2816, ++ KEY_F14 = 2817, ++ KEY_F15 = 2818, ++ KEY_F16 = 2819, ++ KEY_F17 = 2820, ++ KEY_F18 = 2821, ++ KEY_F19 = 2822, ++ KEY_F20 = 2823, ++ KEY_F21 = 2824, ++ KEY_F22 = 2825, ++ KEY_F23 = 2826, ++ KEY_F24 = 2827, ++ KEY_PROG3 = 2828, ++ KEY_PROG4 = 2829, ++ KEY_DASHBOARD = 2830, ++ KEY_SUSPEND = 2831, ++ KEY_HP = 2832, ++ KEY_SOUND = 2833, ++ KEY_QUESTION = 2834, ++ KEY_CONNECT = 2836, ++ KEY_SPORT = 2837, ++ KEY_SHOP = 2838, ++ KEY_ALTERASE = 2839, ++ KEY_SWITCHVIDEOMODE = 2841, ++ KEY_BATTERY = 2842, ++ KEY_BLUETOOTH = 2843, ++ KEY_WLAN = 2844, ++ KEY_UWB = 2845, ++ KEY_WWAN_WIMAX = 2846, ++ KEY_RFKILL = 2847, ++ KEY_CHANNEL = 3001, ++ KEY_BTN_0 = 3100, ++ KEY_BTN_1 = 3101, ++ KEY_BTN_2 = 3102, ++ KEY_BTN_3 = 3103, ++ KEY_BTN_4 = 3104, ++ KEY_BTN_5 = 3105, ++ KEY_BTN_6 = 3106, ++ KEY_BTN_7 = 3107, ++ KEY_BTN_8 = 3108, ++ KEY_BTN_9 = 3109, ++} OH_NativeXComponent_KeyCode; ++ ++/** ++ * @brief Represents the key event action. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++typedef enum { ++ OH_NATIVEXCOMPONENT_KEY_ACTION_UNKNOWN = -1, ++ OH_NATIVEXCOMPONENT_KEY_ACTION_DOWN = 0, ++ OH_NATIVEXCOMPONENT_KEY_ACTION_UP, ++} OH_NativeXComponent_KeyAction; ++ ++#ifdef __cplusplus ++}; ++#endif ++#endif // _NATIVE_INTERFACE_XCOMPONENT_KEY_EVENT_H_ +diff --git a/build/ohos/ohos-sysroot/usr/include/aio.h b/build/ohos/ohos-sysroot/usr/include/aio.h +new file mode 100644 +index 0000000..515b4f3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/aio.h +@@ -0,0 +1,55 @@ ++#ifndef _AIO_H ++#define _AIO_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++#include ++#include ++ ++#define __NEED_ssize_t ++#define __NEED_off_t ++ ++#include ++ ++struct aiocb { ++ int aio_fildes, aio_lio_opcode, aio_reqprio; ++ volatile void *aio_buf; ++ size_t aio_nbytes; ++ struct sigevent aio_sigevent; ++ void *__td; ++ int __lock[2]; ++ volatile int __err; ++ ssize_t __ret; ++ off_t aio_offset; ++ void *__next, *__prev; ++ char __dummy4[32-2*sizeof(void *)]; ++}; ++ ++#define AIO_CANCELED 0 ++#define AIO_NOTCANCELED 1 ++#define AIO_ALLDONE 2 ++ ++#define LIO_READ 0 ++#define LIO_WRITE 1 ++#define LIO_NOP 2 ++ ++#define LIO_WAIT 0 ++#define LIO_NOWAIT 1 ++ ++#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) ++#define aiocb64 aiocb ++#define off64_t off_t ++#endif ++ ++#if _REDIR_TIME64 ++__REDIR(aio_suspend, __aio_suspend_time64); ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/alloca.h b/build/ohos/ohos-sysroot/usr/include/alloca.h +new file mode 100644 +index 0000000..8ae8a30 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/alloca.h +@@ -0,0 +1,17 @@ ++#ifndef _ALLOCA_H ++#define _ALLOCA_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define __NEED_size_t ++#include ++ ++#define alloca __builtin_alloca ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/ar.h b/build/ohos/ohos-sysroot/usr/include/ar.h +new file mode 100644 +index 0000000..eafd51d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/ar.h +@@ -0,0 +1,25 @@ ++#ifndef _AR_H ++#define _AR_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define ARMAG "!\n" ++#define SARMAG 8 ++#define ARFMAG "`\n" ++ ++struct ar_hdr { ++ char ar_name[16]; ++ char ar_date[12]; ++ char ar_uid[6], ar_gid[6]; ++ char ar_mode[8]; ++ char ar_size[10]; ++ char ar_fmag[2]; ++}; ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/auxvec.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/auxvec.h +new file mode 100644 +index 0000000..ae03ed3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/auxvec.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_AUXVEC_H ++#define __ASM_AUXVEC_H ++#define AT_SYSINFO_EHDR 33 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bitsperlong.h +new file mode 100644 +index 0000000..5dc5060 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bitsperlong.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bpf_perf_event.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..fa7bc48 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/bpf_perf_event.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/byteorder.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/byteorder.h +new file mode 100644 +index 0000000..a253654 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/byteorder.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_ARM_BYTEORDER_H ++#define __ASM_ARM_BYTEORDER_H ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/errno.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/errno.h +new file mode 100644 +index 0000000..392cd94 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/errno.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/fcntl.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/fcntl.h +new file mode 100644 +index 0000000..f2f14c3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/fcntl.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ARM_FCNTL_H ++#define _ARM_FCNTL_H ++#define O_DIRECTORY 040000 ++#define O_NOFOLLOW 0100000 ++#define O_DIRECT 0200000 ++#define O_LARGEFILE 0400000 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/hwcap.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/hwcap.h +new file mode 100644 +index 0000000..fdc5405 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/hwcap.h +@@ -0,0 +1,49 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASMARM_HWCAP_H ++#define _UAPI__ASMARM_HWCAP_H ++#define HWCAP_SWP (1 << 0) ++#define HWCAP_HALF (1 << 1) ++#define HWCAP_THUMB (1 << 2) ++#define HWCAP_26BIT (1 << 3) ++#define HWCAP_FAST_MULT (1 << 4) ++#define HWCAP_FPA (1 << 5) ++#define HWCAP_VFP (1 << 6) ++#define HWCAP_EDSP (1 << 7) ++#define HWCAP_JAVA (1 << 8) ++#define HWCAP_IWMMXT (1 << 9) ++#define HWCAP_CRUNCH (1 << 10) ++#define HWCAP_THUMBEE (1 << 11) ++#define HWCAP_NEON (1 << 12) ++#define HWCAP_VFPv3 (1 << 13) ++#define HWCAP_VFPv3D16 (1 << 14) ++#define HWCAP_TLS (1 << 15) ++#define HWCAP_VFPv4 (1 << 16) ++#define HWCAP_IDIVA (1 << 17) ++#define HWCAP_IDIVT (1 << 18) ++#define HWCAP_VFPD32 (1 << 19) ++#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) ++#define HWCAP_LPAE (1 << 20) ++#define HWCAP_EVTSTRM (1 << 21) ++#define HWCAP2_AES (1 << 0) ++#define HWCAP2_PMULL (1 << 1) ++#define HWCAP2_SHA1 (1 << 2) ++#define HWCAP2_SHA2 (1 << 3) ++#define HWCAP2_CRC32 (1 << 4) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctl.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctl.h +new file mode 100644 +index 0000000..7b7bd37 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctl.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctls.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctls.h +new file mode 100644 +index 0000000..e83b2cc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ioctls.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_ARM_IOCTLS_H ++#define __ASM_ARM_IOCTLS_H ++#define FIOQSIZE 0x545E ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ipcbuf.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ipcbuf.h +new file mode 100644 +index 0000000..0021f14 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ipcbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/kvm_para.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/kvm_para.h +new file mode 100644 +index 0000000..e19f7a0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/kvm_para.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/mman.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/mman.h +new file mode 100644 +index 0000000..ec9453d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/mman.h +@@ -0,0 +1,20 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include ++#define arch_mmap_check(addr,len,flags) (((flags) & MAP_FIXED && (addr) < FIRST_USER_ADDRESS) ? - EINVAL : 0) +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/msgbuf.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/msgbuf.h +new file mode 100644 +index 0000000..7809e3c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/msgbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/param.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/param.h +new file mode 100644 +index 0000000..5ccf935 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/param.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/perf_regs.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/perf_regs.h +new file mode 100644 +index 0000000..ea2ff81 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/perf_regs.h +@@ -0,0 +1,40 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_ARM_PERF_REGS_H ++#define _ASM_ARM_PERF_REGS_H ++enum perf_event_arm_regs { ++ PERF_REG_ARM_R0, ++ PERF_REG_ARM_R1, ++ PERF_REG_ARM_R2, ++ PERF_REG_ARM_R3, ++ PERF_REG_ARM_R4, ++ PERF_REG_ARM_R5, ++ PERF_REG_ARM_R6, ++ PERF_REG_ARM_R7, ++ PERF_REG_ARM_R8, ++ PERF_REG_ARM_R9, ++ PERF_REG_ARM_R10, ++ PERF_REG_ARM_FP, ++ PERF_REG_ARM_IP, ++ PERF_REG_ARM_SP, ++ PERF_REG_ARM_LR, ++ PERF_REG_ARM_PC, ++ PERF_REG_ARM_MAX, ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/poll.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/poll.h +new file mode 100644 +index 0000000..d7e8adc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/poll.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/posix_types.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/posix_types.h +new file mode 100644 +index 0000000..ff5138b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/posix_types.h +@@ -0,0 +1,31 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ARCH_ARM_POSIX_TYPES_H ++#define __ARCH_ARM_POSIX_TYPES_H ++typedef unsigned short __kernel_mode_t; ++#define __kernel_mode_t __kernel_mode_t ++typedef unsigned short __kernel_ipc_pid_t; ++#define __kernel_ipc_pid_t __kernel_ipc_pid_t ++typedef unsigned short __kernel_uid_t; ++typedef unsigned short __kernel_gid_t; ++#define __kernel_uid_t __kernel_uid_t ++typedef unsigned short __kernel_old_dev_t; ++#define __kernel_old_dev_t __kernel_old_dev_t ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ptrace.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ptrace.h +new file mode 100644 +index 0000000..b0291dc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/ptrace.h +@@ -0,0 +1,104 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_ARM_PTRACE_H ++#define _UAPI__ASM_ARM_PTRACE_H ++#include ++#define PTRACE_GETREGS 12 ++#define PTRACE_SETREGS 13 ++#define PTRACE_GETFPREGS 14 ++#define PTRACE_SETFPREGS 15 ++#define PTRACE_GETWMMXREGS 18 ++#define PTRACE_SETWMMXREGS 19 ++#define PTRACE_OLDSETOPTIONS 21 ++#define PTRACE_GET_THREAD_AREA 22 ++#define PTRACE_SET_SYSCALL 23 ++#define PTRACE_GETCRUNCHREGS 25 ++#define PTRACE_SETCRUNCHREGS 26 ++#define PTRACE_GETVFPREGS 27 ++#define PTRACE_SETVFPREGS 28 ++#define PTRACE_GETHBPREGS 29 ++#define PTRACE_SETHBPREGS 30 ++#define PTRACE_GETFDPIC 31 ++#define PTRACE_GETFDPIC_EXEC 0 ++#define PTRACE_GETFDPIC_INTERP 1 ++#define USR26_MODE 0x00000000 ++#define FIQ26_MODE 0x00000001 ++#define IRQ26_MODE 0x00000002 ++#define SVC26_MODE 0x00000003 ++#define USR_MODE 0x00000010 ++#define SVC_MODE 0x00000013 ++#define FIQ_MODE 0x00000011 ++#define IRQ_MODE 0x00000012 ++#define MON_MODE 0x00000016 ++#define ABT_MODE 0x00000017 ++#define HYP_MODE 0x0000001a ++#define UND_MODE 0x0000001b ++#define SYSTEM_MODE 0x0000001f ++#define MODE32_BIT 0x00000010 ++#define MODE_MASK 0x0000001f ++#define V4_PSR_T_BIT 0x00000020 ++#define V7M_PSR_T_BIT 0x01000000 ++#define PSR_T_BIT V4_PSR_T_BIT ++#define PSR_F_BIT 0x00000040 ++#define PSR_I_BIT 0x00000080 ++#define PSR_A_BIT 0x00000100 ++#define PSR_E_BIT 0x00000200 ++#define PSR_J_BIT 0x01000000 ++#define PSR_Q_BIT 0x08000000 ++#define PSR_V_BIT 0x10000000 ++#define PSR_C_BIT 0x20000000 ++#define PSR_Z_BIT 0x40000000 ++#define PSR_N_BIT 0x80000000 ++#define PSR_f 0xff000000 ++#define PSR_s 0x00ff0000 ++#define PSR_x 0x0000ff00 ++#define PSR_c 0x000000ff ++#define APSR_MASK 0xf80f0000 ++#define PSR_ISET_MASK 0x01000010 ++#define PSR_IT_MASK 0x0600fc00 ++#define PSR_ENDIAN_MASK 0x00000200 ++#define PSR_ENDSTATE 0 ++#define PT_TEXT_ADDR 0x10000 ++#define PT_DATA_ADDR 0x10004 ++#define PT_TEXT_END_ADDR 0x10008 ++#ifndef __ASSEMBLY__ ++struct pt_regs { ++ long uregs[18]; ++}; ++#define ARM_cpsr uregs[16] ++#define ARM_pc uregs[15] ++#define ARM_lr uregs[14] ++#define ARM_sp uregs[13] ++#define ARM_ip uregs[12] ++#define ARM_fp uregs[11] ++#define ARM_r10 uregs[10] ++#define ARM_r9 uregs[9] ++#define ARM_r8 uregs[8] ++#define ARM_r7 uregs[7] ++#define ARM_r6 uregs[6] ++#define ARM_r5 uregs[5] ++#define ARM_r4 uregs[4] ++#define ARM_r3 uregs[3] ++#define ARM_r2 uregs[2] ++#define ARM_r1 uregs[1] ++#define ARM_r0 uregs[0] ++#define ARM_ORIG_r0 uregs[17] ++#define ARM_VFPREGS_SIZE (32 * 8 + 4) ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/resource.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/resource.h +new file mode 100644 +index 0000000..371adb5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/resource.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sembuf.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sembuf.h +new file mode 100644 +index 0000000..6ce6549 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sembuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/setup.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/setup.h +new file mode 100644 +index 0000000..b4da2d1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/setup.h +@@ -0,0 +1,128 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASMARM_SETUP_H ++#define _UAPI__ASMARM_SETUP_H ++#include ++#define COMMAND_LINE_SIZE 2048 ++#define ATAG_NONE 0x00000000 ++struct tag_header { ++ __u32 size; ++ __u32 tag; ++}; ++#define ATAG_CORE 0x54410001 ++struct tag_core { ++ __u32 flags; ++ __u32 pagesize; ++ __u32 rootdev; ++}; ++#define ATAG_MEM 0x54410002 ++struct tag_mem32 { ++ __u32 size; ++ __u32 start; ++}; ++#define ATAG_VIDEOTEXT 0x54410003 ++struct tag_videotext { ++ __u8 x; ++ __u8 y; ++ __u16 video_page; ++ __u8 video_mode; ++ __u8 video_cols; ++ __u16 video_ega_bx; ++ __u8 video_lines; ++ __u8 video_isvga; ++ __u16 video_points; ++}; ++#define ATAG_RAMDISK 0x54410004 ++struct tag_ramdisk { ++ __u32 flags; ++ __u32 size; ++ __u32 start; ++}; ++#define ATAG_INITRD 0x54410005 ++#define ATAG_INITRD2 0x54420005 ++struct tag_initrd { ++ __u32 start; ++ __u32 size; ++}; ++#define ATAG_SERIAL 0x54410006 ++struct tag_serialnr { ++ __u32 low; ++ __u32 high; ++}; ++#define ATAG_REVISION 0x54410007 ++struct tag_revision { ++ __u32 rev; ++}; ++#define ATAG_VIDEOLFB 0x54410008 ++struct tag_videolfb { ++ __u16 lfb_width; ++ __u16 lfb_height; ++ __u16 lfb_depth; ++ __u16 lfb_linelength; ++ __u32 lfb_base; ++ __u32 lfb_size; ++ __u8 red_size; ++ __u8 red_pos; ++ __u8 green_size; ++ __u8 green_pos; ++ __u8 blue_size; ++ __u8 blue_pos; ++ __u8 rsvd_size; ++ __u8 rsvd_pos; ++}; ++#define ATAG_CMDLINE 0x54410009 ++struct tag_cmdline { ++ char cmdline[1]; ++}; ++#define ATAG_ACORN 0x41000101 ++struct tag_acorn { ++ __u32 memc_control_reg; ++ __u32 vram_pages; ++ __u8 sounddefault; ++ __u8 adfsdrives; ++}; ++#define ATAG_MEMCLK 0x41000402 ++struct tag_memclk { ++ __u32 fmemclk; ++}; ++struct tag { ++ struct tag_header hdr; ++ union { ++ struct tag_core core; ++ struct tag_mem32 mem; ++ struct tag_videotext videotext; ++ struct tag_ramdisk ramdisk; ++ struct tag_initrd initrd; ++ struct tag_serialnr serialnr; ++ struct tag_revision revision; ++ struct tag_videolfb videolfb; ++ struct tag_cmdline cmdline; ++ struct tag_acorn acorn; ++ struct tag_memclk memclk; ++ } u; ++}; ++struct tagtable { ++ __u32 tag; ++ int(* parse) (const struct tag *); ++}; ++#define tag_member_present(tag,member) ((unsigned long) (& ((struct tag *) 0L)->member + 1) <= (tag)->hdr.size * 4) ++#define tag_next(t) ((struct tag *) ((__u32 *) (t) + (t)->hdr.size)) ++#define tag_size(type) ((sizeof(struct tag_header) + sizeof(struct type)) >> 2) ++#define for_each_tag(t,base) for(t = base; t->hdr.size; t = tag_next(t)) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/shmbuf.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/shmbuf.h +new file mode 100644 +index 0000000..fe8b1be +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/shmbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sigcontext.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sigcontext.h +new file mode 100644 +index 0000000..b7504d6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sigcontext.h +@@ -0,0 +1,44 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASMARM_SIGCONTEXT_H ++#define _ASMARM_SIGCONTEXT_H ++struct sigcontext { ++ unsigned long trap_no; ++ unsigned long error_code; ++ unsigned long oldmask; ++ unsigned long arm_r0; ++ unsigned long arm_r1; ++ unsigned long arm_r2; ++ unsigned long arm_r3; ++ unsigned long arm_r4; ++ unsigned long arm_r5; ++ unsigned long arm_r6; ++ unsigned long arm_r7; ++ unsigned long arm_r8; ++ unsigned long arm_r9; ++ unsigned long arm_r10; ++ unsigned long arm_fp; ++ unsigned long arm_ip; ++ unsigned long arm_sp; ++ unsigned long arm_lr; ++ unsigned long arm_pc; ++ unsigned long arm_cpsr; ++ unsigned long fault_address; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/siginfo.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/siginfo.h +new file mode 100644 +index 0000000..a31ebb2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/siginfo.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/signal.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/signal.h +new file mode 100644 +index 0000000..51a3022 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/signal.h +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASMARM_SIGNAL_H ++#define _UAPI_ASMARM_SIGNAL_H ++#include ++struct siginfo; ++#define _KERNEL_NSIG 32 ++typedef unsigned long sigset_t; ++#define SIGHUP 1 ++#define SIGINT 2 ++#define SIGQUIT 3 ++#define SIGILL 4 ++#define SIGTRAP 5 ++#define SIGABRT 6 ++#define SIGIOT 6 ++#define SIGBUS 7 ++#define SIGFPE 8 ++#define SIGKILL 9 ++#define SIGUSR1 10 ++#define SIGSEGV 11 ++#define SIGUSR2 12 ++#define SIGPIPE 13 ++#define SIGALRM 14 ++#define SIGTERM 15 ++#define SIGSTKFLT 16 ++#define SIGCHLD 17 ++#define SIGCONT 18 ++#define SIGSTOP 19 ++#define SIGTSTP 20 ++#define SIGTTIN 21 ++#define SIGTTOU 22 ++#define SIGURG 23 ++#define SIGXCPU 24 ++#define SIGXFSZ 25 ++#define SIGVTALRM 26 ++#define SIGPROF 27 ++#define SIGWINCH 28 ++#define SIGIO 29 ++#define SIGPOLL SIGIO ++#define SIGPWR 30 ++#define SIGSYS 31 ++#define SIGUNUSED 31 ++#define __SIGRTMIN 32 ++#define __SIGRTMAX _KERNEL__NSIG ++#define SIGSWI 32 ++#define SA_NOCLDSTOP 0x00000001 ++#define SA_NOCLDWAIT 0x00000002 ++#define SA_SIGINFO 0x00000004 ++#define SA_THIRTYTWO 0x02000000 ++#define SA_RESTORER 0x04000000 ++#define SA_ONSTACK 0x08000000 ++#define SA_RESTART 0x10000000 ++#define SA_NODEFER 0x40000000 ++#define SA_RESETHAND 0x80000000 ++#define SA_NOMASK SA_NODEFER ++#define SA_ONESHOT SA_RESETHAND ++#define MINSIGSTKSZ 2048 ++#define SIGSTKSZ 8192 ++#include ++struct sigaction { ++ union { ++ __sighandler_t _sa_handler; ++ void(* _sa_sigaction) (int, struct siginfo *, void *); ++ } _u; ++ sigset_t sa_mask; ++ unsigned long sa_flags; ++ void(* sa_restorer) (void); ++}; ++#define sa_handler _u._sa_handler ++#define sa_sigaction _u._sa_sigaction ++typedef struct sigaltstack { ++ void __user * ss_sp; ++ int ss_flags; ++ size_t ss_size; ++} stack_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/socket.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/socket.h +new file mode 100644 +index 0000000..50a9874 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/socket.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sockios.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sockios.h +new file mode 100644 +index 0000000..710db92 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/sockios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/stat.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/stat.h +new file mode 100644 +index 0000000..27ec243 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/stat.h +@@ -0,0 +1,77 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASMARM_STAT_H ++#define _ASMARM_STAT_H ++struct __old_kernel_stat { ++ unsigned short st_dev; ++ unsigned short st_ino; ++ unsigned short st_mode; ++ unsigned short st_nlink; ++ unsigned short st_uid; ++ unsigned short st_gid; ++ unsigned short st_rdev; ++ unsigned long st_size; ++ unsigned long st_atime; ++ unsigned long st_mtime; ++ unsigned long st_ctime; ++}; ++#define STAT_HAVE_NSEC ++struct stat { ++ unsigned long st_dev; ++ unsigned long st_ino; ++ unsigned short st_mode; ++ unsigned short st_nlink; ++ unsigned short st_uid; ++ unsigned short st_gid; ++ unsigned long st_rdev; ++ unsigned long st_size; ++ unsigned long st_blksize; ++ unsigned long st_blocks; ++ unsigned long st_atime; ++ unsigned long st_atime_nsec; ++ unsigned long st_mtime; ++ unsigned long st_mtime_nsec; ++ unsigned long st_ctime; ++ unsigned long st_ctime_nsec; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++struct stat64 { ++ unsigned long long st_dev; ++ unsigned char __pad0[4]; ++#define STAT64_HAS_BROKEN_ST_INO 1 ++ unsigned long __st_ino; ++ unsigned int st_mode; ++ unsigned int st_nlink; ++ unsigned long st_uid; ++ unsigned long st_gid; ++ unsigned long long st_rdev; ++ unsigned char __pad3[4]; ++ long long st_size; ++ unsigned long st_blksize; ++ unsigned long long st_blocks; ++ unsigned long st_atime; ++ unsigned long st_atime_nsec; ++ unsigned long st_mtime; ++ unsigned long st_mtime_nsec; ++ unsigned long st_ctime; ++ unsigned long st_ctime_nsec; ++ unsigned long long st_ino; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/statfs.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/statfs.h +new file mode 100644 +index 0000000..7e44ad1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/statfs.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASMARM_STATFS_H ++#define _ASMARM_STATFS_H ++#define ARCH_PACK_STATFS64 __attribute__((packed, aligned(4))) ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/swab.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/swab.h +new file mode 100644 +index 0000000..081a76e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/swab.h +@@ -0,0 +1,29 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_ARM_SWAB_H ++#define _UAPI__ASM_ARM_SWAB_H ++#include ++#include ++#ifndef __STRICT_ANSI__ ++#define __SWAB_64_THRU_32__ ++#endif ++#ifndef __thumb__ ++#endif ++#define __arch_swab32 __arch_swab32 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termbits.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termbits.h +new file mode 100644 +index 0000000..42af6fe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termbits.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termios.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termios.h +new file mode 100644 +index 0000000..feca4c6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/termios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/types.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/types.h +new file mode 100644 +index 0000000..461e485 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/types.h +@@ -0,0 +1,34 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_TYPES_H ++#define _UAPI_ASM_TYPES_H ++#include ++#ifdef __INT32_TYPE__ ++#undef __INT32_TYPE__ ++#define __INT32_TYPE__ int ++#endif ++#ifdef __UINT32_TYPE__ ++#undef __UINT32_TYPE__ ++#define __UINT32_TYPE__ unsigned int ++#endif ++#ifdef __UINTPTR_TYPE__ ++#undef __UINTPTR_TYPE__ ++#define __UINTPTR_TYPE__ unsigned long ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-common.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-common.h +new file mode 100644 +index 0000000..060d626 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-common.h +@@ -0,0 +1,415 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_ARM_UNISTD_COMMON_H ++#define _UAPI_ASM_ARM_UNISTD_COMMON_H 1 ++#define __NR_restart_syscall (__NR_SYSCALL_BASE + 0) ++#define __NR_exit (__NR_SYSCALL_BASE + 1) ++#define __NR_fork (__NR_SYSCALL_BASE + 2) ++#define __NR_read (__NR_SYSCALL_BASE + 3) ++#define __NR_write (__NR_SYSCALL_BASE + 4) ++#define __NR_open (__NR_SYSCALL_BASE + 5) ++#define __NR_close (__NR_SYSCALL_BASE + 6) ++#define __NR_creat (__NR_SYSCALL_BASE + 8) ++#define __NR_link (__NR_SYSCALL_BASE + 9) ++#define __NR_unlink (__NR_SYSCALL_BASE + 10) ++#define __NR_execve (__NR_SYSCALL_BASE + 11) ++#define __NR_chdir (__NR_SYSCALL_BASE + 12) ++#define __NR_mknod (__NR_SYSCALL_BASE + 14) ++#define __NR_chmod (__NR_SYSCALL_BASE + 15) ++#define __NR_lchown (__NR_SYSCALL_BASE + 16) ++#define __NR_lseek (__NR_SYSCALL_BASE + 19) ++#define __NR_getpid (__NR_SYSCALL_BASE + 20) ++#define __NR_mount (__NR_SYSCALL_BASE + 21) ++#define __NR_setuid (__NR_SYSCALL_BASE + 23) ++#define __NR_getuid (__NR_SYSCALL_BASE + 24) ++#define __NR_ptrace (__NR_SYSCALL_BASE + 26) ++#define __NR_pause (__NR_SYSCALL_BASE + 29) ++#define __NR_access (__NR_SYSCALL_BASE + 33) ++#define __NR_nice (__NR_SYSCALL_BASE + 34) ++#define __NR_sync (__NR_SYSCALL_BASE + 36) ++#define __NR_kill (__NR_SYSCALL_BASE + 37) ++#define __NR_rename (__NR_SYSCALL_BASE + 38) ++#define __NR_mkdir (__NR_SYSCALL_BASE + 39) ++#define __NR_rmdir (__NR_SYSCALL_BASE + 40) ++#define __NR_dup (__NR_SYSCALL_BASE + 41) ++#define __NR_pipe (__NR_SYSCALL_BASE + 42) ++#define __NR_times (__NR_SYSCALL_BASE + 43) ++#define __NR_brk (__NR_SYSCALL_BASE + 45) ++#define __NR_setgid (__NR_SYSCALL_BASE + 46) ++#define __NR_getgid (__NR_SYSCALL_BASE + 47) ++#define __NR_geteuid (__NR_SYSCALL_BASE + 49) ++#define __NR_getegid (__NR_SYSCALL_BASE + 50) ++#define __NR_acct (__NR_SYSCALL_BASE + 51) ++#define __NR_umount2 (__NR_SYSCALL_BASE + 52) ++#define __NR_ioctl (__NR_SYSCALL_BASE + 54) ++#define __NR_fcntl (__NR_SYSCALL_BASE + 55) ++#define __NR_setpgid (__NR_SYSCALL_BASE + 57) ++#define __NR_umask (__NR_SYSCALL_BASE + 60) ++#define __NR_chroot (__NR_SYSCALL_BASE + 61) ++#define __NR_ustat (__NR_SYSCALL_BASE + 62) ++#define __NR_dup2 (__NR_SYSCALL_BASE + 63) ++#define __NR_getppid (__NR_SYSCALL_BASE + 64) ++#define __NR_getpgrp (__NR_SYSCALL_BASE + 65) ++#define __NR_setsid (__NR_SYSCALL_BASE + 66) ++#define __NR_sigaction (__NR_SYSCALL_BASE + 67) ++#define __NR_setreuid (__NR_SYSCALL_BASE + 70) ++#define __NR_setregid (__NR_SYSCALL_BASE + 71) ++#define __NR_sigsuspend (__NR_SYSCALL_BASE + 72) ++#define __NR_sigpending (__NR_SYSCALL_BASE + 73) ++#define __NR_sethostname (__NR_SYSCALL_BASE + 74) ++#define __NR_setrlimit (__NR_SYSCALL_BASE + 75) ++#define __NR_getrusage (__NR_SYSCALL_BASE + 77) ++#define __NR_gettimeofday (__NR_SYSCALL_BASE + 78) ++#define __NR_settimeofday (__NR_SYSCALL_BASE + 79) ++#define __NR_getgroups (__NR_SYSCALL_BASE + 80) ++#define __NR_setgroups (__NR_SYSCALL_BASE + 81) ++#define __NR_symlink (__NR_SYSCALL_BASE + 83) ++#define __NR_readlink (__NR_SYSCALL_BASE + 85) ++#define __NR_uselib (__NR_SYSCALL_BASE + 86) ++#define __NR_swapon (__NR_SYSCALL_BASE + 87) ++#define __NR_reboot (__NR_SYSCALL_BASE + 88) ++#define __NR_munmap (__NR_SYSCALL_BASE + 91) ++#define __NR_truncate (__NR_SYSCALL_BASE + 92) ++#define __NR_ftruncate (__NR_SYSCALL_BASE + 93) ++#define __NR_fchmod (__NR_SYSCALL_BASE + 94) ++#define __NR_fchown (__NR_SYSCALL_BASE + 95) ++#define __NR_getpriority (__NR_SYSCALL_BASE + 96) ++#define __NR_setpriority (__NR_SYSCALL_BASE + 97) ++#define __NR_statfs (__NR_SYSCALL_BASE + 99) ++#define __NR_fstatfs (__NR_SYSCALL_BASE + 100) ++#define __NR_syslog (__NR_SYSCALL_BASE + 103) ++#define __NR_setitimer (__NR_SYSCALL_BASE + 104) ++#define __NR_getitimer (__NR_SYSCALL_BASE + 105) ++#define __NR_stat (__NR_SYSCALL_BASE + 106) ++#define __NR_lstat (__NR_SYSCALL_BASE + 107) ++#define __NR_fstat (__NR_SYSCALL_BASE + 108) ++#define __NR_vhangup (__NR_SYSCALL_BASE + 111) ++#define __NR_wait4 (__NR_SYSCALL_BASE + 114) ++#define __NR_swapoff (__NR_SYSCALL_BASE + 115) ++#define __NR_sysinfo (__NR_SYSCALL_BASE + 116) ++#define __NR_fsync (__NR_SYSCALL_BASE + 118) ++#define __NR_sigreturn (__NR_SYSCALL_BASE + 119) ++#define __NR_clone (__NR_SYSCALL_BASE + 120) ++#define __NR_setdomainname (__NR_SYSCALL_BASE + 121) ++#define __NR_uname (__NR_SYSCALL_BASE + 122) ++#define __NR_adjtimex (__NR_SYSCALL_BASE + 124) ++#define __NR_mprotect (__NR_SYSCALL_BASE + 125) ++#define __NR_sigprocmask (__NR_SYSCALL_BASE + 126) ++#define __NR_init_module (__NR_SYSCALL_BASE + 128) ++#define __NR_delete_module (__NR_SYSCALL_BASE + 129) ++#define __NR_quotactl (__NR_SYSCALL_BASE + 131) ++#define __NR_getpgid (__NR_SYSCALL_BASE + 132) ++#define __NR_fchdir (__NR_SYSCALL_BASE + 133) ++#define __NR_bdflush (__NR_SYSCALL_BASE + 134) ++#define __NR_sysfs (__NR_SYSCALL_BASE + 135) ++#define __NR_personality (__NR_SYSCALL_BASE + 136) ++#define __NR_setfsuid (__NR_SYSCALL_BASE + 138) ++#define __NR_setfsgid (__NR_SYSCALL_BASE + 139) ++#define __NR__llseek (__NR_SYSCALL_BASE + 140) ++#define __NR_getdents (__NR_SYSCALL_BASE + 141) ++#define __NR__newselect (__NR_SYSCALL_BASE + 142) ++#define __NR_flock (__NR_SYSCALL_BASE + 143) ++#define __NR_msync (__NR_SYSCALL_BASE + 144) ++#define __NR_readv (__NR_SYSCALL_BASE + 145) ++#define __NR_writev (__NR_SYSCALL_BASE + 146) ++#define __NR_getsid (__NR_SYSCALL_BASE + 147) ++#define __NR_fdatasync (__NR_SYSCALL_BASE + 148) ++#define __NR__sysctl (__NR_SYSCALL_BASE + 149) ++#define __NR_mlock (__NR_SYSCALL_BASE + 150) ++#define __NR_munlock (__NR_SYSCALL_BASE + 151) ++#define __NR_mlockall (__NR_SYSCALL_BASE + 152) ++#define __NR_munlockall (__NR_SYSCALL_BASE + 153) ++#define __NR_sched_setparam (__NR_SYSCALL_BASE + 154) ++#define __NR_sched_getparam (__NR_SYSCALL_BASE + 155) ++#define __NR_sched_setscheduler (__NR_SYSCALL_BASE + 156) ++#define __NR_sched_getscheduler (__NR_SYSCALL_BASE + 157) ++#define __NR_sched_yield (__NR_SYSCALL_BASE + 158) ++#define __NR_sched_get_priority_max (__NR_SYSCALL_BASE + 159) ++#define __NR_sched_get_priority_min (__NR_SYSCALL_BASE + 160) ++#define __NR_sched_rr_get_interval (__NR_SYSCALL_BASE + 161) ++#define __NR_nanosleep (__NR_SYSCALL_BASE + 162) ++#define __NR_mremap (__NR_SYSCALL_BASE + 163) ++#define __NR_setresuid (__NR_SYSCALL_BASE + 164) ++#define __NR_getresuid (__NR_SYSCALL_BASE + 165) ++#define __NR_poll (__NR_SYSCALL_BASE + 168) ++#define __NR_nfsservctl (__NR_SYSCALL_BASE + 169) ++#define __NR_setresgid (__NR_SYSCALL_BASE + 170) ++#define __NR_getresgid (__NR_SYSCALL_BASE + 171) ++#define __NR_prctl (__NR_SYSCALL_BASE + 172) ++#define __NR_rt_sigreturn (__NR_SYSCALL_BASE + 173) ++#define __NR_rt_sigaction (__NR_SYSCALL_BASE + 174) ++#define __NR_rt_sigprocmask (__NR_SYSCALL_BASE + 175) ++#define __NR_rt_sigpending (__NR_SYSCALL_BASE + 176) ++#define __NR_rt_sigtimedwait (__NR_SYSCALL_BASE + 177) ++#define __NR_rt_sigqueueinfo (__NR_SYSCALL_BASE + 178) ++#define __NR_rt_sigsuspend (__NR_SYSCALL_BASE + 179) ++#define __NR_pread64 (__NR_SYSCALL_BASE + 180) ++#define __NR_pwrite64 (__NR_SYSCALL_BASE + 181) ++#define __NR_chown (__NR_SYSCALL_BASE + 182) ++#define __NR_getcwd (__NR_SYSCALL_BASE + 183) ++#define __NR_capget (__NR_SYSCALL_BASE + 184) ++#define __NR_capset (__NR_SYSCALL_BASE + 185) ++#define __NR_sigaltstack (__NR_SYSCALL_BASE + 186) ++#define __NR_sendfile (__NR_SYSCALL_BASE + 187) ++#define __NR_vfork (__NR_SYSCALL_BASE + 190) ++#define __NR_ugetrlimit (__NR_SYSCALL_BASE + 191) ++#define __NR_mmap2 (__NR_SYSCALL_BASE + 192) ++#define __NR_truncate64 (__NR_SYSCALL_BASE + 193) ++#define __NR_ftruncate64 (__NR_SYSCALL_BASE + 194) ++#define __NR_stat64 (__NR_SYSCALL_BASE + 195) ++#define __NR_lstat64 (__NR_SYSCALL_BASE + 196) ++#define __NR_fstat64 (__NR_SYSCALL_BASE + 197) ++#define __NR_lchown32 (__NR_SYSCALL_BASE + 198) ++#define __NR_getuid32 (__NR_SYSCALL_BASE + 199) ++#define __NR_getgid32 (__NR_SYSCALL_BASE + 200) ++#define __NR_geteuid32 (__NR_SYSCALL_BASE + 201) ++#define __NR_getegid32 (__NR_SYSCALL_BASE + 202) ++#define __NR_setreuid32 (__NR_SYSCALL_BASE + 203) ++#define __NR_setregid32 (__NR_SYSCALL_BASE + 204) ++#define __NR_getgroups32 (__NR_SYSCALL_BASE + 205) ++#define __NR_setgroups32 (__NR_SYSCALL_BASE + 206) ++#define __NR_fchown32 (__NR_SYSCALL_BASE + 207) ++#define __NR_setresuid32 (__NR_SYSCALL_BASE + 208) ++#define __NR_getresuid32 (__NR_SYSCALL_BASE + 209) ++#define __NR_setresgid32 (__NR_SYSCALL_BASE + 210) ++#define __NR_getresgid32 (__NR_SYSCALL_BASE + 211) ++#define __NR_chown32 (__NR_SYSCALL_BASE + 212) ++#define __NR_setuid32 (__NR_SYSCALL_BASE + 213) ++#define __NR_setgid32 (__NR_SYSCALL_BASE + 214) ++#define __NR_setfsuid32 (__NR_SYSCALL_BASE + 215) ++#define __NR_setfsgid32 (__NR_SYSCALL_BASE + 216) ++#define __NR_getdents64 (__NR_SYSCALL_BASE + 217) ++#define __NR_pivot_root (__NR_SYSCALL_BASE + 218) ++#define __NR_mincore (__NR_SYSCALL_BASE + 219) ++#define __NR_madvise (__NR_SYSCALL_BASE + 220) ++#define __NR_fcntl64 (__NR_SYSCALL_BASE + 221) ++#define __NR_gettid (__NR_SYSCALL_BASE + 224) ++#define __NR_readahead (__NR_SYSCALL_BASE + 225) ++#define __NR_setxattr (__NR_SYSCALL_BASE + 226) ++#define __NR_lsetxattr (__NR_SYSCALL_BASE + 227) ++#define __NR_fsetxattr (__NR_SYSCALL_BASE + 228) ++#define __NR_getxattr (__NR_SYSCALL_BASE + 229) ++#define __NR_lgetxattr (__NR_SYSCALL_BASE + 230) ++#define __NR_fgetxattr (__NR_SYSCALL_BASE + 231) ++#define __NR_listxattr (__NR_SYSCALL_BASE + 232) ++#define __NR_llistxattr (__NR_SYSCALL_BASE + 233) ++#define __NR_flistxattr (__NR_SYSCALL_BASE + 234) ++#define __NR_removexattr (__NR_SYSCALL_BASE + 235) ++#define __NR_lremovexattr (__NR_SYSCALL_BASE + 236) ++#define __NR_fremovexattr (__NR_SYSCALL_BASE + 237) ++#define __NR_tkill (__NR_SYSCALL_BASE + 238) ++#define __NR_sendfile64 (__NR_SYSCALL_BASE + 239) ++#define __NR_futex (__NR_SYSCALL_BASE + 240) ++#define __NR_sched_setaffinity (__NR_SYSCALL_BASE + 241) ++#define __NR_sched_getaffinity (__NR_SYSCALL_BASE + 242) ++#define __NR_io_setup (__NR_SYSCALL_BASE + 243) ++#define __NR_io_destroy (__NR_SYSCALL_BASE + 244) ++#define __NR_io_getevents (__NR_SYSCALL_BASE + 245) ++#define __NR_io_submit (__NR_SYSCALL_BASE + 246) ++#define __NR_io_cancel (__NR_SYSCALL_BASE + 247) ++#define __NR_exit_group (__NR_SYSCALL_BASE + 248) ++#define __NR_lookup_dcookie (__NR_SYSCALL_BASE + 249) ++#define __NR_epoll_create (__NR_SYSCALL_BASE + 250) ++#define __NR_epoll_ctl (__NR_SYSCALL_BASE + 251) ++#define __NR_epoll_wait (__NR_SYSCALL_BASE + 252) ++#define __NR_remap_file_pages (__NR_SYSCALL_BASE + 253) ++#define __NR_set_tid_address (__NR_SYSCALL_BASE + 256) ++#define __NR_timer_create (__NR_SYSCALL_BASE + 257) ++#define __NR_timer_settime (__NR_SYSCALL_BASE + 258) ++#define __NR_timer_gettime (__NR_SYSCALL_BASE + 259) ++#define __NR_timer_getoverrun (__NR_SYSCALL_BASE + 260) ++#define __NR_timer_delete (__NR_SYSCALL_BASE + 261) ++#define __NR_clock_settime (__NR_SYSCALL_BASE + 262) ++#define __NR_clock_gettime (__NR_SYSCALL_BASE + 263) ++#define __NR_clock_getres (__NR_SYSCALL_BASE + 264) ++#define __NR_clock_nanosleep (__NR_SYSCALL_BASE + 265) ++#define __NR_statfs64 (__NR_SYSCALL_BASE + 266) ++#define __NR_fstatfs64 (__NR_SYSCALL_BASE + 267) ++#define __NR_tgkill (__NR_SYSCALL_BASE + 268) ++#define __NR_utimes (__NR_SYSCALL_BASE + 269) ++#define __NR_arm_fadvise64_64 (__NR_SYSCALL_BASE + 270) ++#define __NR_pciconfig_iobase (__NR_SYSCALL_BASE + 271) ++#define __NR_pciconfig_read (__NR_SYSCALL_BASE + 272) ++#define __NR_pciconfig_write (__NR_SYSCALL_BASE + 273) ++#define __NR_mq_open (__NR_SYSCALL_BASE + 274) ++#define __NR_mq_unlink (__NR_SYSCALL_BASE + 275) ++#define __NR_mq_timedsend (__NR_SYSCALL_BASE + 276) ++#define __NR_mq_timedreceive (__NR_SYSCALL_BASE + 277) ++#define __NR_mq_notify (__NR_SYSCALL_BASE + 278) ++#define __NR_mq_getsetattr (__NR_SYSCALL_BASE + 279) ++#define __NR_waitid (__NR_SYSCALL_BASE + 280) ++#define __NR_socket (__NR_SYSCALL_BASE + 281) ++#define __NR_bind (__NR_SYSCALL_BASE + 282) ++#define __NR_connect (__NR_SYSCALL_BASE + 283) ++#define __NR_listen (__NR_SYSCALL_BASE + 284) ++#define __NR_accept (__NR_SYSCALL_BASE + 285) ++#define __NR_getsockname (__NR_SYSCALL_BASE + 286) ++#define __NR_getpeername (__NR_SYSCALL_BASE + 287) ++#define __NR_socketpair (__NR_SYSCALL_BASE + 288) ++#define __NR_send (__NR_SYSCALL_BASE + 289) ++#define __NR_sendto (__NR_SYSCALL_BASE + 290) ++#define __NR_recv (__NR_SYSCALL_BASE + 291) ++#define __NR_recvfrom (__NR_SYSCALL_BASE + 292) ++#define __NR_shutdown (__NR_SYSCALL_BASE + 293) ++#define __NR_setsockopt (__NR_SYSCALL_BASE + 294) ++#define __NR_getsockopt (__NR_SYSCALL_BASE + 295) ++#define __NR_sendmsg (__NR_SYSCALL_BASE + 296) ++#define __NR_recvmsg (__NR_SYSCALL_BASE + 297) ++#define __NR_semop (__NR_SYSCALL_BASE + 298) ++#define __NR_semget (__NR_SYSCALL_BASE + 299) ++#define __NR_semctl (__NR_SYSCALL_BASE + 300) ++#define __NR_msgsnd (__NR_SYSCALL_BASE + 301) ++#define __NR_msgrcv (__NR_SYSCALL_BASE + 302) ++#define __NR_msgget (__NR_SYSCALL_BASE + 303) ++#define __NR_msgctl (__NR_SYSCALL_BASE + 304) ++#define __NR_shmat (__NR_SYSCALL_BASE + 305) ++#define __NR_shmdt (__NR_SYSCALL_BASE + 306) ++#define __NR_shmget (__NR_SYSCALL_BASE + 307) ++#define __NR_shmctl (__NR_SYSCALL_BASE + 308) ++#define __NR_add_key (__NR_SYSCALL_BASE + 309) ++#define __NR_request_key (__NR_SYSCALL_BASE + 310) ++#define __NR_keyctl (__NR_SYSCALL_BASE + 311) ++#define __NR_semtimedop (__NR_SYSCALL_BASE + 312) ++#define __NR_vserver (__NR_SYSCALL_BASE + 313) ++#define __NR_ioprio_set (__NR_SYSCALL_BASE + 314) ++#define __NR_ioprio_get (__NR_SYSCALL_BASE + 315) ++#define __NR_inotify_init (__NR_SYSCALL_BASE + 316) ++#define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317) ++#define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318) ++#define __NR_mbind (__NR_SYSCALL_BASE + 319) ++#define __NR_get_mempolicy (__NR_SYSCALL_BASE + 320) ++#define __NR_set_mempolicy (__NR_SYSCALL_BASE + 321) ++#define __NR_openat (__NR_SYSCALL_BASE + 322) ++#define __NR_mkdirat (__NR_SYSCALL_BASE + 323) ++#define __NR_mknodat (__NR_SYSCALL_BASE + 324) ++#define __NR_fchownat (__NR_SYSCALL_BASE + 325) ++#define __NR_futimesat (__NR_SYSCALL_BASE + 326) ++#define __NR_fstatat64 (__NR_SYSCALL_BASE + 327) ++#define __NR_unlinkat (__NR_SYSCALL_BASE + 328) ++#define __NR_renameat (__NR_SYSCALL_BASE + 329) ++#define __NR_linkat (__NR_SYSCALL_BASE + 330) ++#define __NR_symlinkat (__NR_SYSCALL_BASE + 331) ++#define __NR_readlinkat (__NR_SYSCALL_BASE + 332) ++#define __NR_fchmodat (__NR_SYSCALL_BASE + 333) ++#define __NR_faccessat (__NR_SYSCALL_BASE + 334) ++#define __NR_pselect6 (__NR_SYSCALL_BASE + 335) ++#define __NR_ppoll (__NR_SYSCALL_BASE + 336) ++#define __NR_unshare (__NR_SYSCALL_BASE + 337) ++#define __NR_set_robust_list (__NR_SYSCALL_BASE + 338) ++#define __NR_get_robust_list (__NR_SYSCALL_BASE + 339) ++#define __NR_splice (__NR_SYSCALL_BASE + 340) ++#define __NR_arm_sync_file_range (__NR_SYSCALL_BASE + 341) ++#define __NR_tee (__NR_SYSCALL_BASE + 342) ++#define __NR_vmsplice (__NR_SYSCALL_BASE + 343) ++#define __NR_move_pages (__NR_SYSCALL_BASE + 344) ++#define __NR_getcpu (__NR_SYSCALL_BASE + 345) ++#define __NR_epoll_pwait (__NR_SYSCALL_BASE + 346) ++#define __NR_kexec_load (__NR_SYSCALL_BASE + 347) ++#define __NR_utimensat (__NR_SYSCALL_BASE + 348) ++#define __NR_signalfd (__NR_SYSCALL_BASE + 349) ++#define __NR_timerfd_create (__NR_SYSCALL_BASE + 350) ++#define __NR_eventfd (__NR_SYSCALL_BASE + 351) ++#define __NR_fallocate (__NR_SYSCALL_BASE + 352) ++#define __NR_timerfd_settime (__NR_SYSCALL_BASE + 353) ++#define __NR_timerfd_gettime (__NR_SYSCALL_BASE + 354) ++#define __NR_signalfd4 (__NR_SYSCALL_BASE + 355) ++#define __NR_eventfd2 (__NR_SYSCALL_BASE + 356) ++#define __NR_epoll_create1 (__NR_SYSCALL_BASE + 357) ++#define __NR_dup3 (__NR_SYSCALL_BASE + 358) ++#define __NR_pipe2 (__NR_SYSCALL_BASE + 359) ++#define __NR_inotify_init1 (__NR_SYSCALL_BASE + 360) ++#define __NR_preadv (__NR_SYSCALL_BASE + 361) ++#define __NR_pwritev (__NR_SYSCALL_BASE + 362) ++#define __NR_rt_tgsigqueueinfo (__NR_SYSCALL_BASE + 363) ++#define __NR_perf_event_open (__NR_SYSCALL_BASE + 364) ++#define __NR_recvmmsg (__NR_SYSCALL_BASE + 365) ++#define __NR_accept4 (__NR_SYSCALL_BASE + 366) ++#define __NR_fanotify_init (__NR_SYSCALL_BASE + 367) ++#define __NR_fanotify_mark (__NR_SYSCALL_BASE + 368) ++#define __NR_prlimit64 (__NR_SYSCALL_BASE + 369) ++#define __NR_name_to_handle_at (__NR_SYSCALL_BASE + 370) ++#define __NR_open_by_handle_at (__NR_SYSCALL_BASE + 371) ++#define __NR_clock_adjtime (__NR_SYSCALL_BASE + 372) ++#define __NR_syncfs (__NR_SYSCALL_BASE + 373) ++#define __NR_sendmmsg (__NR_SYSCALL_BASE + 374) ++#define __NR_setns (__NR_SYSCALL_BASE + 375) ++#define __NR_process_vm_readv (__NR_SYSCALL_BASE + 376) ++#define __NR_process_vm_writev (__NR_SYSCALL_BASE + 377) ++#define __NR_kcmp (__NR_SYSCALL_BASE + 378) ++#define __NR_finit_module (__NR_SYSCALL_BASE + 379) ++#define __NR_sched_setattr (__NR_SYSCALL_BASE + 380) ++#define __NR_sched_getattr (__NR_SYSCALL_BASE + 381) ++#define __NR_renameat2 (__NR_SYSCALL_BASE + 382) ++#define __NR_seccomp (__NR_SYSCALL_BASE + 383) ++#define __NR_getrandom (__NR_SYSCALL_BASE + 384) ++#define __NR_memfd_create (__NR_SYSCALL_BASE + 385) ++#define __NR_bpf (__NR_SYSCALL_BASE + 386) ++#define __NR_execveat (__NR_SYSCALL_BASE + 387) ++#define __NR_userfaultfd (__NR_SYSCALL_BASE + 388) ++#define __NR_membarrier (__NR_SYSCALL_BASE + 389) ++#define __NR_mlock2 (__NR_SYSCALL_BASE + 390) ++#define __NR_copy_file_range (__NR_SYSCALL_BASE + 391) ++#define __NR_preadv2 (__NR_SYSCALL_BASE + 392) ++#define __NR_pwritev2 (__NR_SYSCALL_BASE + 393) ++#define __NR_pkey_mprotect (__NR_SYSCALL_BASE + 394) ++#define __NR_pkey_alloc (__NR_SYSCALL_BASE + 395) ++#define __NR_pkey_free (__NR_SYSCALL_BASE + 396) ++#define __NR_statx (__NR_SYSCALL_BASE + 397) ++#define __NR_rseq (__NR_SYSCALL_BASE + 398) ++#define __NR_io_pgetevents (__NR_SYSCALL_BASE + 399) ++#define __NR_migrate_pages (__NR_SYSCALL_BASE + 400) ++#define __NR_kexec_file_load (__NR_SYSCALL_BASE + 401) ++#define __NR_clock_gettime64 (__NR_SYSCALL_BASE + 403) ++#define __NR_clock_settime64 (__NR_SYSCALL_BASE + 404) ++#define __NR_clock_adjtime64 (__NR_SYSCALL_BASE + 405) ++#define __NR_clock_getres_time64 (__NR_SYSCALL_BASE + 406) ++#define __NR_clock_nanosleep_time64 (__NR_SYSCALL_BASE + 407) ++#define __NR_timer_gettime64 (__NR_SYSCALL_BASE + 408) ++#define __NR_timer_settime64 (__NR_SYSCALL_BASE + 409) ++#define __NR_timerfd_gettime64 (__NR_SYSCALL_BASE + 410) ++#define __NR_timerfd_settime64 (__NR_SYSCALL_BASE + 411) ++#define __NR_utimensat_time64 (__NR_SYSCALL_BASE + 412) ++#define __NR_pselect6_time64 (__NR_SYSCALL_BASE + 413) ++#define __NR_ppoll_time64 (__NR_SYSCALL_BASE + 414) ++#define __NR_io_pgetevents_time64 (__NR_SYSCALL_BASE + 416) ++#define __NR_recvmmsg_time64 (__NR_SYSCALL_BASE + 417) ++#define __NR_mq_timedsend_time64 (__NR_SYSCALL_BASE + 418) ++#define __NR_mq_timedreceive_time64 (__NR_SYSCALL_BASE + 419) ++#define __NR_semtimedop_time64 (__NR_SYSCALL_BASE + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_SYSCALL_BASE + 421) ++#define __NR_futex_time64 (__NR_SYSCALL_BASE + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_SYSCALL_BASE + 423) ++#define __NR_pidfd_send_signal (__NR_SYSCALL_BASE + 424) ++#define __NR_io_uring_setup (__NR_SYSCALL_BASE + 425) ++#define __NR_io_uring_enter (__NR_SYSCALL_BASE + 426) ++#define __NR_io_uring_register (__NR_SYSCALL_BASE + 427) ++#define __NR_open_tree (__NR_SYSCALL_BASE + 428) ++#define __NR_move_mount (__NR_SYSCALL_BASE + 429) ++#define __NR_fsopen (__NR_SYSCALL_BASE + 430) ++#define __NR_fsconfig (__NR_SYSCALL_BASE + 431) ++#define __NR_fsmount (__NR_SYSCALL_BASE + 432) ++#define __NR_fspick (__NR_SYSCALL_BASE + 433) ++#define __NR_pidfd_open (__NR_SYSCALL_BASE + 434) ++#define __NR_clone3 (__NR_SYSCALL_BASE + 435) ++#define __NR_close_range (__NR_SYSCALL_BASE + 436) ++#define __NR_openat2 (__NR_SYSCALL_BASE + 437) ++#define __NR_pidfd_getfd (__NR_SYSCALL_BASE + 438) ++#define __NR_faccessat2 (__NR_SYSCALL_BASE + 439) ++#define __NR_process_madvise (__NR_SYSCALL_BASE + 440) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-eabi.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-eabi.h +new file mode 100644 +index 0000000..54e1867 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-eabi.h +@@ -0,0 +1,21 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_ARM_UNISTD_EABI_H ++#define _UAPI_ASM_ARM_UNISTD_EABI_H 1 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-oabi.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-oabi.h +new file mode 100644 +index 0000000..d2633e8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd-oabi.h +@@ -0,0 +1,33 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_ARM_UNISTD_OABI_H ++#define _UAPI_ASM_ARM_UNISTD_OABI_H 1 ++#define __NR_time (__NR_SYSCALL_BASE + 13) ++#define __NR_umount (__NR_SYSCALL_BASE + 22) ++#define __NR_stime (__NR_SYSCALL_BASE + 25) ++#define __NR_alarm (__NR_SYSCALL_BASE + 27) ++#define __NR_utime (__NR_SYSCALL_BASE + 30) ++#define __NR_getrlimit (__NR_SYSCALL_BASE + 76) ++#define __NR_select (__NR_SYSCALL_BASE + 82) ++#define __NR_readdir (__NR_SYSCALL_BASE + 89) ++#define __NR_mmap (__NR_SYSCALL_BASE + 90) ++#define __NR_socketcall (__NR_SYSCALL_BASE + 102) ++#define __NR_syscall (__NR_SYSCALL_BASE + 113) ++#define __NR_ipc (__NR_SYSCALL_BASE + 117) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd.h +new file mode 100644 +index 0000000..f4b1f3a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/asm/unistd.h +@@ -0,0 +1,33 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_ARM_UNISTD_H ++#define _UAPI__ASM_ARM_UNISTD_H ++#define __NR_OABI_SYSCALL_BASE 0x900000 ++#define __NR_SYSCALL_BASE 0 ++#include ++#include ++#define __NR_sync_file_range2 __NR_arm_sync_file_range ++#define __ARM_NR_BASE (__NR_SYSCALL_BASE + 0x0f0000) ++#define __ARM_NR_breakpoint (__ARM_NR_BASE + 1) ++#define __ARM_NR_cacheflush (__ARM_NR_BASE + 2) ++#define __ARM_NR_usr26 (__ARM_NR_BASE + 3) ++#define __ARM_NR_usr32 (__ARM_NR_BASE + 4) ++#define __ARM_NR_set_tls (__ARM_NR_BASE + 5) ++#define __ARM_NR_get_tls (__ARM_NR_BASE + 6) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/alltypes.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/alltypes.h +new file mode 100644 +index 0000000..2bc88cd +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/alltypes.h +@@ -0,0 +1,408 @@ ++#define _REDIR_TIME64 1 ++#define _Addr int ++#define _Int64 long long ++#define _Reg int ++ ++#if __ARMEB__ ++#define __BYTE_ORDER 4321 ++#else ++#define __BYTE_ORDER 1234 ++#endif ++ ++#define __LONG_MAX 0x7fffffffL ++ ++#ifndef __cplusplus ++#if defined(__NEED_wchar_t) && !defined(__DEFINED_wchar_t) ++typedef unsigned wchar_t; ++#define __DEFINED_wchar_t ++#endif ++ ++#endif ++ ++#if defined(__NEED_float_t) && !defined(__DEFINED_float_t) ++typedef float float_t; ++#define __DEFINED_float_t ++#endif ++ ++#if defined(__NEED_double_t) && !defined(__DEFINED_double_t) ++typedef double double_t; ++#define __DEFINED_double_t ++#endif ++ ++ ++#if defined(__NEED_max_align_t) && !defined(__DEFINED_max_align_t) ++typedef struct { long long __ll; long double __ld; } max_align_t; ++#define __DEFINED_max_align_t ++#endif ++ ++#define __LITTLE_ENDIAN 1234 ++#define __BIG_ENDIAN 4321 ++#define __USE_TIME_BITS64 1 ++ ++#if defined(__NEED_size_t) && !defined(__DEFINED_size_t) ++typedef unsigned _Addr size_t; ++#define __DEFINED_size_t ++#endif ++ ++#if defined(__NEED_uintptr_t) && !defined(__DEFINED_uintptr_t) ++typedef unsigned _Addr uintptr_t; ++#define __DEFINED_uintptr_t ++#endif ++ ++#if defined(__NEED_ptrdiff_t) && !defined(__DEFINED_ptrdiff_t) ++typedef _Addr ptrdiff_t; ++#define __DEFINED_ptrdiff_t ++#endif ++ ++#if defined(__NEED_ssize_t) && !defined(__DEFINED_ssize_t) ++typedef _Addr ssize_t; ++#define __DEFINED_ssize_t ++#endif ++ ++#if defined(__NEED_intptr_t) && !defined(__DEFINED_intptr_t) ++typedef _Addr intptr_t; ++#define __DEFINED_intptr_t ++#endif ++ ++#if defined(__NEED_regoff_t) && !defined(__DEFINED_regoff_t) ++typedef _Addr regoff_t; ++#define __DEFINED_regoff_t ++#endif ++ ++#if defined(__NEED_register_t) && !defined(__DEFINED_register_t) ++typedef _Reg register_t; ++#define __DEFINED_register_t ++#endif ++ ++#if defined(__NEED_time_t) && !defined(__DEFINED_time_t) ++typedef _Int64 time_t; ++#define __DEFINED_time_t ++#endif ++ ++#if defined(__NEED_suseconds_t) && !defined(__DEFINED_suseconds_t) ++typedef _Int64 suseconds_t; ++#define __DEFINED_suseconds_t ++#endif ++ ++ ++#if defined(__NEED_int8_t) && !defined(__DEFINED_int8_t) ++typedef signed char int8_t; ++#define __DEFINED_int8_t ++#endif ++ ++#if defined(__NEED_int16_t) && !defined(__DEFINED_int16_t) ++typedef signed short int16_t; ++#define __DEFINED_int16_t ++#endif ++ ++#if defined(__NEED_int32_t) && !defined(__DEFINED_int32_t) ++typedef signed int int32_t; ++#define __DEFINED_int32_t ++#endif ++ ++#if defined(__NEED_int64_t) && !defined(__DEFINED_int64_t) ++typedef signed _Int64 int64_t; ++#define __DEFINED_int64_t ++#endif ++ ++#if defined(__NEED_intmax_t) && !defined(__DEFINED_intmax_t) ++typedef signed _Int64 intmax_t; ++#define __DEFINED_intmax_t ++#endif ++ ++#if defined(__NEED_uint8_t) && !defined(__DEFINED_uint8_t) ++typedef unsigned char uint8_t; ++#define __DEFINED_uint8_t ++#endif ++ ++#if defined(__NEED_uint16_t) && !defined(__DEFINED_uint16_t) ++typedef unsigned short uint16_t; ++#define __DEFINED_uint16_t ++#endif ++ ++#if defined(__NEED_uint32_t) && !defined(__DEFINED_uint32_t) ++typedef unsigned int uint32_t; ++#define __DEFINED_uint32_t ++#endif ++ ++#if defined(__NEED_uint64_t) && !defined(__DEFINED_uint64_t) ++typedef unsigned _Int64 uint64_t; ++#define __DEFINED_uint64_t ++#endif ++ ++#if defined(__NEED_u_int64_t) && !defined(__DEFINED_u_int64_t) ++typedef unsigned _Int64 u_int64_t; ++#define __DEFINED_u_int64_t ++#endif ++ ++#if defined(__NEED_uintmax_t) && !defined(__DEFINED_uintmax_t) ++typedef unsigned _Int64 uintmax_t; ++#define __DEFINED_uintmax_t ++#endif ++ ++ ++#if defined(__NEED_mode_t) && !defined(__DEFINED_mode_t) ++typedef unsigned mode_t; ++#define __DEFINED_mode_t ++#endif ++ ++#if defined(__NEED_nlink_t) && !defined(__DEFINED_nlink_t) ++typedef unsigned _Reg nlink_t; ++#define __DEFINED_nlink_t ++#endif ++ ++#if defined(__NEED_off_t) && !defined(__DEFINED_off_t) ++typedef _Int64 off_t; ++#define __DEFINED_off_t ++#endif ++ ++#if defined(__NEED_ino_t) && !defined(__DEFINED_ino_t) ++typedef unsigned _Int64 ino_t; ++#define __DEFINED_ino_t ++#endif ++ ++#if defined(__NEED_dev_t) && !defined(__DEFINED_dev_t) ++typedef unsigned _Int64 dev_t; ++#define __DEFINED_dev_t ++#endif ++ ++#if defined(__NEED_blksize_t) && !defined(__DEFINED_blksize_t) ++typedef long blksize_t; ++#define __DEFINED_blksize_t ++#endif ++ ++#if defined(__NEED_blkcnt_t) && !defined(__DEFINED_blkcnt_t) ++typedef _Int64 blkcnt_t; ++#define __DEFINED_blkcnt_t ++#endif ++ ++#if defined(__NEED_fsblkcnt_t) && !defined(__DEFINED_fsblkcnt_t) ++typedef unsigned _Int64 fsblkcnt_t; ++#define __DEFINED_fsblkcnt_t ++#endif ++ ++#if defined(__NEED_fsfilcnt_t) && !defined(__DEFINED_fsfilcnt_t) ++typedef unsigned _Int64 fsfilcnt_t; ++#define __DEFINED_fsfilcnt_t ++#endif ++ ++ ++#if defined(__NEED_wint_t) && !defined(__DEFINED_wint_t) ++typedef unsigned wint_t; ++#define __DEFINED_wint_t ++#endif ++ ++#if defined(__NEED_wctype_t) && !defined(__DEFINED_wctype_t) ++typedef unsigned long wctype_t; ++#define __DEFINED_wctype_t ++#endif ++ ++ ++#if defined(__NEED_timer_t) && !defined(__DEFINED_timer_t) ++typedef void * timer_t; ++#define __DEFINED_timer_t ++#endif ++ ++#if defined(__NEED_clockid_t) && !defined(__DEFINED_clockid_t) ++typedef int clockid_t; ++#define __DEFINED_clockid_t ++#endif ++ ++#if defined(__NEED_clock_t) && !defined(__DEFINED_clock_t) ++typedef long clock_t; ++#define __DEFINED_clock_t ++#endif ++ ++#if defined(__NEED_struct_timeval) && !defined(__DEFINED_struct_timeval) ++struct timeval { time_t tv_sec; suseconds_t tv_usec; }; ++#define __DEFINED_struct_timeval ++#endif ++ ++#if defined(__NEED_struct_timespec) && !defined(__DEFINED_struct_timespec) ++struct timespec { time_t tv_sec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER==4321); long tv_nsec; int :8*(sizeof(time_t)-sizeof(long))*(__BYTE_ORDER!=4321); }; ++#define __DEFINED_struct_timespec ++#endif ++ ++ ++#if defined(__NEED_pid_t) && !defined(__DEFINED_pid_t) ++typedef int pid_t; ++#define __DEFINED_pid_t ++#endif ++ ++#if defined(__NEED_id_t) && !defined(__DEFINED_id_t) ++typedef unsigned id_t; ++#define __DEFINED_id_t ++#endif ++ ++#if defined(__NEED_uid_t) && !defined(__DEFINED_uid_t) ++typedef unsigned uid_t; ++#define __DEFINED_uid_t ++#endif ++ ++#if defined(__NEED_gid_t) && !defined(__DEFINED_gid_t) ++typedef unsigned gid_t; ++#define __DEFINED_gid_t ++#endif ++ ++#if defined(__NEED_key_t) && !defined(__DEFINED_key_t) ++typedef int key_t; ++#define __DEFINED_key_t ++#endif ++ ++#if defined(__NEED_useconds_t) && !defined(__DEFINED_useconds_t) ++typedef unsigned useconds_t; ++#define __DEFINED_useconds_t ++#endif ++ ++ ++#ifdef __cplusplus ++#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) ++typedef unsigned long pthread_t; ++#define __DEFINED_pthread_t ++#endif ++ ++#else ++#if defined(__NEED_pthread_t) && !defined(__DEFINED_pthread_t) ++typedef struct __pthread * pthread_t; ++#define __DEFINED_pthread_t ++#endif ++ ++#endif ++#if defined(__NEED_pthread_once_t) && !defined(__DEFINED_pthread_once_t) ++typedef int pthread_once_t; ++#define __DEFINED_pthread_once_t ++#endif ++ ++#if defined(__NEED_pthread_key_t) && !defined(__DEFINED_pthread_key_t) ++typedef unsigned pthread_key_t; ++#define __DEFINED_pthread_key_t ++#endif ++ ++#if defined(__NEED_pthread_spinlock_t) && !defined(__DEFINED_pthread_spinlock_t) ++typedef int pthread_spinlock_t; ++#define __DEFINED_pthread_spinlock_t ++#endif ++ ++#if defined(__NEED_pthread_mutexattr_t) && !defined(__DEFINED_pthread_mutexattr_t) ++typedef struct { unsigned __attr; } pthread_mutexattr_t; ++#define __DEFINED_pthread_mutexattr_t ++#endif ++ ++#if defined(__NEED_pthread_condattr_t) && !defined(__DEFINED_pthread_condattr_t) ++typedef struct { unsigned __attr; } pthread_condattr_t; ++#define __DEFINED_pthread_condattr_t ++#endif ++ ++#if defined(__NEED_pthread_barrierattr_t) && !defined(__DEFINED_pthread_barrierattr_t) ++typedef struct { unsigned __attr; } pthread_barrierattr_t; ++#define __DEFINED_pthread_barrierattr_t ++#endif ++ ++#if defined(__NEED_pthread_rwlockattr_t) && !defined(__DEFINED_pthread_rwlockattr_t) ++typedef struct { unsigned __attr[2]; } pthread_rwlockattr_t; ++#define __DEFINED_pthread_rwlockattr_t ++#endif ++ ++ ++#if defined(__NEED_struct__IO_FILE) && !defined(__DEFINED_struct__IO_FILE) ++struct _IO_FILE { char __x; }; ++#define __DEFINED_struct__IO_FILE ++#endif ++ ++#if defined(__NEED_FILE) && !defined(__DEFINED_FILE) ++typedef struct _IO_FILE FILE; ++#define __DEFINED_FILE ++#endif ++ ++ ++#if defined(__NEED_va_list) && !defined(__DEFINED_va_list) ++typedef __builtin_va_list va_list; ++#define __DEFINED_va_list ++#endif ++ ++#if defined(__NEED___isoc_va_list) && !defined(__DEFINED___isoc_va_list) ++typedef __builtin_va_list __isoc_va_list; ++#define __DEFINED___isoc_va_list ++#endif ++ ++ ++#if defined(__NEED_mbstate_t) && !defined(__DEFINED_mbstate_t) ++typedef struct __mbstate_t { unsigned __opaque1, __opaque2; } mbstate_t; ++#define __DEFINED_mbstate_t ++#endif ++ ++ ++#if defined(__NEED_locale_t) && !defined(__DEFINED_locale_t) ++typedef struct __locale_struct * locale_t; ++#define __DEFINED_locale_t ++#endif ++ ++ ++#if defined(__NEED_sigset_t) && !defined(__DEFINED_sigset_t) ++typedef struct __sigset_t { unsigned long __bits[128/sizeof(long)]; } sigset_t; ++#define __DEFINED_sigset_t ++#endif ++ ++ ++#if defined(__NEED_struct_iovec) && !defined(__DEFINED_struct_iovec) ++struct iovec { void *iov_base; size_t iov_len; }; ++#define __DEFINED_struct_iovec ++#endif ++ ++ ++#if defined(__NEED_struct_winsize) && !defined(__DEFINED_struct_winsize) ++struct winsize { unsigned short ws_row, ws_col, ws_xpixel, ws_ypixel; }; ++#define __DEFINED_struct_winsize ++#endif ++ ++ ++#if defined(__NEED_socklen_t) && !defined(__DEFINED_socklen_t) ++typedef unsigned socklen_t; ++#define __DEFINED_socklen_t ++#endif ++ ++#if defined(__NEED_sa_family_t) && !defined(__DEFINED_sa_family_t) ++typedef unsigned short sa_family_t; ++#define __DEFINED_sa_family_t ++#endif ++ ++ ++#if defined(__NEED_pthread_attr_t) && !defined(__DEFINED_pthread_attr_t) ++typedef struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t; ++#define __DEFINED_pthread_attr_t ++#endif ++ ++#if defined(__NEED_pthread_mutex_t) && !defined(__DEFINED_pthread_mutex_t) ++typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } pthread_mutex_t; ++#define __DEFINED_pthread_mutex_t ++#endif ++ ++#if defined(__NEED_mtx_t) && !defined(__DEFINED_mtx_t) ++typedef struct { union { int __i[sizeof(long)==8?10:6]; volatile int __vi[sizeof(long)==8?10:6]; volatile void *volatile __p[sizeof(long)==8?5:6]; } __u; } mtx_t; ++#define __DEFINED_mtx_t ++#endif ++ ++#if defined(__NEED_pthread_cond_t) && !defined(__DEFINED_pthread_cond_t) ++typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } pthread_cond_t; ++#define __DEFINED_pthread_cond_t ++#endif ++ ++#if defined(__NEED_cnd_t) && !defined(__DEFINED_cnd_t) ++typedef struct { union { int __i[12]; volatile int __vi[12]; void *__p[12*sizeof(int)/sizeof(void*)]; } __u; } cnd_t; ++#define __DEFINED_cnd_t ++#endif ++ ++#if defined(__NEED_pthread_rwlock_t) && !defined(__DEFINED_pthread_rwlock_t) ++typedef struct { union { int __i[sizeof(long)==8?14:8]; volatile int __vi[sizeof(long)==8?14:8]; void *__p[sizeof(long)==8?7:8]; } __u; } pthread_rwlock_t; ++#define __DEFINED_pthread_rwlock_t ++#endif ++ ++#if defined(__NEED_pthread_barrier_t) && !defined(__DEFINED_pthread_barrier_t) ++typedef struct { union { int __i[sizeof(long)==8?8:5]; volatile int __vi[sizeof(long)==8?8:5]; void *__p[sizeof(long)==8?4:5]; } __u; } pthread_barrier_t; ++#define __DEFINED_pthread_barrier_t ++#endif ++ ++ ++#undef _Addr ++#undef _Int64 ++#undef _Reg +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/dirent.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/dirent.h +new file mode 100644 +index 0000000..c845fe8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/dirent.h +@@ -0,0 +1,11 @@ ++#define _DIRENT_HAVE_D_RECLEN ++#define _DIRENT_HAVE_D_OFF ++#define _DIRENT_HAVE_D_TYPE ++ ++struct dirent { ++ ino_t d_ino; ++ off_t d_off; ++ unsigned short d_reclen; ++ unsigned char d_type; ++ char d_name[256]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/errno.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/errno.h +new file mode 100644 +index 0000000..d2e1eee +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/errno.h +@@ -0,0 +1,134 @@ ++#define EPERM 1 ++#define ENOENT 2 ++#define ESRCH 3 ++#define EINTR 4 ++#define EIO 5 ++#define ENXIO 6 ++#define E2BIG 7 ++#define ENOEXEC 8 ++#define EBADF 9 ++#define ECHILD 10 ++#define EAGAIN 11 ++#define ENOMEM 12 ++#define EACCES 13 ++#define EFAULT 14 ++#define ENOTBLK 15 ++#define EBUSY 16 ++#define EEXIST 17 ++#define EXDEV 18 ++#define ENODEV 19 ++#define ENOTDIR 20 ++#define EISDIR 21 ++#define EINVAL 22 ++#define ENFILE 23 ++#define EMFILE 24 ++#define ENOTTY 25 ++#define ETXTBSY 26 ++#define EFBIG 27 ++#define ENOSPC 28 ++#define ESPIPE 29 ++#define EROFS 30 ++#define EMLINK 31 ++#define EPIPE 32 ++#define EDOM 33 ++#define ERANGE 34 ++#define EDEADLK 35 ++#define ENAMETOOLONG 36 ++#define ENOLCK 37 ++#define ENOSYS 38 ++#define ENOTEMPTY 39 ++#define ELOOP 40 ++#define EWOULDBLOCK EAGAIN ++#define ENOMSG 42 ++#define EIDRM 43 ++#define ECHRNG 44 ++#define EL2NSYNC 45 ++#define EL3HLT 46 ++#define EL3RST 47 ++#define ELNRNG 48 ++#define EUNATCH 49 ++#define ENOCSI 50 ++#define EL2HLT 51 ++#define EBADE 52 ++#define EBADR 53 ++#define EXFULL 54 ++#define ENOANO 55 ++#define EBADRQC 56 ++#define EBADSLT 57 ++#define EDEADLOCK EDEADLK ++#define EBFONT 59 ++#define ENOSTR 60 ++#define ENODATA 61 ++#define ETIME 62 ++#define ENOSR 63 ++#define ENONET 64 ++#define ENOPKG 65 ++#define EREMOTE 66 ++#define ENOLINK 67 ++#define EADV 68 ++#define ESRMNT 69 ++#define ECOMM 70 ++#define EPROTO 71 ++#define EMULTIHOP 72 ++#define EDOTDOT 73 ++#define EBADMSG 74 ++#define EOVERFLOW 75 ++#define ENOTUNIQ 76 ++#define EBADFD 77 ++#define EREMCHG 78 ++#define ELIBACC 79 ++#define ELIBBAD 80 ++#define ELIBSCN 81 ++#define ELIBMAX 82 ++#define ELIBEXEC 83 ++#define EILSEQ 84 ++#define ERESTART 85 ++#define ESTRPIPE 86 ++#define EUSERS 87 ++#define ENOTSOCK 88 ++#define EDESTADDRREQ 89 ++#define EMSGSIZE 90 ++#define EPROTOTYPE 91 ++#define ENOPROTOOPT 92 ++#define EPROTONOSUPPORT 93 ++#define ESOCKTNOSUPPORT 94 ++#define EOPNOTSUPP 95 ++#define ENOTSUP EOPNOTSUPP ++#define EPFNOSUPPORT 96 ++#define EAFNOSUPPORT 97 ++#define EADDRINUSE 98 ++#define EADDRNOTAVAIL 99 ++#define ENETDOWN 100 ++#define ENETUNREACH 101 ++#define ENETRESET 102 ++#define ECONNABORTED 103 ++#define ECONNRESET 104 ++#define ENOBUFS 105 ++#define EISCONN 106 ++#define ENOTCONN 107 ++#define ESHUTDOWN 108 ++#define ETOOMANYREFS 109 ++#define ETIMEDOUT 110 ++#define ECONNREFUSED 111 ++#define EHOSTDOWN 112 ++#define EHOSTUNREACH 113 ++#define EALREADY 114 ++#define EINPROGRESS 115 ++#define ESTALE 116 ++#define EUCLEAN 117 ++#define ENOTNAM 118 ++#define ENAVAIL 119 ++#define EISNAM 120 ++#define EREMOTEIO 121 ++#define EDQUOT 122 ++#define ENOMEDIUM 123 ++#define EMEDIUMTYPE 124 ++#define ECANCELED 125 ++#define ENOKEY 126 ++#define EKEYEXPIRED 127 ++#define EKEYREVOKED 128 ++#define EKEYREJECTED 129 ++#define EOWNERDEAD 130 ++#define ENOTRECOVERABLE 131 ++#define ERFKILL 132 ++#define EHWPOISON 133 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fcntl.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fcntl.h +new file mode 100644 +index 0000000..4cb1753 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fcntl.h +@@ -0,0 +1,40 @@ ++#define O_CREAT 0100 ++#define O_EXCL 0200 ++#define O_NOCTTY 0400 ++#define O_TRUNC 01000 ++#define O_APPEND 02000 ++#define O_NONBLOCK 04000 ++#define O_DSYNC 010000 ++#define O_SYNC 04010000 ++#define O_RSYNC 04010000 ++#define O_DIRECTORY 040000 ++#define O_NOFOLLOW 0100000 ++#define O_CLOEXEC 02000000 ++ ++#define O_ASYNC 020000 ++#define O_DIRECT 0200000 ++#define O_LARGEFILE 0400000 ++#define O_NOATIME 01000000 ++#define O_PATH 010000000 ++#define O_TMPFILE 020040000 ++#define O_NDELAY O_NONBLOCK ++ ++#define F_DUPFD 0 ++#define F_GETFD 1 ++#define F_SETFD 2 ++#define F_GETFL 3 ++#define F_SETFL 4 ++ ++#define F_SETOWN 8 ++#define F_GETOWN 9 ++#define F_SETSIG 10 ++#define F_GETSIG 11 ++ ++#define F_GETLK 12 ++#define F_SETLK 13 ++#define F_SETLKW 14 ++ ++#define F_SETOWN_EX 15 ++#define F_GETOWN_EX 16 ++ ++#define F_GETOWNER_UIDS 17 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fenv.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fenv.h +new file mode 100644 +index 0000000..b497a98 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/fenv.h +@@ -0,0 +1,23 @@ ++#ifndef __ARM_PCS_VFP ++#define FE_ALL_EXCEPT 0 ++#define FE_TONEAREST 0 ++#else ++#define FE_INVALID 1 ++#define FE_DIVBYZERO 2 ++#define FE_OVERFLOW 4 ++#define FE_UNDERFLOW 8 ++#define FE_INEXACT 16 ++#define FE_ALL_EXCEPT 31 ++#define FE_TONEAREST 0 ++#define FE_TOWARDZERO 0xc00000 ++#endif ++#define FE_DOWNWARD 0x800000 ++#define FE_UPWARD 0x400000 ++ ++typedef unsigned long fexcept_t; ++ ++typedef struct { ++ unsigned long __cw; ++} fenv_t; ++ ++#define FE_DFL_ENV ((const fenv_t *) -1) +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/float.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/float.h +new file mode 100644 +index 0000000..c4a655e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/float.h +@@ -0,0 +1,16 @@ ++#define FLT_EVAL_METHOD 0 ++ ++#define LDBL_TRUE_MIN 4.94065645841246544177e-324L ++#define LDBL_MIN 2.22507385850720138309e-308L ++#define LDBL_MAX 1.79769313486231570815e+308L ++#define LDBL_EPSILON 2.22044604925031308085e-16L ++ ++#define LDBL_MANT_DIG 53 ++#define LDBL_MIN_EXP (-1021) ++#define LDBL_MAX_EXP 1024 ++ ++#define LDBL_DIG 15 ++#define LDBL_MIN_10_EXP (-307) ++#define LDBL_MAX_10_EXP 308 ++ ++#define DECIMAL_DIG 17 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/hwcap.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/hwcap.h +new file mode 100644 +index 0000000..a3d8731 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/hwcap.h +@@ -0,0 +1,53 @@ ++#define HWCAP_SWP (1 << 0) ++#define HWCAP_HALF (1 << 1) ++#define HWCAP_THUMB (1 << 2) ++#define HWCAP_26BIT (1 << 3) ++#define HWCAP_FAST_MULT (1 << 4) ++#define HWCAP_FPA (1 << 5) ++#define HWCAP_VFP (1 << 6) ++#define HWCAP_EDSP (1 << 7) ++#define HWCAP_JAVA (1 << 8) ++#define HWCAP_IWMMXT (1 << 9) ++#define HWCAP_CRUNCH (1 << 10) ++#define HWCAP_THUMBEE (1 << 11) ++#define HWCAP_NEON (1 << 12) ++#define HWCAP_VFPv3 (1 << 13) ++#define HWCAP_VFPv3D16 (1 << 14) ++#define HWCAP_TLS (1 << 15) ++#define HWCAP_VFPv4 (1 << 16) ++#define HWCAP_IDIVA (1 << 17) ++#define HWCAP_IDIVT (1 << 18) ++#define HWCAP_VFPD32 (1 << 19) ++#define HWCAP_IDIV (HWCAP_IDIVA | HWCAP_IDIVT) ++#define HWCAP_LPAE (1 << 20) ++#define HWCAP_EVTSTRM (1 << 21) ++ ++#define HWCAP2_AES (1 << 0) ++#define HWCAP2_PMULL (1 << 1) ++#define HWCAP2_SHA1 (1 << 2) ++#define HWCAP2_SHA2 (1 << 3) ++#define HWCAP2_CRC32 (1 << 4) ++ ++#define HWCAP_ARM_SWP (1 << 0) ++#define HWCAP_ARM_HALF (1 << 1) ++#define HWCAP_ARM_THUMB (1 << 2) ++#define HWCAP_ARM_26BIT (1 << 3) ++#define HWCAP_ARM_FAST_MULT (1 << 4) ++#define HWCAP_ARM_FPA (1 << 5) ++#define HWCAP_ARM_VFP (1 << 6) ++#define HWCAP_ARM_EDSP (1 << 7) ++#define HWCAP_ARM_JAVA (1 << 8) ++#define HWCAP_ARM_IWMMXT (1 << 9) ++#define HWCAP_ARM_CRUNCH (1 << 10) ++#define HWCAP_ARM_THUMBEE (1 << 11) ++#define HWCAP_ARM_NEON (1 << 12) ++#define HWCAP_ARM_VFPv3 (1 << 13) ++#define HWCAP_ARM_VFPv3D16 (1 << 14) ++#define HWCAP_ARM_TLS (1 << 15) ++#define HWCAP_ARM_VFPv4 (1 << 16) ++#define HWCAP_ARM_IDIVA (1 << 17) ++#define HWCAP_ARM_IDIVT (1 << 18) ++#define HWCAP_ARM_VFPD32 (1 << 19) ++#define HWCAP_ARM_IDIV (HWCAP_ARM_IDIVA | HWCAP_ARM_IDIVT) ++#define HWCAP_ARM_LPAE (1 << 20) ++#define HWCAP_ARM_EVTSTRM (1 << 21) +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/io.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/io.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl.h +new file mode 100644 +index 0000000..60ae8b8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl.h +@@ -0,0 +1,115 @@ ++#define _IOC(a,b,c,d) ( ((a)<<30) | ((b)<<8) | (c) | ((d)<<16) ) ++#define _IOC_NONE 0U ++#define _IOC_WRITE 1U ++#define _IOC_READ 2U ++ ++#define _IO(a,b) _IOC(_IOC_NONE,(a),(b),0) ++#define _IOW(a,b,c) _IOC(_IOC_WRITE,(a),(b),sizeof(c)) ++#define _IOR(a,b,c) _IOC(_IOC_READ,(a),(b),sizeof(c)) ++#define _IOWR(a,b,c) _IOC(_IOC_READ|_IOC_WRITE,(a),(b),sizeof(c)) ++ ++#define TCGETS 0x5401 ++#define TCSETS 0x5402 ++#define TCSETSW 0x5403 ++#define TCSETSF 0x5404 ++#define TCGETA 0x5405 ++#define TCSETA 0x5406 ++#define TCSETAW 0x5407 ++#define TCSETAF 0x5408 ++#define TCSBRK 0x5409 ++#define TCXONC 0x540A ++#define TCFLSH 0x540B ++#define TIOCEXCL 0x540C ++#define TIOCNXCL 0x540D ++#define TIOCSCTTY 0x540E ++#define TIOCGPGRP 0x540F ++#define TIOCSPGRP 0x5410 ++#define TIOCOUTQ 0x5411 ++#define TIOCSTI 0x5412 ++#define TIOCGWINSZ 0x5413 ++#define TIOCSWINSZ 0x5414 ++#define TIOCMGET 0x5415 ++#define TIOCMBIS 0x5416 ++#define TIOCMBIC 0x5417 ++#define TIOCMSET 0x5418 ++#define TIOCGSOFTCAR 0x5419 ++#define TIOCSSOFTCAR 0x541A ++#define FIONREAD 0x541B ++#define TIOCINQ FIONREAD ++#define TIOCLINUX 0x541C ++#define TIOCCONS 0x541D ++#define TIOCGSERIAL 0x541E ++#define TIOCSSERIAL 0x541F ++#define TIOCPKT 0x5420 ++#define FIONBIO 0x5421 ++#define TIOCNOTTY 0x5422 ++#define TIOCSETD 0x5423 ++#define TIOCGETD 0x5424 ++#define TCSBRKP 0x5425 ++#define TIOCSBRK 0x5427 ++#define TIOCCBRK 0x5428 ++#define TIOCGSID 0x5429 ++#define TIOCGRS485 0x542E ++#define TIOCSRS485 0x542F ++#define TIOCGPTN 0x80045430 ++#define TIOCSPTLCK 0x40045431 ++#define TIOCGDEV 0x80045432 ++#define TCGETX 0x5432 ++#define TCSETX 0x5433 ++#define TCSETXF 0x5434 ++#define TCSETXW 0x5435 ++#define TIOCSIG 0x40045436 ++#define TIOCVHANGUP 0x5437 ++#define TIOCGPKT 0x80045438 ++#define TIOCGPTLCK 0x80045439 ++#define TIOCGEXCL 0x80045440 ++#define TIOCGPTPEER 0x5441 ++#define TIOCGISO7816 0x80285442 ++#define TIOCSISO7816 0xc0285443 ++ ++#define FIONCLEX 0x5450 ++#define FIOCLEX 0x5451 ++#define FIOASYNC 0x5452 ++#define TIOCSERCONFIG 0x5453 ++#define TIOCSERGWILD 0x5454 ++#define TIOCSERSWILD 0x5455 ++#define TIOCGLCKTRMIOS 0x5456 ++#define TIOCSLCKTRMIOS 0x5457 ++#define TIOCSERGSTRUCT 0x5458 ++#define TIOCSERGETLSR 0x5459 ++#define TIOCSERGETMULTI 0x545A ++#define TIOCSERSETMULTI 0x545B ++ ++#define TIOCMIWAIT 0x545C ++#define TIOCGICOUNT 0x545D ++#define FIOQSIZE 0x5460 ++ ++#define TIOCM_LE 0x001 ++#define TIOCM_DTR 0x002 ++#define TIOCM_RTS 0x004 ++#define TIOCM_ST 0x008 ++#define TIOCM_SR 0x010 ++#define TIOCM_CTS 0x020 ++#define TIOCM_CAR 0x040 ++#define TIOCM_RNG 0x080 ++#define TIOCM_DSR 0x100 ++#define TIOCM_CD TIOCM_CAR ++#define TIOCM_RI TIOCM_RNG ++#define TIOCM_OUT1 0x2000 ++#define TIOCM_OUT2 0x4000 ++#define TIOCM_LOOP 0x8000 ++ ++#define FIOSETOWN 0x8901 ++#define SIOCSPGRP 0x8902 ++#define FIOGETOWN 0x8903 ++#define SIOCGPGRP 0x8904 ++#define SIOCATMARK 0x8905 ++#if __LONG_MAX == 0x7fffffff ++#define SIOCGSTAMP _IOR(0x89, 6, char[16]) ++#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) ++#else ++#define SIOCGSTAMP 0x8906 ++#define SIOCGSTAMPNS 0x8907 ++#endif ++ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl_fix.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl_fix.h +new file mode 100644 +index 0000000..ebb383d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ioctl_fix.h +@@ -0,0 +1,2 @@ ++#undef FIOQSIZE ++#define FIOQSIZE 0x545e +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipc.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipc.h +new file mode 100644 +index 0000000..40d6f3a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipc.h +@@ -0,0 +1,11 @@ ++struct ipc_perm { ++ key_t __ipc_perm_key; ++ uid_t uid; ++ gid_t gid; ++ uid_t cuid; ++ gid_t cgid; ++ mode_t mode; ++ int __ipc_perm_seq; ++ long __pad1; ++ long __pad2; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipcstat.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipcstat.h +new file mode 100644 +index 0000000..4f4fcb0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ipcstat.h +@@ -0,0 +1 @@ ++#define IPC_STAT 0x102 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/kd.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/kd.h +new file mode 100644 +index 0000000..33b873f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/kd.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/limits.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/limits.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/link.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/link.h +new file mode 100644 +index 0000000..4a94d8f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/link.h +@@ -0,0 +1 @@ ++typedef uint32_t Elf_Symndx; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/mman.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/mman.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/msg.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/msg.h +new file mode 100644 +index 0000000..7bbbb2b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/msg.h +@@ -0,0 +1,18 @@ ++struct msqid_ds { ++ struct ipc_perm msg_perm; ++ unsigned long __msg_stime_lo; ++ unsigned long __msg_stime_hi; ++ unsigned long __msg_rtime_lo; ++ unsigned long __msg_rtime_hi; ++ unsigned long __msg_ctime_lo; ++ unsigned long __msg_ctime_hi; ++ unsigned long msg_cbytes; ++ msgqnum_t msg_qnum; ++ msglen_t msg_qbytes; ++ pid_t msg_lspid; ++ pid_t msg_lrpid; ++ unsigned long __unused[2]; ++ time_t msg_stime; ++ time_t msg_rtime; ++ time_t msg_ctime; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/poll.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/poll.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/posix.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/posix.h +new file mode 100644 +index 0000000..30a3871 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/posix.h +@@ -0,0 +1,2 @@ ++#define _POSIX_V6_ILP32_OFFBIG 1 ++#define _POSIX_V7_ILP32_OFFBIG 1 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ptrace.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ptrace.h +new file mode 100644 +index 0000000..9556ef4 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/ptrace.h +@@ -0,0 +1,25 @@ ++#define PTRACE_GETWMMXREGS 18 ++#define PTRACE_SETWMMXREGS 19 ++#define PTRACE_GET_THREAD_AREA 22 ++#define PTRACE_SET_SYSCALL 23 ++#define PTRACE_GETCRUNCHREGS 25 ++#define PTRACE_SETCRUNCHREGS 26 ++#define PTRACE_GETVFPREGS 27 ++#define PTRACE_SETVFPREGS 28 ++#define PTRACE_GETHBPREGS 29 ++#define PTRACE_SETHBPREGS 30 ++#define PTRACE_GETFDPIC 31 ++#define PTRACE_GETFDPIC_EXEC 0 ++#define PTRACE_GETFDPIC_INTERP 1 ++ ++#define PT_GETWMMXREGS PTRACE_GETWMMXREGS ++#define PT_SETWMMXREGS PTRACE_SETWMMXREGS ++#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA ++#define PT_SET_SYSCALL PTRACE_SET_SYSCALL ++#define PT_GETCRUNCHREGS PTRACE_GETCRUNCHREGS ++#define PT_SETCRUNCHREGS PTRACE_SETCRUNCHREGS ++#define PT_GETVFPREGS PTRACE_GETVFPREGS ++#define PT_SETVFPREGS PTRACE_SETVFPREGS ++#define PT_GETHBPREGS PTRACE_GETHBPREGS ++#define PT_SETHBPREGS PTRACE_SETHBPREGS ++#define PT_GETFDPIC PTRACE_GETFDPIC +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/reg.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/reg.h +new file mode 100644 +index 0000000..0c7bffc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/reg.h +@@ -0,0 +1,3 @@ ++#undef __WORDSIZE ++#define __WORDSIZE 32 ++/* FIXME */ +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/resource.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/resource.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/sem.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/sem.h +new file mode 100644 +index 0000000..544e3d2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/sem.h +@@ -0,0 +1,18 @@ ++struct semid_ds { ++ struct ipc_perm sem_perm; ++ unsigned long __sem_otime_lo; ++ unsigned long __sem_otime_hi; ++ unsigned long __sem_ctime_lo; ++ unsigned long __sem_ctime_hi; ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++ unsigned short sem_nsems; ++ char __sem_nsems_pad[sizeof(long)-sizeof(short)]; ++#else ++ char __sem_nsems_pad[sizeof(long)-sizeof(short)]; ++ unsigned short sem_nsems; ++#endif ++ long __unused3; ++ long __unused4; ++ time_t sem_otime; ++ time_t sem_ctime; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/setjmp.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/setjmp.h +new file mode 100644 +index 0000000..55e3a95 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/setjmp.h +@@ -0,0 +1 @@ ++typedef unsigned long long __jmp_buf[32]; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/shm.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/shm.h +new file mode 100644 +index 0000000..725fb46 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/shm.h +@@ -0,0 +1,31 @@ ++#define SHMLBA 4096 ++ ++struct shmid_ds { ++ struct ipc_perm shm_perm; ++ size_t shm_segsz; ++ unsigned long __shm_atime_lo; ++ unsigned long __shm_atime_hi; ++ unsigned long __shm_dtime_lo; ++ unsigned long __shm_dtime_hi; ++ unsigned long __shm_ctime_lo; ++ unsigned long __shm_ctime_hi; ++ pid_t shm_cpid; ++ pid_t shm_lpid; ++ unsigned long shm_nattch; ++ unsigned long __pad1; ++ unsigned long __pad2; ++ unsigned long __pad3; ++ time_t shm_atime; ++ time_t shm_dtime; ++ time_t shm_ctime; ++}; ++ ++struct shminfo { ++ unsigned long shmmax, shmmin, shmmni, shmseg, shmall, __unused[4]; ++}; ++ ++struct shm_info { ++ int __used_ids; ++ unsigned long shm_tot, shm_rss, shm_swp; ++ unsigned long __swap_attempts, __swap_successes; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/signal.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/signal.h +new file mode 100644 +index 0000000..4906b48 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/signal.h +@@ -0,0 +1,87 @@ ++#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ ++ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++ ++#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define MINSIGSTKSZ 2048 ++#define SIGSTKSZ 8192 ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++typedef int greg_t, gregset_t[18]; ++typedef struct sigcontext { ++ unsigned long trap_no, error_code, oldmask; ++ unsigned long arm_r0, arm_r1, arm_r2, arm_r3; ++ unsigned long arm_r4, arm_r5, arm_r6, arm_r7; ++ unsigned long arm_r8, arm_r9, arm_r10, arm_fp; ++ unsigned long arm_ip, arm_sp, arm_lr, arm_pc; ++ unsigned long arm_cpsr, fault_address; ++} mcontext_t; ++#else ++typedef struct { ++ unsigned long __regs[21]; ++} mcontext_t; ++#endif ++ ++struct sigaltstack { ++ void *ss_sp; ++ int ss_flags; ++ size_t ss_size; ++}; ++ ++typedef struct __ucontext { ++ unsigned long uc_flags; ++ struct __ucontext *uc_link; ++ stack_t uc_stack; ++ mcontext_t uc_mcontext; ++ sigset_t uc_sigmask; ++ unsigned long long uc_regspace[64]; ++} ucontext_t; ++ ++#define SA_NOCLDSTOP 1 ++#define SA_NOCLDWAIT 2 ++#define SA_SIGINFO 4 ++#define SA_ONSTACK 0x08000000 ++#define SA_RESTART 0x10000000 ++#define SA_NODEFER 0x40000000 ++#define SA_RESETHAND 0x80000000 ++#define SA_RESTORER 0x04000000 ++ ++#endif ++ ++#define SIGHUP 1 ++#define SIGINT 2 ++#define SIGQUIT 3 ++#define SIGILL 4 ++#define SIGTRAP 5 ++#define SIGABRT 6 ++#define SIGIOT SIGABRT ++#define SIGBUS 7 ++#define SIGFPE 8 ++#define SIGKILL 9 ++#define SIGUSR1 10 ++#define SIGSEGV 11 ++#define SIGUSR2 12 ++#define SIGPIPE 13 ++#define SIGALRM 14 ++#define SIGTERM 15 ++#define SIGSTKFLT 16 ++#define SIGCHLD 17 ++#define SIGCONT 18 ++#define SIGSTOP 19 ++#define SIGTSTP 20 ++#define SIGTTIN 21 ++#define SIGTTOU 22 ++#define SIGURG 23 ++#define SIGXCPU 24 ++#define SIGXFSZ 25 ++#define SIGVTALRM 26 ++#define SIGPROF 27 ++#define SIGWINCH 28 ++#define SIGIO 29 ++#define SIGPOLL 29 ++#define SIGPWR 30 ++#define SIGSYS 31 ++#define SIGUNUSED SIGSYS ++ ++ ++#define _NSIG 65 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/socket.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/socket.h +new file mode 100644 +index 0000000..e69de29 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/soundcard.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/soundcard.h +new file mode 100644 +index 0000000..fade986 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/soundcard.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stat.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stat.h +new file mode 100644 +index 0000000..5d7828c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stat.h +@@ -0,0 +1,25 @@ ++/* copied from kernel definition, but with padding replaced ++ * by the corresponding correctly-sized userspace types. */ ++ ++struct stat { ++ dev_t st_dev; ++ int __st_dev_padding; ++ long __st_ino_truncated; ++ mode_t st_mode; ++ nlink_t st_nlink; ++ uid_t st_uid; ++ gid_t st_gid; ++ dev_t st_rdev; ++ int __st_rdev_padding; ++ off_t st_size; ++ blksize_t st_blksize; ++ blkcnt_t st_blocks; ++ struct { ++ long tv_sec; ++ long tv_nsec; ++ } __st_atim32, __st_mtim32, __st_ctim32; ++ ino_t st_ino; ++ struct timespec st_atim; ++ struct timespec st_mtim; ++ struct timespec st_ctim; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/statfs.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/statfs.h +new file mode 100644 +index 0000000..f103f4e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/statfs.h +@@ -0,0 +1,7 @@ ++struct statfs { ++ unsigned long f_type, f_bsize; ++ fsblkcnt_t f_blocks, f_bfree, f_bavail; ++ fsfilcnt_t f_files, f_ffree; ++ fsid_t f_fsid; ++ unsigned long f_namelen, f_frsize, f_flags, f_spare[4]; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stdint.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stdint.h +new file mode 100644 +index 0000000..d1b2712 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/stdint.h +@@ -0,0 +1,20 @@ ++typedef int32_t int_fast16_t; ++typedef int32_t int_fast32_t; ++typedef uint32_t uint_fast16_t; ++typedef uint32_t uint_fast32_t; ++ ++#define INT_FAST16_MIN INT32_MIN ++#define INT_FAST32_MIN INT32_MIN ++ ++#define INT_FAST16_MAX INT32_MAX ++#define INT_FAST32_MAX INT32_MAX ++ ++#define UINT_FAST16_MAX UINT32_MAX ++#define UINT_FAST32_MAX UINT32_MAX ++ ++#define INTPTR_MIN INT32_MIN ++#define INTPTR_MAX INT32_MAX ++#define UINTPTR_MAX UINT32_MAX ++#define PTRDIFF_MIN INT32_MIN ++#define PTRDIFF_MAX INT32_MAX ++#define SIZE_MAX UINT32_MAX +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/syscall.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/syscall.h +new file mode 100644 +index 0000000..2131e1e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/syscall.h +@@ -0,0 +1,810 @@ ++#define __NR_restart_syscall 0 ++#define __NR_exit 1 ++#define __NR_fork 2 ++#define __NR_read 3 ++#define __NR_write 4 ++#define __NR_open 5 ++#define __NR_close 6 ++#define __NR_creat 8 ++#define __NR_link 9 ++#define __NR_unlink 10 ++#define __NR_execve 11 ++#define __NR_chdir 12 ++#define __NR_mknod 14 ++#define __NR_chmod 15 ++#define __NR_lchown 16 ++#define __NR_lseek 19 ++#define __NR_getpid 20 ++#define __NR_mount 21 ++#define __NR_setuid 23 ++#define __NR_getuid 24 ++#define __NR_ptrace 26 ++#define __NR_pause 29 ++#define __NR_access 33 ++#define __NR_nice 34 ++#define __NR_sync 36 ++#define __NR_kill 37 ++#define __NR_rename 38 ++#define __NR_mkdir 39 ++#define __NR_rmdir 40 ++#define __NR_dup 41 ++#define __NR_pipe 42 ++#define __NR_times 43 ++#define __NR_brk 45 ++#define __NR_setgid 46 ++#define __NR_getgid 47 ++#define __NR_geteuid 49 ++#define __NR_getegid 50 ++#define __NR_acct 51 ++#define __NR_umount2 52 ++#define __NR_ioctl 54 ++#define __NR_fcntl 55 ++#define __NR_setpgid 57 ++#define __NR_umask 60 ++#define __NR_chroot 61 ++#define __NR_ustat 62 ++#define __NR_dup2 63 ++#define __NR_getppid 64 ++#define __NR_getpgrp 65 ++#define __NR_setsid 66 ++#define __NR_sigaction 67 ++#define __NR_setreuid 70 ++#define __NR_setregid 71 ++#define __NR_sigsuspend 72 ++#define __NR_sigpending 73 ++#define __NR_sethostname 74 ++#define __NR_setrlimit 75 ++#define __NR_getrusage 77 ++#define __NR_gettimeofday_time32 78 ++#define __NR_settimeofday_time32 79 ++#define __NR_getgroups 80 ++#define __NR_setgroups 81 ++#define __NR_symlink 83 ++#define __NR_readlink 85 ++#define __NR_uselib 86 ++#define __NR_swapon 87 ++#define __NR_reboot 88 ++#define __NR_munmap 91 ++#define __NR_truncate 92 ++#define __NR_ftruncate 93 ++#define __NR_fchmod 94 ++#define __NR_fchown 95 ++#define __NR_getpriority 96 ++#define __NR_setpriority 97 ++#define __NR_statfs 99 ++#define __NR_fstatfs 100 ++#define __NR_syslog 103 ++#define __NR_setitimer 104 ++#define __NR_getitimer 105 ++#define __NR_stat 106 ++#define __NR_lstat 107 ++#define __NR_fstat 108 ++#define __NR_vhangup 111 ++#define __NR_wait4 114 ++#define __NR_swapoff 115 ++#define __NR_sysinfo 116 ++#define __NR_fsync 118 ++#define __NR_sigreturn 119 ++#define __NR_clone 120 ++#define __NR_setdomainname 121 ++#define __NR_uname 122 ++#define __NR_adjtimex 124 ++#define __NR_mprotect 125 ++#define __NR_sigprocmask 126 ++#define __NR_init_module 128 ++#define __NR_delete_module 129 ++#define __NR_quotactl 131 ++#define __NR_getpgid 132 ++#define __NR_fchdir 133 ++#define __NR_bdflush 134 ++#define __NR_sysfs 135 ++#define __NR_personality 136 ++#define __NR_setfsuid 138 ++#define __NR_setfsgid 139 ++#define __NR__llseek 140 ++#define __NR_getdents 141 ++#define __NR__newselect 142 ++#define __NR_flock 143 ++#define __NR_msync 144 ++#define __NR_readv 145 ++#define __NR_writev 146 ++#define __NR_getsid 147 ++#define __NR_fdatasync 148 ++#define __NR__sysctl 149 ++#define __NR_mlock 150 ++#define __NR_munlock 151 ++#define __NR_mlockall 152 ++#define __NR_munlockall 153 ++#define __NR_sched_setparam 154 ++#define __NR_sched_getparam 155 ++#define __NR_sched_setscheduler 156 ++#define __NR_sched_getscheduler 157 ++#define __NR_sched_yield 158 ++#define __NR_sched_get_priority_max 159 ++#define __NR_sched_get_priority_min 160 ++#define __NR_sched_rr_get_interval 161 ++#define __NR_nanosleep 162 ++#define __NR_mremap 163 ++#define __NR_setresuid 164 ++#define __NR_getresuid 165 ++#define __NR_poll 168 ++#define __NR_nfsservctl 169 ++#define __NR_setresgid 170 ++#define __NR_getresgid 171 ++#define __NR_prctl 172 ++#define __NR_rt_sigreturn 173 ++#define __NR_rt_sigaction 174 ++#define __NR_rt_sigprocmask 175 ++#define __NR_rt_sigpending 176 ++#define __NR_rt_sigtimedwait 177 ++#define __NR_rt_sigqueueinfo 178 ++#define __NR_rt_sigsuspend 179 ++#define __NR_pread64 180 ++#define __NR_pwrite64 181 ++#define __NR_chown 182 ++#define __NR_getcwd 183 ++#define __NR_capget 184 ++#define __NR_capset 185 ++#define __NR_sigaltstack 186 ++#define __NR_sendfile 187 ++#define __NR_vfork 190 ++#define __NR_ugetrlimit 191 ++#define __NR_mmap2 192 ++#define __NR_truncate64 193 ++#define __NR_ftruncate64 194 ++#define __NR_stat64 195 ++#define __NR_lstat64 196 ++#define __NR_fstat64 197 ++#define __NR_lchown32 198 ++#define __NR_getuid32 199 ++#define __NR_getgid32 200 ++#define __NR_geteuid32 201 ++#define __NR_getegid32 202 ++#define __NR_setreuid32 203 ++#define __NR_setregid32 204 ++#define __NR_getgroups32 205 ++#define __NR_setgroups32 206 ++#define __NR_fchown32 207 ++#define __NR_setresuid32 208 ++#define __NR_getresuid32 209 ++#define __NR_setresgid32 210 ++#define __NR_getresgid32 211 ++#define __NR_chown32 212 ++#define __NR_setuid32 213 ++#define __NR_setgid32 214 ++#define __NR_setfsuid32 215 ++#define __NR_setfsgid32 216 ++#define __NR_getdents64 217 ++#define __NR_pivot_root 218 ++#define __NR_mincore 219 ++#define __NR_madvise 220 ++#define __NR_fcntl64 221 ++#define __NR_gettid 224 ++#define __NR_readahead 225 ++#define __NR_setxattr 226 ++#define __NR_lsetxattr 227 ++#define __NR_fsetxattr 228 ++#define __NR_getxattr 229 ++#define __NR_lgetxattr 230 ++#define __NR_fgetxattr 231 ++#define __NR_listxattr 232 ++#define __NR_llistxattr 233 ++#define __NR_flistxattr 234 ++#define __NR_removexattr 235 ++#define __NR_lremovexattr 236 ++#define __NR_fremovexattr 237 ++#define __NR_tkill 238 ++#define __NR_sendfile64 239 ++#define __NR_futex 240 ++#define __NR_sched_setaffinity 241 ++#define __NR_sched_getaffinity 242 ++#define __NR_io_setup 243 ++#define __NR_io_destroy 244 ++#define __NR_io_getevents 245 ++#define __NR_io_submit 246 ++#define __NR_io_cancel 247 ++#define __NR_exit_group 248 ++#define __NR_lookup_dcookie 249 ++#define __NR_epoll_create 250 ++#define __NR_epoll_ctl 251 ++#define __NR_epoll_wait 252 ++#define __NR_remap_file_pages 253 ++#define __NR_set_tid_address 256 ++#define __NR_timer_create 257 ++#define __NR_timer_settime32 258 ++#define __NR_timer_gettime32 259 ++#define __NR_timer_getoverrun 260 ++#define __NR_timer_delete 261 ++#define __NR_clock_settime32 262 ++#define __NR_clock_gettime32 263 ++#define __NR_clock_getres_time32 264 ++#define __NR_clock_nanosleep_time32 265 ++#define __NR_statfs64 266 ++#define __NR_fstatfs64 267 ++#define __NR_tgkill 268 ++#define __NR_utimes 269 ++#define __NR_fadvise64_64 270 ++#define __NR_arm_fadvise64_64 270 ++#define __NR_pciconfig_iobase 271 ++#define __NR_pciconfig_read 272 ++#define __NR_pciconfig_write 273 ++#define __NR_mq_open 274 ++#define __NR_mq_unlink 275 ++#define __NR_mq_timedsend 276 ++#define __NR_mq_timedreceive 277 ++#define __NR_mq_notify 278 ++#define __NR_mq_getsetattr 279 ++#define __NR_waitid 280 ++#define __NR_socket 281 ++#define __NR_bind 282 ++#define __NR_connect 283 ++#define __NR_listen 284 ++#define __NR_accept 285 ++#define __NR_getsockname 286 ++#define __NR_getpeername 287 ++#define __NR_socketpair 288 ++#define __NR_send 289 ++#define __NR_sendto 290 ++#define __NR_recv 291 ++#define __NR_recvfrom 292 ++#define __NR_shutdown 293 ++#define __NR_setsockopt 294 ++#define __NR_getsockopt 295 ++#define __NR_sendmsg 296 ++#define __NR_recvmsg 297 ++#define __NR_semop 298 ++#define __NR_semget 299 ++#define __NR_semctl 300 ++#define __NR_msgsnd 301 ++#define __NR_msgrcv 302 ++#define __NR_msgget 303 ++#define __NR_msgctl 304 ++#define __NR_shmat 305 ++#define __NR_shmdt 306 ++#define __NR_shmget 307 ++#define __NR_shmctl 308 ++#define __NR_add_key 309 ++#define __NR_request_key 310 ++#define __NR_keyctl 311 ++#define __NR_semtimedop 312 ++#define __NR_vserver 313 ++#define __NR_ioprio_set 314 ++#define __NR_ioprio_get 315 ++#define __NR_inotify_init 316 ++#define __NR_inotify_add_watch 317 ++#define __NR_inotify_rm_watch 318 ++#define __NR_mbind 319 ++#define __NR_get_mempolicy 320 ++#define __NR_set_mempolicy 321 ++#define __NR_openat 322 ++#define __NR_mkdirat 323 ++#define __NR_mknodat 324 ++#define __NR_fchownat 325 ++#define __NR_futimesat 326 ++#define __NR_fstatat64 327 ++#define __NR_unlinkat 328 ++#define __NR_renameat 329 ++#define __NR_linkat 330 ++#define __NR_symlinkat 331 ++#define __NR_readlinkat 332 ++#define __NR_fchmodat 333 ++#define __NR_faccessat 334 ++#define __NR_pselect6 335 ++#define __NR_ppoll 336 ++#define __NR_unshare 337 ++#define __NR_set_robust_list 338 ++#define __NR_get_robust_list 339 ++#define __NR_splice 340 ++#define __NR_sync_file_range2 341 ++#define __NR_arm_sync_file_range 341 ++#define __NR_tee 342 ++#define __NR_vmsplice 343 ++#define __NR_move_pages 344 ++#define __NR_getcpu 345 ++#define __NR_epoll_pwait 346 ++#define __NR_kexec_load 347 ++#define __NR_utimensat 348 ++#define __NR_signalfd 349 ++#define __NR_timerfd_create 350 ++#define __NR_eventfd 351 ++#define __NR_fallocate 352 ++#define __NR_timerfd_settime32 353 ++#define __NR_timerfd_gettime32 354 ++#define __NR_signalfd4 355 ++#define __NR_eventfd2 356 ++#define __NR_epoll_create1 357 ++#define __NR_dup3 358 ++#define __NR_pipe2 359 ++#define __NR_inotify_init1 360 ++#define __NR_preadv 361 ++#define __NR_pwritev 362 ++#define __NR_rt_tgsigqueueinfo 363 ++#define __NR_perf_event_open 364 ++#define __NR_recvmmsg 365 ++#define __NR_accept4 366 ++#define __NR_fanotify_init 367 ++#define __NR_fanotify_mark 368 ++#define __NR_prlimit64 369 ++#define __NR_name_to_handle_at 370 ++#define __NR_open_by_handle_at 371 ++#define __NR_clock_adjtime 372 ++#define __NR_syncfs 373 ++#define __NR_sendmmsg 374 ++#define __NR_setns 375 ++#define __NR_process_vm_readv 376 ++#define __NR_process_vm_writev 377 ++#define __NR_kcmp 378 ++#define __NR_finit_module 379 ++#define __NR_sched_setattr 380 ++#define __NR_sched_getattr 381 ++#define __NR_renameat2 382 ++#define __NR_seccomp 383 ++#define __NR_getrandom 384 ++#define __NR_memfd_create 385 ++#define __NR_bpf 386 ++#define __NR_execveat 387 ++#define __NR_userfaultfd 388 ++#define __NR_membarrier 389 ++#define __NR_mlock2 390 ++#define __NR_copy_file_range 391 ++#define __NR_preadv2 392 ++#define __NR_pwritev2 393 ++#define __NR_pkey_mprotect 394 ++#define __NR_pkey_alloc 395 ++#define __NR_pkey_free 396 ++#define __NR_statx 397 ++#define __NR_rseq 398 ++#define __NR_io_pgetevents 399 ++#define __NR_migrate_pages 400 ++#define __NR_kexec_file_load 401 ++#define __NR_clock_gettime64 403 ++#define __NR_clock_settime64 404 ++#define __NR_clock_adjtime64 405 ++#define __NR_clock_getres_time64 406 ++#define __NR_clock_nanosleep_time64 407 ++#define __NR_timer_gettime64 408 ++#define __NR_timer_settime64 409 ++#define __NR_timerfd_gettime64 410 ++#define __NR_timerfd_settime64 411 ++#define __NR_utimensat_time64 412 ++#define __NR_pselect6_time64 413 ++#define __NR_ppoll_time64 414 ++#define __NR_io_pgetevents_time64 416 ++#define __NR_recvmmsg_time64 417 ++#define __NR_mq_timedsend_time64 418 ++#define __NR_mq_timedreceive_time64 419 ++#define __NR_semtimedop_time64 420 ++#define __NR_rt_sigtimedwait_time64 421 ++#define __NR_futex_time64 422 ++#define __NR_sched_rr_get_interval_time64 423 ++#define __NR_pidfd_send_signal 424 ++#define __NR_io_uring_setup 425 ++#define __NR_io_uring_enter 426 ++#define __NR_io_uring_register 427 ++#define __NR_open_tree 428 ++#define __NR_move_mount 429 ++#define __NR_fsopen 430 ++#define __NR_fsconfig 431 ++#define __NR_fsmount 432 ++#define __NR_fspick 433 ++#define __NR_pidfd_open 434 ++#define __NR_clone3 435 ++#define __NR_close_range 436 ++#define __NR_openat2 437 ++#define __NR_pidfd_getfd 438 ++#define __NR_faccessat2 439 ++#define __NR_process_madvise 440 ++#define __NR_epoll_pwait2 441 ++#define __NR_mount_setattr 442 ++#define __NR_landlock_create_ruleset 444 ++#define __NR_landlock_add_rule 445 ++#define __NR_landlock_restrict_self 446 ++ ++#define __ARM_NR_breakpoint 0x0f0001 ++#define __ARM_NR_cacheflush 0x0f0002 ++#define __ARM_NR_usr26 0x0f0003 ++#define __ARM_NR_usr32 0x0f0004 ++#define __ARM_NR_set_tls 0x0f0005 ++#define __ARM_NR_get_tls 0x0f0006 ++ ++#define SYS_restart_syscall 0 ++#define SYS_exit 1 ++#define SYS_fork 2 ++#define SYS_read 3 ++#define SYS_write 4 ++#define SYS_open 5 ++#define SYS_close 6 ++#define SYS_creat 8 ++#define SYS_link 9 ++#define SYS_unlink 10 ++#define SYS_execve 11 ++#define SYS_chdir 12 ++#define SYS_mknod 14 ++#define SYS_chmod 15 ++#define SYS_lchown 16 ++#define SYS_lseek 19 ++#define SYS_getpid 20 ++#define SYS_mount 21 ++#define SYS_setuid 23 ++#define SYS_getuid 24 ++#define SYS_ptrace 26 ++#define SYS_pause 29 ++#define SYS_access 33 ++#define SYS_nice 34 ++#define SYS_sync 36 ++#define SYS_kill 37 ++#define SYS_rename 38 ++#define SYS_mkdir 39 ++#define SYS_rmdir 40 ++#define SYS_dup 41 ++#define SYS_pipe 42 ++#define SYS_times 43 ++#define SYS_brk 45 ++#define SYS_setgid 46 ++#define SYS_getgid 47 ++#define SYS_geteuid 49 ++#define SYS_getegid 50 ++#define SYS_acct 51 ++#define SYS_umount2 52 ++#define SYS_ioctl 54 ++#define SYS_fcntl 55 ++#define SYS_setpgid 57 ++#define SYS_umask 60 ++#define SYS_chroot 61 ++#define SYS_ustat 62 ++#define SYS_dup2 63 ++#define SYS_getppid 64 ++#define SYS_getpgrp 65 ++#define SYS_setsid 66 ++#define SYS_sigaction 67 ++#define SYS_setreuid 70 ++#define SYS_setregid 71 ++#define SYS_sigsuspend 72 ++#define SYS_sigpending 73 ++#define SYS_sethostname 74 ++#define SYS_setrlimit 75 ++#define SYS_getrusage 77 ++#define SYS_gettimeofday_time32 78 ++#define SYS_settimeofday_time32 79 ++#define SYS_getgroups 80 ++#define SYS_setgroups 81 ++#define SYS_symlink 83 ++#define SYS_readlink 85 ++#define SYS_uselib 86 ++#define SYS_swapon 87 ++#define SYS_reboot 88 ++#define SYS_munmap 91 ++#define SYS_truncate 92 ++#define SYS_ftruncate 93 ++#define SYS_fchmod 94 ++#define SYS_fchown 95 ++#define SYS_getpriority 96 ++#define SYS_setpriority 97 ++#define SYS_statfs 99 ++#define SYS_fstatfs 100 ++#define SYS_syslog 103 ++#define SYS_setitimer 104 ++#define SYS_getitimer 105 ++#define SYS_stat 106 ++#define SYS_lstat 107 ++#define SYS_fstat 108 ++#define SYS_vhangup 111 ++#define SYS_wait4 114 ++#define SYS_swapoff 115 ++#define SYS_sysinfo 116 ++#define SYS_fsync 118 ++#define SYS_sigreturn 119 ++#define SYS_clone 120 ++#define SYS_setdomainname 121 ++#define SYS_uname 122 ++#define SYS_adjtimex 124 ++#define SYS_mprotect 125 ++#define SYS_sigprocmask 126 ++#define SYS_init_module 128 ++#define SYS_delete_module 129 ++#define SYS_quotactl 131 ++#define SYS_getpgid 132 ++#define SYS_fchdir 133 ++#define SYS_bdflush 134 ++#define SYS_sysfs 135 ++#define SYS_personality 136 ++#define SYS_setfsuid 138 ++#define SYS_setfsgid 139 ++#define SYS__llseek 140 ++#define SYS_getdents 141 ++#define SYS__newselect 142 ++#define SYS_flock 143 ++#define SYS_msync 144 ++#define SYS_readv 145 ++#define SYS_writev 146 ++#define SYS_getsid 147 ++#define SYS_fdatasync 148 ++#define SYS__sysctl 149 ++#define SYS_mlock 150 ++#define SYS_munlock 151 ++#define SYS_mlockall 152 ++#define SYS_munlockall 153 ++#define SYS_sched_setparam 154 ++#define SYS_sched_getparam 155 ++#define SYS_sched_setscheduler 156 ++#define SYS_sched_getscheduler 157 ++#define SYS_sched_yield 158 ++#define SYS_sched_get_priority_max 159 ++#define SYS_sched_get_priority_min 160 ++#define SYS_sched_rr_get_interval 161 ++#define SYS_nanosleep 162 ++#define SYS_mremap 163 ++#define SYS_setresuid 164 ++#define SYS_getresuid 165 ++#define SYS_poll 168 ++#define SYS_nfsservctl 169 ++#define SYS_setresgid 170 ++#define SYS_getresgid 171 ++#define SYS_prctl 172 ++#define SYS_rt_sigreturn 173 ++#define SYS_rt_sigaction 174 ++#define SYS_rt_sigprocmask 175 ++#define SYS_rt_sigpending 176 ++#define SYS_rt_sigtimedwait 177 ++#define SYS_rt_sigqueueinfo 178 ++#define SYS_rt_sigsuspend 179 ++#define SYS_pread64 180 ++#define SYS_pwrite64 181 ++#define SYS_chown 182 ++#define SYS_getcwd 183 ++#define SYS_capget 184 ++#define SYS_capset 185 ++#define SYS_sigaltstack 186 ++#define SYS_sendfile 187 ++#define SYS_vfork 190 ++#define SYS_ugetrlimit 191 ++#define SYS_mmap2 192 ++#define SYS_truncate64 193 ++#define SYS_ftruncate64 194 ++#define SYS_stat64 195 ++#define SYS_lstat64 196 ++#define SYS_fstat64 197 ++#define SYS_lchown32 198 ++#define SYS_getuid32 199 ++#define SYS_getgid32 200 ++#define SYS_geteuid32 201 ++#define SYS_getegid32 202 ++#define SYS_setreuid32 203 ++#define SYS_setregid32 204 ++#define SYS_getgroups32 205 ++#define SYS_setgroups32 206 ++#define SYS_fchown32 207 ++#define SYS_setresuid32 208 ++#define SYS_getresuid32 209 ++#define SYS_setresgid32 210 ++#define SYS_getresgid32 211 ++#define SYS_chown32 212 ++#define SYS_setuid32 213 ++#define SYS_setgid32 214 ++#define SYS_setfsuid32 215 ++#define SYS_setfsgid32 216 ++#define SYS_getdents64 217 ++#define SYS_pivot_root 218 ++#define SYS_mincore 219 ++#define SYS_madvise 220 ++#define SYS_fcntl64 221 ++#define SYS_gettid 224 ++#define SYS_readahead 225 ++#define SYS_setxattr 226 ++#define SYS_lsetxattr 227 ++#define SYS_fsetxattr 228 ++#define SYS_getxattr 229 ++#define SYS_lgetxattr 230 ++#define SYS_fgetxattr 231 ++#define SYS_listxattr 232 ++#define SYS_llistxattr 233 ++#define SYS_flistxattr 234 ++#define SYS_removexattr 235 ++#define SYS_lremovexattr 236 ++#define SYS_fremovexattr 237 ++#define SYS_tkill 238 ++#define SYS_sendfile64 239 ++#define SYS_futex 240 ++#define SYS_sched_setaffinity 241 ++#define SYS_sched_getaffinity 242 ++#define SYS_io_setup 243 ++#define SYS_io_destroy 244 ++#define SYS_io_getevents 245 ++#define SYS_io_submit 246 ++#define SYS_io_cancel 247 ++#define SYS_exit_group 248 ++#define SYS_lookup_dcookie 249 ++#define SYS_epoll_create 250 ++#define SYS_epoll_ctl 251 ++#define SYS_epoll_wait 252 ++#define SYS_remap_file_pages 253 ++#define SYS_set_tid_address 256 ++#define SYS_timer_create 257 ++#define SYS_timer_settime32 258 ++#define SYS_timer_gettime32 259 ++#define SYS_timer_getoverrun 260 ++#define SYS_timer_delete 261 ++#define SYS_clock_settime32 262 ++#define SYS_clock_gettime32 263 ++#define SYS_clock_getres_time32 264 ++#define SYS_clock_nanosleep_time32 265 ++#define SYS_statfs64 266 ++#define SYS_fstatfs64 267 ++#define SYS_tgkill 268 ++#define SYS_utimes 269 ++#define SYS_fadvise64_64 270 ++#define SYS_arm_fadvise64_64 270 ++#define SYS_pciconfig_iobase 271 ++#define SYS_pciconfig_read 272 ++#define SYS_pciconfig_write 273 ++#define SYS_mq_open 274 ++#define SYS_mq_unlink 275 ++#define SYS_mq_timedsend 276 ++#define SYS_mq_timedreceive 277 ++#define SYS_mq_notify 278 ++#define SYS_mq_getsetattr 279 ++#define SYS_waitid 280 ++#define SYS_socket 281 ++#define SYS_bind 282 ++#define SYS_connect 283 ++#define SYS_listen 284 ++#define SYS_accept 285 ++#define SYS_getsockname 286 ++#define SYS_getpeername 287 ++#define SYS_socketpair 288 ++#define SYS_send 289 ++#define SYS_sendto 290 ++#define SYS_recv 291 ++#define SYS_recvfrom 292 ++#define SYS_shutdown 293 ++#define SYS_setsockopt 294 ++#define SYS_getsockopt 295 ++#define SYS_sendmsg 296 ++#define SYS_recvmsg 297 ++#define SYS_semop 298 ++#define SYS_semget 299 ++#define SYS_semctl 300 ++#define SYS_msgsnd 301 ++#define SYS_msgrcv 302 ++#define SYS_msgget 303 ++#define SYS_msgctl 304 ++#define SYS_shmat 305 ++#define SYS_shmdt 306 ++#define SYS_shmget 307 ++#define SYS_shmctl 308 ++#define SYS_add_key 309 ++#define SYS_request_key 310 ++#define SYS_keyctl 311 ++#define SYS_semtimedop 312 ++#define SYS_vserver 313 ++#define SYS_ioprio_set 314 ++#define SYS_ioprio_get 315 ++#define SYS_inotify_init 316 ++#define SYS_inotify_add_watch 317 ++#define SYS_inotify_rm_watch 318 ++#define SYS_mbind 319 ++#define SYS_get_mempolicy 320 ++#define SYS_set_mempolicy 321 ++#define SYS_openat 322 ++#define SYS_mkdirat 323 ++#define SYS_mknodat 324 ++#define SYS_fchownat 325 ++#define SYS_futimesat 326 ++#define SYS_fstatat64 327 ++#define SYS_unlinkat 328 ++#define SYS_renameat 329 ++#define SYS_linkat 330 ++#define SYS_symlinkat 331 ++#define SYS_readlinkat 332 ++#define SYS_fchmodat 333 ++#define SYS_faccessat 334 ++#define SYS_pselect6 335 ++#define SYS_ppoll 336 ++#define SYS_unshare 337 ++#define SYS_set_robust_list 338 ++#define SYS_get_robust_list 339 ++#define SYS_splice 340 ++#define SYS_sync_file_range2 341 ++#define SYS_arm_sync_file_range 341 ++#define SYS_tee 342 ++#define SYS_vmsplice 343 ++#define SYS_move_pages 344 ++#define SYS_getcpu 345 ++#define SYS_epoll_pwait 346 ++#define SYS_kexec_load 347 ++#define SYS_utimensat 348 ++#define SYS_signalfd 349 ++#define SYS_timerfd_create 350 ++#define SYS_eventfd 351 ++#define SYS_fallocate 352 ++#define SYS_timerfd_settime32 353 ++#define SYS_timerfd_gettime32 354 ++#define SYS_signalfd4 355 ++#define SYS_eventfd2 356 ++#define SYS_epoll_create1 357 ++#define SYS_dup3 358 ++#define SYS_pipe2 359 ++#define SYS_inotify_init1 360 ++#define SYS_preadv 361 ++#define SYS_pwritev 362 ++#define SYS_rt_tgsigqueueinfo 363 ++#define SYS_perf_event_open 364 ++#define SYS_recvmmsg 365 ++#define SYS_accept4 366 ++#define SYS_fanotify_init 367 ++#define SYS_fanotify_mark 368 ++#define SYS_prlimit64 369 ++#define SYS_name_to_handle_at 370 ++#define SYS_open_by_handle_at 371 ++#define SYS_clock_adjtime 372 ++#define SYS_syncfs 373 ++#define SYS_sendmmsg 374 ++#define SYS_setns 375 ++#define SYS_process_vm_readv 376 ++#define SYS_process_vm_writev 377 ++#define SYS_kcmp 378 ++#define SYS_finit_module 379 ++#define SYS_sched_setattr 380 ++#define SYS_sched_getattr 381 ++#define SYS_renameat2 382 ++#define SYS_seccomp 383 ++#define SYS_getrandom 384 ++#define SYS_memfd_create 385 ++#define SYS_bpf 386 ++#define SYS_execveat 387 ++#define SYS_userfaultfd 388 ++#define SYS_membarrier 389 ++#define SYS_mlock2 390 ++#define SYS_copy_file_range 391 ++#define SYS_preadv2 392 ++#define SYS_pwritev2 393 ++#define SYS_pkey_mprotect 394 ++#define SYS_pkey_alloc 395 ++#define SYS_pkey_free 396 ++#define SYS_statx 397 ++#define SYS_rseq 398 ++#define SYS_io_pgetevents 399 ++#define SYS_migrate_pages 400 ++#define SYS_kexec_file_load 401 ++#define SYS_clock_gettime64 403 ++#define SYS_clock_settime64 404 ++#define SYS_clock_adjtime64 405 ++#define SYS_clock_getres_time64 406 ++#define SYS_clock_nanosleep_time64 407 ++#define SYS_timer_gettime64 408 ++#define SYS_timer_settime64 409 ++#define SYS_timerfd_gettime64 410 ++#define SYS_timerfd_settime64 411 ++#define SYS_utimensat_time64 412 ++#define SYS_pselect6_time64 413 ++#define SYS_ppoll_time64 414 ++#define SYS_io_pgetevents_time64 416 ++#define SYS_recvmmsg_time64 417 ++#define SYS_mq_timedsend_time64 418 ++#define SYS_mq_timedreceive_time64 419 ++#define SYS_semtimedop_time64 420 ++#define SYS_rt_sigtimedwait_time64 421 ++#define SYS_futex_time64 422 ++#define SYS_sched_rr_get_interval_time64 423 ++#define SYS_pidfd_send_signal 424 ++#define SYS_io_uring_setup 425 ++#define SYS_io_uring_enter 426 ++#define SYS_io_uring_register 427 ++#define SYS_open_tree 428 ++#define SYS_move_mount 429 ++#define SYS_fsopen 430 ++#define SYS_fsconfig 431 ++#define SYS_fsmount 432 ++#define SYS_fspick 433 ++#define SYS_pidfd_open 434 ++#define SYS_clone3 435 ++#define SYS_close_range 436 ++#define SYS_openat2 437 ++#define SYS_pidfd_getfd 438 ++#define SYS_faccessat2 439 ++#define SYS_process_madvise 440 ++#define SYS_epoll_pwait2 441 ++#define SYS_mount_setattr 442 ++#define SYS_landlock_create_ruleset 444 ++#define SYS_landlock_add_rule 445 ++#define SYS_landlock_restrict_self 446 +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/termios.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/termios.h +new file mode 100644 +index 0000000..124f71d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/termios.h +@@ -0,0 +1,166 @@ ++struct termios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t __c_ispeed; ++ speed_t __c_ospeed; ++}; ++ ++#define VINTR 0 ++#define VQUIT 1 ++#define VERASE 2 ++#define VKILL 3 ++#define VEOF 4 ++#define VTIME 5 ++#define VMIN 6 ++#define VSWTC 7 ++#define VSTART 8 ++#define VSTOP 9 ++#define VSUSP 10 ++#define VEOL 11 ++#define VREPRINT 12 ++#define VDISCARD 13 ++#define VWERASE 14 ++#define VLNEXT 15 ++#define VEOL2 16 ++ ++#define IGNBRK 0000001 ++#define BRKINT 0000002 ++#define IGNPAR 0000004 ++#define PARMRK 0000010 ++#define INPCK 0000020 ++#define ISTRIP 0000040 ++#define INLCR 0000100 ++#define IGNCR 0000200 ++#define ICRNL 0000400 ++#define IUCLC 0001000 ++#define IXON 0002000 ++#define IXANY 0004000 ++#define IXOFF 0010000 ++#define IMAXBEL 0020000 ++#define IUTF8 0040000 ++ ++#define OPOST 0000001 ++#define OLCUC 0000002 ++#define ONLCR 0000004 ++#define OCRNL 0000010 ++#define ONOCR 0000020 ++#define ONLRET 0000040 ++#define OFILL 0000100 ++#define OFDEL 0000200 ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) || defined(_XOPEN_SOURCE) ++#define NLDLY 0000400 ++#define NL0 0000000 ++#define NL1 0000400 ++#define CRDLY 0003000 ++#define CR0 0000000 ++#define CR1 0001000 ++#define CR2 0002000 ++#define CR3 0003000 ++#define TABDLY 0014000 ++#define TAB0 0000000 ++#define TAB1 0004000 ++#define TAB2 0010000 ++#define TAB3 0014000 ++#define BSDLY 0020000 ++#define BS0 0000000 ++#define BS1 0020000 ++#define FFDLY 0100000 ++#define FF0 0000000 ++#define FF1 0100000 ++#endif ++ ++#define VTDLY 0040000 ++#define VT0 0000000 ++#define VT1 0040000 ++ ++#define B0 0000000 ++#define B50 0000001 ++#define B75 0000002 ++#define B110 0000003 ++#define B134 0000004 ++#define B150 0000005 ++#define B200 0000006 ++#define B300 0000007 ++#define B600 0000010 ++#define B1200 0000011 ++#define B1800 0000012 ++#define B2400 0000013 ++#define B4800 0000014 ++#define B9600 0000015 ++#define B19200 0000016 ++#define B38400 0000017 ++ ++#define B57600 0010001 ++#define B115200 0010002 ++#define B230400 0010003 ++#define B460800 0010004 ++#define B500000 0010005 ++#define B576000 0010006 ++#define B921600 0010007 ++#define B1000000 0010010 ++#define B1152000 0010011 ++#define B1500000 0010012 ++#define B2000000 0010013 ++#define B2500000 0010014 ++#define B3000000 0010015 ++#define B3500000 0010016 ++#define B4000000 0010017 ++ ++#define CSIZE 0000060 ++#define CS5 0000000 ++#define CS6 0000020 ++#define CS7 0000040 ++#define CS8 0000060 ++#define CSTOPB 0000100 ++#define CREAD 0000200 ++#define PARENB 0000400 ++#define PARODD 0001000 ++#define HUPCL 0002000 ++#define CLOCAL 0004000 ++ ++#define ISIG 0000001 ++#define ICANON 0000002 ++#define ECHO 0000010 ++#define ECHOE 0000020 ++#define ECHOK 0000040 ++#define ECHONL 0000100 ++#define NOFLSH 0000200 ++#define TOSTOP 0000400 ++#define IEXTEN 0100000 ++ ++#define TCOOFF 0 ++#define TCOON 1 ++#define TCIOFF 2 ++#define TCION 3 ++ ++#define TCIFLUSH 0 ++#define TCOFLUSH 1 ++#define TCIOFLUSH 2 ++ ++#define TCSANOW 0 ++#define TCSADRAIN 1 ++#define TCSAFLUSH 2 ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define EXTA 0000016 ++#define EXTB 0000017 ++#define CBAUD 0010017 ++#define CBAUDEX 0010000 ++#define CIBAUD 002003600000 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++ ++#define XCASE 0000004 ++#define ECHOCTL 0001000 ++#define ECHOPRT 0002000 ++#define ECHOKE 0004000 ++#define FLUSHO 0010000 ++#define PENDIN 0040000 ++#define EXTPROC 0200000 ++ ++#define XTABS 0014000 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/user.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/user.h +new file mode 100644 +index 0000000..3e5a4d2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/user.h +@@ -0,0 +1,36 @@ ++typedef struct user_fpregs { ++ struct fp_reg { ++ unsigned sign1:1; ++ unsigned unused:15; ++ unsigned sign2:1; ++ unsigned exponent:14; ++ unsigned j:1; ++ unsigned mantissa1:31; ++ unsigned mantissa0:32; ++ } fpregs[8]; ++ unsigned fpsr:32; ++ unsigned fpcr:32; ++ unsigned char ftype[8]; ++ unsigned int init_flag; ++} elf_fpregset_t; ++ ++struct user_regs { ++ unsigned long uregs[18]; ++}; ++#define ELF_NGREG 18 ++typedef unsigned long elf_greg_t, elf_gregset_t[ELF_NGREG]; ++ ++struct user { ++ struct user_regs regs; ++ int u_fpvalid; ++ unsigned long u_tsize, u_dsize, u_ssize; ++ unsigned long start_code, start_stack; ++ long signal; ++ int reserved; ++ struct user_regs *u_ar0; ++ unsigned long magic; ++ char u_comm[32]; ++ int u_debugreg[8]; ++ struct user_fpregs u_fp; ++ struct user_fpregs *u_fp0; ++}; +diff --git a/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/vt.h b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/vt.h +new file mode 100644 +index 0000000..834abfb +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arm-linux-ohos/bits/vt.h +@@ -0,0 +1 @@ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/ftp.h b/build/ohos/ohos-sysroot/usr/include/arpa/ftp.h +new file mode 100644 +index 0000000..fb0a46f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/ftp.h +@@ -0,0 +1,35 @@ ++#ifndef _ARPA_FTP_H ++#define _ARPA_FTP_H ++#define PRELIM 1 ++#define COMPLETE 2 ++#define CONTINUE 3 ++#define TRANSIENT 4 ++#define ERROR 5 ++#define TYPE_A 1 ++#define TYPE_E 2 ++#define TYPE_I 3 ++#define TYPE_L 4 ++#define FORM_N 1 ++#define FORM_T 2 ++#define FORM_C 3 ++#define STRU_F 1 ++#define STRU_R 2 ++#define STRU_P 3 ++#define MODE_S 1 ++#define MODE_B 2 ++#define MODE_C 3 ++#define REC_ESC '\377' ++#define REC_EOR '\001' ++#define REC_EOF '\002' ++#define BLK_EOR 0x80 ++#define BLK_EOF 0x40 ++#define BLK_ERRORS 0x20 ++#define BLK_RESTART 0x10 ++#define BLK_BYTECOUNT 2 ++#ifdef FTP_NAMES ++char *modenames[] = {"0", "Stream", "Block", "Compressed" }; ++char *strunames[] = {"0", "File", "Record", "Page" }; ++char *typenames[] = {"0", "ASCII", "EBCDIC", "Image", "Local" }; ++char *formnames[] = {"0", "Nonprint", "Telnet", "Carriage-control" }; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/inet.h b/build/ohos/ohos-sysroot/usr/include/arpa/inet.h +new file mode 100644 +index 0000000..37f8c11 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/inet.h +@@ -0,0 +1,36 @@ ++#ifndef _ARPA_INET_H ++#define _ARPA_INET_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++#include ++ ++uint32_t htonl(uint32_t); ++uint16_t htons(uint16_t); ++uint32_t ntohl(uint32_t); ++uint16_t ntohs(uint16_t); ++ ++in_addr_t inet_addr (const char *); ++in_addr_t inet_network (const char *); ++char *inet_ntoa (struct in_addr); ++int inet_pton (int, const char *__restrict, void *__restrict); ++const char *inet_ntop (int, const void *__restrict, char *__restrict, socklen_t); ++ ++int inet_aton (const char *, struct in_addr *); ++struct in_addr inet_makeaddr(in_addr_t, in_addr_t); ++in_addr_t inet_lnaof(struct in_addr); ++in_addr_t inet_netof(struct in_addr); ++ ++#undef INET_ADDRSTRLEN ++#undef INET6_ADDRSTRLEN ++#define INET_ADDRSTRLEN 16 ++#define INET6_ADDRSTRLEN 46 ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/nameser.h b/build/ohos/ohos-sysroot/usr/include/arpa/nameser.h +new file mode 100644 +index 0000000..581925a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/nameser.h +@@ -0,0 +1,455 @@ ++#ifndef _ARPA_NAMESER_H ++#define _ARPA_NAMESER_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++#include ++ ++#define __NAMESER 19991006 ++#define NS_PACKETSZ 512 ++#define NS_MAXDNAME 1025 ++#define NS_MAXMSG 65535 ++#define NS_MAXCDNAME 255 ++#define NS_MAXLABEL 63 ++#define NS_HFIXEDSZ 12 ++#define NS_QFIXEDSZ 4 ++#define NS_RRFIXEDSZ 10 ++#define NS_INT32SZ 4 ++#define NS_INT16SZ 2 ++#define NS_INT8SZ 1 ++#define NS_INADDRSZ 4 ++#define NS_IN6ADDRSZ 16 ++#define NS_CMPRSFLGS 0xc0 ++#define NS_DEFAULTPORT 53 ++ ++typedef enum __ns_sect { ++ ns_s_qd = 0, ++ ns_s_zn = 0, ++ ns_s_an = 1, ++ ns_s_pr = 1, ++ ns_s_ns = 2, ++ ns_s_ud = 2, ++ ns_s_ar = 3, ++ ns_s_max = 4 ++} ns_sect; ++ ++typedef struct __ns_msg { ++ const unsigned char *_msg, *_eom; ++ uint16_t _id, _flags, _counts[ns_s_max]; ++ const unsigned char *_sections[ns_s_max]; ++ ns_sect _sect; ++ int _rrnum; ++ const unsigned char *_msg_ptr; ++} ns_msg; ++ ++struct _ns_flagdata { int mask, shift; }; ++extern const struct _ns_flagdata _ns_flagdata[]; ++ ++#define ns_msg_id(handle) ((handle)._id + 0) ++#define ns_msg_base(handle) ((handle)._msg + 0) ++#define ns_msg_end(handle) ((handle)._eom + 0) ++#define ns_msg_size(handle) ((handle)._eom - (handle)._msg) ++#define ns_msg_count(handle, section) ((handle)._counts[section] + 0) ++#define ns_msg_getflag(handle, flag) \ ++ (((handle)._flags & _ns_flagdata[flag].mask) >> _ns_flagdata[flag].shift) ++ ++typedef struct __ns_rr { ++ char name[NS_MAXDNAME]; ++ uint16_t type; ++ uint16_t rr_class; ++ uint32_t ttl; ++ uint16_t rdlength; ++ const unsigned char *rdata; ++} ns_rr; ++ ++#define ns_rr_name(rr) (((rr).name[0] != '\0') ? (rr).name : ".") ++#define ns_rr_type(rr) ((ns_type)((rr).type + 0)) ++#define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) ++#define ns_rr_ttl(rr) ((rr).ttl + 0) ++#define ns_rr_rdlen(rr) ((rr).rdlength + 0) ++#define ns_rr_rdata(rr) ((rr).rdata + 0) ++ ++typedef enum __ns_flag { ++ ns_f_qr, ++ ns_f_opcode, ++ ns_f_aa, ++ ns_f_tc, ++ ns_f_rd, ++ ns_f_ra, ++ ns_f_z, ++ ns_f_ad, ++ ns_f_cd, ++ ns_f_rcode, ++ ns_f_max ++} ns_flag; ++ ++typedef enum __ns_opcode { ++ ns_o_query = 0, ++ ns_o_iquery = 1, ++ ns_o_status = 2, ++ ns_o_notify = 4, ++ ns_o_update = 5, ++ ns_o_max = 6 ++} ns_opcode; ++ ++typedef enum __ns_rcode { ++ ns_r_noerror = 0, ++ ns_r_formerr = 1, ++ ns_r_servfail = 2, ++ ns_r_nxdomain = 3, ++ ns_r_notimpl = 4, ++ ns_r_refused = 5, ++ ns_r_yxdomain = 6, ++ ns_r_yxrrset = 7, ++ ns_r_nxrrset = 8, ++ ns_r_notauth = 9, ++ ns_r_notzone = 10, ++ ns_r_max = 11, ++ ns_r_badvers = 16, ++ ns_r_badsig = 16, ++ ns_r_badkey = 17, ++ ns_r_badtime = 18 ++} ns_rcode; ++ ++typedef enum __ns_update_operation { ++ ns_uop_delete = 0, ++ ns_uop_add = 1, ++ ns_uop_max = 2 ++} ns_update_operation; ++ ++struct ns_tsig_key { ++ char name[NS_MAXDNAME], alg[NS_MAXDNAME]; ++ unsigned char *data; ++ int len; ++}; ++typedef struct ns_tsig_key ns_tsig_key; ++ ++struct ns_tcp_tsig_state { ++ int counter; ++ struct dst_key *key; ++ void *ctx; ++ unsigned char sig[NS_PACKETSZ]; ++ int siglen; ++}; ++typedef struct ns_tcp_tsig_state ns_tcp_tsig_state; ++ ++#define NS_TSIG_FUDGE 300 ++#define NS_TSIG_TCP_COUNT 100 ++#define NS_TSIG_ALG_HMAC_MD5 "HMAC-MD5.SIG-ALG.REG.INT" ++ ++#define NS_TSIG_ERROR_NO_TSIG -10 ++#define NS_TSIG_ERROR_NO_SPACE -11 ++#define NS_TSIG_ERROR_FORMERR -12 ++ ++typedef enum __ns_type { ++ ns_t_invalid = 0, ++ ns_t_a = 1, ++ ns_t_ns = 2, ++ ns_t_md = 3, ++ ns_t_mf = 4, ++ ns_t_cname = 5, ++ ns_t_soa = 6, ++ ns_t_mb = 7, ++ ns_t_mg = 8, ++ ns_t_mr = 9, ++ ns_t_null = 10, ++ ns_t_wks = 11, ++ ns_t_ptr = 12, ++ ns_t_hinfo = 13, ++ ns_t_minfo = 14, ++ ns_t_mx = 15, ++ ns_t_txt = 16, ++ ns_t_rp = 17, ++ ns_t_afsdb = 18, ++ ns_t_x25 = 19, ++ ns_t_isdn = 20, ++ ns_t_rt = 21, ++ ns_t_nsap = 22, ++ ns_t_nsap_ptr = 23, ++ ns_t_sig = 24, ++ ns_t_key = 25, ++ ns_t_px = 26, ++ ns_t_gpos = 27, ++ ns_t_aaaa = 28, ++ ns_t_loc = 29, ++ ns_t_nxt = 30, ++ ns_t_eid = 31, ++ ns_t_nimloc = 32, ++ ns_t_srv = 33, ++ ns_t_atma = 34, ++ ns_t_naptr = 35, ++ ns_t_kx = 36, ++ ns_t_cert = 37, ++ ns_t_a6 = 38, ++ ns_t_dname = 39, ++ ns_t_sink = 40, ++ ns_t_opt = 41, ++ ns_t_apl = 42, ++ ns_t_tkey = 249, ++ ns_t_tsig = 250, ++ ns_t_ixfr = 251, ++ ns_t_axfr = 252, ++ ns_t_mailb = 253, ++ ns_t_maila = 254, ++ ns_t_any = 255, ++ ns_t_zxfr = 256, ++ ns_t_max = 65536 ++} ns_type; ++ ++#define ns_t_qt_p(t) (ns_t_xfr_p(t) || (t) == ns_t_any || \ ++ (t) == ns_t_mailb || (t) == ns_t_maila) ++#define ns_t_mrr_p(t) ((t) == ns_t_tsig || (t) == ns_t_opt) ++#define ns_t_rr_p(t) (!ns_t_qt_p(t) && !ns_t_mrr_p(t)) ++#define ns_t_udp_p(t) ((t) != ns_t_axfr && (t) != ns_t_zxfr) ++#define ns_t_xfr_p(t) ((t) == ns_t_axfr || (t) == ns_t_ixfr || \ ++ (t) == ns_t_zxfr) ++ ++typedef enum __ns_class { ++ ns_c_invalid = 0, ++ ns_c_in = 1, ++ ns_c_2 = 2, ++ ns_c_chaos = 3, ++ ns_c_hs = 4, ++ ns_c_none = 254, ++ ns_c_any = 255, ++ ns_c_max = 65536 ++} ns_class; ++ ++typedef enum __ns_key_types { ++ ns_kt_rsa = 1, ++ ns_kt_dh = 2, ++ ns_kt_dsa = 3, ++ ns_kt_private = 254 ++} ns_key_types; ++ ++typedef enum __ns_cert_types { ++ cert_t_pkix = 1, ++ cert_t_spki = 2, ++ cert_t_pgp = 3, ++ cert_t_url = 253, ++ cert_t_oid = 254 ++} ns_cert_types; ++ ++#define NS_KEY_TYPEMASK 0xC000 ++#define NS_KEY_TYPE_AUTH_CONF 0x0000 ++#define NS_KEY_TYPE_CONF_ONLY 0x8000 ++#define NS_KEY_TYPE_AUTH_ONLY 0x4000 ++#define NS_KEY_TYPE_NO_KEY 0xC000 ++#define NS_KEY_NO_AUTH 0x8000 ++#define NS_KEY_NO_CONF 0x4000 ++#define NS_KEY_RESERVED2 0x2000 ++#define NS_KEY_EXTENDED_FLAGS 0x1000 ++#define NS_KEY_RESERVED4 0x0800 ++#define NS_KEY_RESERVED5 0x0400 ++#define NS_KEY_NAME_TYPE 0x0300 ++#define NS_KEY_NAME_USER 0x0000 ++#define NS_KEY_NAME_ENTITY 0x0200 ++#define NS_KEY_NAME_ZONE 0x0100 ++#define NS_KEY_NAME_RESERVED 0x0300 ++#define NS_KEY_RESERVED8 0x0080 ++#define NS_KEY_RESERVED9 0x0040 ++#define NS_KEY_RESERVED10 0x0020 ++#define NS_KEY_RESERVED11 0x0010 ++#define NS_KEY_SIGNATORYMASK 0x000F ++#define NS_KEY_RESERVED_BITMASK ( NS_KEY_RESERVED2 | \ ++ NS_KEY_RESERVED4 | \ ++ NS_KEY_RESERVED5 | \ ++ NS_KEY_RESERVED8 | \ ++ NS_KEY_RESERVED9 | \ ++ NS_KEY_RESERVED10 | \ ++ NS_KEY_RESERVED11 ) ++#define NS_KEY_RESERVED_BITMASK2 0xFFFF ++#define NS_ALG_MD5RSA 1 ++#define NS_ALG_DH 2 ++#define NS_ALG_DSA 3 ++#define NS_ALG_DSS NS_ALG_DSA ++#define NS_ALG_EXPIRE_ONLY 253 ++#define NS_ALG_PRIVATE_OID 254 ++ ++#define NS_KEY_PROT_TLS 1 ++#define NS_KEY_PROT_EMAIL 2 ++#define NS_KEY_PROT_DNSSEC 3 ++#define NS_KEY_PROT_IPSEC 4 ++#define NS_KEY_PROT_ANY 255 ++ ++#define NS_MD5RSA_MIN_BITS 512 ++#define NS_MD5RSA_MAX_BITS 4096 ++#define NS_MD5RSA_MAX_BYTES ((NS_MD5RSA_MAX_BITS+7/8)*2+3) ++#define NS_MD5RSA_MAX_BASE64 (((NS_MD5RSA_MAX_BYTES+2)/3)*4) ++#define NS_MD5RSA_MIN_SIZE ((NS_MD5RSA_MIN_BITS+7)/8) ++#define NS_MD5RSA_MAX_SIZE ((NS_MD5RSA_MAX_BITS+7)/8) ++ ++#define NS_DSA_SIG_SIZE 41 ++#define NS_DSA_MIN_SIZE 213 ++#define NS_DSA_MAX_BYTES 405 ++ ++#define NS_SIG_TYPE 0 ++#define NS_SIG_ALG 2 ++#define NS_SIG_LABELS 3 ++#define NS_SIG_OTTL 4 ++#define NS_SIG_EXPIR 8 ++#define NS_SIG_SIGNED 12 ++#define NS_SIG_FOOT 16 ++#define NS_SIG_SIGNER 18 ++#define NS_NXT_BITS 8 ++#define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS))) ++#define NS_NXT_BIT_CLEAR(n,p) (p[(n)/NS_NXT_BITS] &= ~(0x80>>((n)%NS_NXT_BITS))) ++#define NS_NXT_BIT_ISSET(n,p) (p[(n)/NS_NXT_BITS] & (0x80>>((n)%NS_NXT_BITS))) ++#define NS_NXT_MAX 127 ++ ++#define NS_OPT_DNSSEC_OK 0x8000U ++#define NS_OPT_NSID 3 ++ ++#define NS_GET16(s, cp) (void)((s) = ns_get16(((cp)+=2)-2)) ++#define NS_GET32(l, cp) (void)((l) = ns_get32(((cp)+=4)-4)) ++#define NS_PUT16(s, cp) ns_put16((s), ((cp)+=2)-2) ++#define NS_PUT32(l, cp) ns_put32((l), ((cp)+=4)-4) ++ ++unsigned ns_get16(const unsigned char *); ++unsigned long ns_get32(const unsigned char *); ++void ns_put16(unsigned, unsigned char *); ++void ns_put32(unsigned long, unsigned char *); ++ ++int ns_initparse(const unsigned char *, int, ns_msg *); ++int ns_parserr(ns_msg *, ns_sect, int, ns_rr *); ++int ns_skiprr(const unsigned char *, const unsigned char *, ns_sect, int); ++int ns_name_uncompress(const unsigned char *, const unsigned char *, const unsigned char *, char *, size_t); ++ ++ ++#define __BIND 19950621 ++ ++typedef struct { ++ unsigned id :16; ++#if __BYTE_ORDER == __BIG_ENDIAN ++ unsigned qr: 1; ++ unsigned opcode: 4; ++ unsigned aa: 1; ++ unsigned tc: 1; ++ unsigned rd: 1; ++ unsigned ra: 1; ++ unsigned unused :1; ++ unsigned ad: 1; ++ unsigned cd: 1; ++ unsigned rcode :4; ++#else ++ unsigned rd :1; ++ unsigned tc :1; ++ unsigned aa :1; ++ unsigned opcode :4; ++ unsigned qr :1; ++ unsigned rcode :4; ++ unsigned cd: 1; ++ unsigned ad: 1; ++ unsigned unused :1; ++ unsigned ra :1; ++#endif ++ unsigned qdcount :16; ++ unsigned ancount :16; ++ unsigned nscount :16; ++ unsigned arcount :16; ++} HEADER; ++ ++#define PACKETSZ NS_PACKETSZ ++#define MAXDNAME NS_MAXDNAME ++#define MAXCDNAME NS_MAXCDNAME ++#define MAXLABEL NS_MAXLABEL ++#define HFIXEDSZ NS_HFIXEDSZ ++#define QFIXEDSZ NS_QFIXEDSZ ++#define RRFIXEDSZ NS_RRFIXEDSZ ++#define INT32SZ NS_INT32SZ ++#define INT16SZ NS_INT16SZ ++#define INT8SZ NS_INT8SZ ++#define INADDRSZ NS_INADDRSZ ++#define IN6ADDRSZ NS_IN6ADDRSZ ++#define INDIR_MASK NS_CMPRSFLGS ++#define NAMESERVER_PORT NS_DEFAULTPORT ++ ++#define S_ZONE ns_s_zn ++#define S_PREREQ ns_s_pr ++#define S_UPDATE ns_s_ud ++#define S_ADDT ns_s_ar ++ ++#define QUERY ns_o_query ++#define IQUERY ns_o_iquery ++#define STATUS ns_o_status ++#define NS_NOTIFY_OP ns_o_notify ++#define NS_UPDATE_OP ns_o_update ++ ++#define NOERROR ns_r_noerror ++#define FORMERR ns_r_formerr ++#define SERVFAIL ns_r_servfail ++#define NXDOMAIN ns_r_nxdomain ++#define NOTIMP ns_r_notimpl ++#define REFUSED ns_r_refused ++#define YXDOMAIN ns_r_yxdomain ++#define YXRRSET ns_r_yxrrset ++#define NXRRSET ns_r_nxrrset ++#define NOTAUTH ns_r_notauth ++#define NOTZONE ns_r_notzone ++ ++#define DELETE ns_uop_delete ++#define ADD ns_uop_add ++ ++#define T_A ns_t_a ++#define T_NS ns_t_ns ++#define T_MD ns_t_md ++#define T_MF ns_t_mf ++#define T_CNAME ns_t_cname ++#define T_SOA ns_t_soa ++#define T_MB ns_t_mb ++#define T_MG ns_t_mg ++#define T_MR ns_t_mr ++#define T_NULL ns_t_null ++#define T_WKS ns_t_wks ++#define T_PTR ns_t_ptr ++#define T_HINFO ns_t_hinfo ++#define T_MINFO ns_t_minfo ++#define T_MX ns_t_mx ++#define T_TXT ns_t_txt ++#define T_RP ns_t_rp ++#define T_AFSDB ns_t_afsdb ++#define T_X25 ns_t_x25 ++#define T_ISDN ns_t_isdn ++#define T_RT ns_t_rt ++#define T_NSAP ns_t_nsap ++#define T_NSAP_PTR ns_t_nsap_ptr ++#define T_SIG ns_t_sig ++#define T_KEY ns_t_key ++#define T_PX ns_t_px ++#define T_GPOS ns_t_gpos ++#define T_AAAA ns_t_aaaa ++#define T_LOC ns_t_loc ++#define T_NXT ns_t_nxt ++#define T_EID ns_t_eid ++#define T_NIMLOC ns_t_nimloc ++#define T_SRV ns_t_srv ++#define T_ATMA ns_t_atma ++#define T_NAPTR ns_t_naptr ++#define T_A6 ns_t_a6 ++#define T_DNAME ns_t_dname ++#define T_TSIG ns_t_tsig ++#define T_IXFR ns_t_ixfr ++#define T_AXFR ns_t_axfr ++#define T_MAILB ns_t_mailb ++#define T_MAILA ns_t_maila ++#define T_ANY ns_t_any ++ ++#define C_IN ns_c_in ++#define C_CHAOS ns_c_chaos ++#define C_HS ns_c_hs ++#define C_NONE ns_c_none ++#define C_ANY ns_c_any ++ ++#define GETSHORT NS_GET16 ++#define GETLONG NS_GET32 ++#define PUTSHORT NS_PUT16 ++#define PUTLONG NS_PUT32 ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/nameser_compat.h b/build/ohos/ohos-sysroot/usr/include/arpa/nameser_compat.h +new file mode 100644 +index 0000000..3aac25c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/nameser_compat.h +@@ -0,0 +1,2 @@ ++#include ++ +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/telnet.h b/build/ohos/ohos-sysroot/usr/include/arpa/telnet.h +new file mode 100644 +index 0000000..e2ad974 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/telnet.h +@@ -0,0 +1,251 @@ ++#ifndef _ARPA_TELNET_H ++#define _ARPA_TELNET_H ++ ++#define IAC 255 ++#define DONT 254 ++#define DO 253 ++#define WONT 252 ++#define WILL 251 ++#define SB 250 ++#define GA 249 ++#define EL 248 ++#define EC 247 ++#define AYT 246 ++#define AO 245 ++#define IP 244 ++#define BREAK 243 ++#define DM 242 ++#define NOP 241 ++#define SE 240 ++#define EOR 239 ++#define ABORT 238 ++#define SUSP 237 ++#define xEOF 236 ++ ++#define SYNCH 242 ++ ++#define telcmds ((char [][6]){ "EOF", "SUSP", "ABORT", "EOR", "SE", "NOP", "DMARK", "BRK", "IP", "AO", "AYT", "EC", "EL", "GA", "SB", "WILL", "WONT", "DO", "DONT", "IAC", 0 }) ++ ++#define TELCMD_FIRST xEOF ++#define TELCMD_LAST IAC ++#define TELCMD_OK(x) ((unsigned int)(x) <= TELCMD_LAST && \ ++ (unsigned int)(x) >= TELCMD_FIRST) ++#define TELCMD(x) telcmds[(x)-TELCMD_FIRST] ++ ++#define TELOPT_BINARY 0 ++#define TELOPT_ECHO 1 ++#define TELOPT_RCP 2 ++#define TELOPT_SGA 3 ++#define TELOPT_NAMS 4 ++#define TELOPT_STATUS 5 ++#define TELOPT_TM 6 ++#define TELOPT_RCTE 7 ++#define TELOPT_NAOL 8 ++#define TELOPT_NAOP 9 ++#define TELOPT_NAOCRD 10 ++#define TELOPT_NAOHTS 11 ++#define TELOPT_NAOHTD 12 ++#define TELOPT_NAOFFD 13 ++#define TELOPT_NAOVTS 14 ++#define TELOPT_NAOVTD 15 ++#define TELOPT_NAOLFD 16 ++#define TELOPT_XASCII 17 ++#define TELOPT_LOGOUT 18 ++#define TELOPT_BM 19 ++#define TELOPT_DET 20 ++#define TELOPT_SUPDUP 21 ++#define TELOPT_SUPDUPOUTPUT 22 ++#define TELOPT_SNDLOC 23 ++#define TELOPT_TTYPE 24 ++#define TELOPT_EOR 25 ++#define TELOPT_TUID 26 ++#define TELOPT_OUTMRK 27 ++#define TELOPT_TTYLOC 28 ++#define TELOPT_3270REGIME 29 ++#define TELOPT_X3PAD 30 ++#define TELOPT_NAWS 31 ++#define TELOPT_TSPEED 32 ++#define TELOPT_LFLOW 33 ++#define TELOPT_LINEMODE 34 ++#define TELOPT_XDISPLOC 35 ++#define TELOPT_OLD_ENVIRON 36 ++#define TELOPT_AUTHENTICATION 37/* Authenticate */ ++#define TELOPT_ENCRYPT 38 ++#define TELOPT_NEW_ENVIRON 39 ++#define TELOPT_EXOPL 255 ++ ++ ++#define NTELOPTS (1+TELOPT_NEW_ENVIRON) ++#ifdef TELOPTS ++char *telopts[NTELOPTS+1] = { ++ "BINARY", "ECHO", "RCP", "SUPPRESS GO AHEAD", "NAME", ++ "STATUS", "TIMING MARK", "RCTE", "NAOL", "NAOP", ++ "NAOCRD", "NAOHTS", "NAOHTD", "NAOFFD", "NAOVTS", ++ "NAOVTD", "NAOLFD", "EXTEND ASCII", "LOGOUT", "BYTE MACRO", ++ "DATA ENTRY TERMINAL", "SUPDUP", "SUPDUP OUTPUT", ++ "SEND LOCATION", "TERMINAL TYPE", "END OF RECORD", ++ "TACACS UID", "OUTPUT MARKING", "TTYLOC", ++ "3270 REGIME", "X.3 PAD", "NAWS", "TSPEED", "LFLOW", ++ "LINEMODE", "XDISPLOC", "OLD-ENVIRON", "AUTHENTICATION", ++ "ENCRYPT", "NEW-ENVIRON", ++ 0, ++}; ++#define TELOPT_FIRST TELOPT_BINARY ++#define TELOPT_LAST TELOPT_NEW_ENVIRON ++#define TELOPT_OK(x) ((unsigned int)(x) <= TELOPT_LAST) ++#define TELOPT(x) telopts[(x)-TELOPT_FIRST] ++#endif ++ ++#define TELQUAL_IS 0 ++#define TELQUAL_SEND 1 ++#define TELQUAL_INFO 2 ++#define TELQUAL_REPLY 2 ++#define TELQUAL_NAME 3 ++ ++#define LFLOW_OFF 0 ++#define LFLOW_ON 1 ++#define LFLOW_RESTART_ANY 2 ++#define LFLOW_RESTART_XON 3 ++ ++ ++#define LM_MODE 1 ++#define LM_FORWARDMASK 2 ++#define LM_SLC 3 ++ ++#define MODE_EDIT 0x01 ++#define MODE_TRAPSIG 0x02 ++#define MODE_ACK 0x04 ++#define MODE_SOFT_TAB 0x08 ++#define MODE_LIT_ECHO 0x10 ++ ++#define MODE_MASK 0x1f ++ ++#define MODE_FLOW 0x0100 ++#define MODE_ECHO 0x0200 ++#define MODE_INBIN 0x0400 ++#define MODE_OUTBIN 0x0800 ++#define MODE_FORCE 0x1000 ++ ++#define SLC_SYNCH 1 ++#define SLC_BRK 2 ++#define SLC_IP 3 ++#define SLC_AO 4 ++#define SLC_AYT 5 ++#define SLC_EOR 6 ++#define SLC_ABORT 7 ++#define SLC_EOF 8 ++#define SLC_SUSP 9 ++#define SLC_EC 10 ++#define SLC_EL 11 ++#define SLC_EW 12 ++#define SLC_RP 13 ++#define SLC_LNEXT 14 ++#define SLC_XON 15 ++#define SLC_XOFF 16 ++#define SLC_FORW1 17 ++#define SLC_FORW2 18 ++ ++#define NSLC 18 ++ ++#define SLC_NAMELIST "0", "SYNCH", "BRK", "IP", "AO", "AYT", "EOR", \ ++ "ABORT", "EOF", "SUSP", "EC", "EL", "EW", "RP", \ ++ "LNEXT", "XON", "XOFF", "FORW1", "FORW2", 0, ++#ifdef SLC_NAMES ++char *slc_names[] = { ++ SLC_NAMELIST ++}; ++#else ++extern char *slc_names[]; ++#define SLC_NAMES SLC_NAMELIST ++#endif ++ ++#define SLC_NAME_OK(x) ((unsigned int)(x) <= NSLC) ++#define SLC_NAME(x) slc_names[x] ++ ++#define SLC_NOSUPPORT 0 ++#define SLC_CANTCHANGE 1 ++#define SLC_VARIABLE 2 ++#define SLC_DEFAULT 3 ++#define SLC_LEVELBITS 0x03 ++ ++#define SLC_FUNC 0 ++#define SLC_FLAGS 1 ++#define SLC_VALUE 2 ++ ++#define SLC_ACK 0x80 ++#define SLC_FLUSHIN 0x40 ++#define SLC_FLUSHOUT 0x20 ++ ++#define OLD_ENV_VAR 1 ++#define OLD_ENV_VALUE 0 ++#define NEW_ENV_VAR 0 ++#define NEW_ENV_VALUE 1 ++#define ENV_ESC 2 ++#define ENV_USERVAR 3 ++ ++#define AUTH_WHO_CLIENT 0 ++#define AUTH_WHO_SERVER 1 ++#define AUTH_WHO_MASK 1 ++ ++#define AUTH_HOW_ONE_WAY 0 ++#define AUTH_HOW_MUTUAL 2 ++#define AUTH_HOW_MASK 2 ++ ++#define AUTHTYPE_NULL 0 ++#define AUTHTYPE_KERBEROS_V4 1 ++#define AUTHTYPE_KERBEROS_V5 2 ++#define AUTHTYPE_SPX 3 ++#define AUTHTYPE_MINK 4 ++#define AUTHTYPE_CNT 5 ++ ++#define AUTHTYPE_TEST 99 ++ ++#ifdef AUTH_NAMES ++char *authtype_names[] = { ++ "NULL", "KERBEROS_V4", "KERBEROS_V5", "SPX", "MINK", 0, ++}; ++#else ++extern char *authtype_names[]; ++#endif ++ ++#define AUTHTYPE_NAME_OK(x) ((unsigned int)(x) < AUTHTYPE_CNT) ++#define AUTHTYPE_NAME(x) authtype_names[x] ++ ++#define ENCRYPT_IS 0 ++#define ENCRYPT_SUPPORT 1 ++#define ENCRYPT_REPLY 2 ++#define ENCRYPT_START 3 ++#define ENCRYPT_END 4 ++#define ENCRYPT_REQSTART 5 ++#define ENCRYPT_REQEND 6 ++#define ENCRYPT_ENC_KEYID 7 ++#define ENCRYPT_DEC_KEYID 8 ++#define ENCRYPT_CNT 9 ++ ++#define ENCTYPE_ANY 0 ++#define ENCTYPE_DES_CFB64 1 ++#define ENCTYPE_DES_OFB64 2 ++#define ENCTYPE_CNT 3 ++ ++#ifdef ENCRYPT_NAMES ++char *encrypt_names[] = { ++ "IS", "SUPPORT", "REPLY", "START", "END", ++ "REQUEST-START", "REQUEST-END", "ENC-KEYID", "DEC-KEYID", ++ 0, ++}; ++char *enctype_names[] = { ++ "ANY", "DES_CFB64", "DES_OFB64", 0, ++}; ++#else ++extern char *encrypt_names[]; ++extern char *enctype_names[]; ++#endif ++ ++ ++#define ENCRYPT_NAME_OK(x) ((unsigned int)(x) < ENCRYPT_CNT) ++#define ENCRYPT_NAME(x) encrypt_names[x] ++ ++#define ENCTYPE_NAME_OK(x) ((unsigned int)(x) < ENCTYPE_CNT) ++#define ENCTYPE_NAME(x) enctype_names[x] ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/arpa/tftp.h b/build/ohos/ohos-sysroot/usr/include/arpa/tftp.h +new file mode 100644 +index 0000000..799c54f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/arpa/tftp.h +@@ -0,0 +1,31 @@ ++#ifndef _ARPA_TFTP_H ++#define _ARPA_TFTP_H ++#define SEGSIZE 512 ++#define RRQ 01 ++#define WRQ 02 ++#define DATA 03 ++#define ACK 04 ++#define ERROR 05 ++struct tftphdr { ++ short th_opcode; ++ union { ++ unsigned short tu_block; ++ short tu_code; ++ char tu_stuff[1]; ++ } th_u; ++ char th_data[1]; ++}; ++#define th_block th_u.tu_block ++#define th_code th_u.tu_code ++#define th_stuff th_u.tu_stuff ++#define th_msg th_data ++#define EUNDEF 0 ++#define ENOTFOUND 1 ++#define EACCESS 2 ++#define ENOSPACE 3 ++#define EBADOP 4 ++#define EBADID 5 ++#define EEXISTS 6 ++#define ENOUSER 7 ++#endif ++ +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/auxvec.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/auxvec.h +new file mode 100644 +index 0000000..fad637b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/auxvec.h +@@ -0,0 +1,21 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_AUXVEC_H ++#define __ASM_GENERIC_AUXVEC_H ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/bitsperlong.h +new file mode 100644 +index 0000000..8fb379f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/bitsperlong.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG ++#define _UAPI__ASM_GENERIC_BITS_PER_LONG ++#ifndef __BITS_PER_LONG ++#define __BITS_PER_LONG 32 ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/bpf_perf_event.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/bpf_perf_event.h +new file mode 100644 +index 0000000..794927b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/bpf_perf_event.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__ ++#define _UAPI__ASM_GENERIC_BPF_PERF_EVENT_H__ ++#include ++typedef struct pt_regs bpf_user_pt_regs_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/errno-base.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/errno-base.h +new file mode 100644 +index 0000000..bdfb811 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/errno-base.h +@@ -0,0 +1,55 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_ERRNO_BASE_H ++#define _ASM_GENERIC_ERRNO_BASE_H ++#define EPERM 1 ++#define ENOENT 2 ++#define ESRCH 3 ++#define EINTR 4 ++#define EIO 5 ++#define ENXIO 6 ++#define E2BIG 7 ++#define ENOEXEC 8 ++#define EBADF 9 ++#define ECHILD 10 ++#define EAGAIN 11 ++#define ENOMEM 12 ++#define EACCES 13 ++#define EFAULT 14 ++#define ENOTBLK 15 ++#define EBUSY 16 ++#define EEXIST 17 ++#define EXDEV 18 ++#define ENODEV 19 ++#define ENOTDIR 20 ++#define EISDIR 21 ++#define EINVAL 22 ++#define ENFILE 23 ++#define EMFILE 24 ++#define ENOTTY 25 ++#define ETXTBSY 26 ++#define EFBIG 27 ++#define ENOSPC 28 ++#define ESPIPE 29 ++#define EROFS 30 ++#define EMLINK 31 ++#define EPIPE 32 ++#define EDOM 33 ++#define ERANGE 34 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/errno.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/errno.h +new file mode 100644 +index 0000000..6a2c285 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/errno.h +@@ -0,0 +1,121 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_ERRNO_H ++#define _ASM_GENERIC_ERRNO_H ++#include ++#define EDEADLK 35 ++#define ENAMETOOLONG 36 ++#define ENOLCK 37 ++#define ENOSYS 38 ++#define ENOTEMPTY 39 ++#define ELOOP 40 ++#define EWOULDBLOCK EAGAIN ++#define ENOMSG 42 ++#define EIDRM 43 ++#define ECHRNG 44 ++#define EL2NSYNC 45 ++#define EL3HLT 46 ++#define EL3RST 47 ++#define ELNRNG 48 ++#define EUNATCH 49 ++#define ENOCSI 50 ++#define EL2HLT 51 ++#define EBADE 52 ++#define EBADR 53 ++#define EXFULL 54 ++#define ENOANO 55 ++#define EBADRQC 56 ++#define EBADSLT 57 ++#define EDEADLOCK EDEADLK ++#define EBFONT 59 ++#define ENOSTR 60 ++#define ENODATA 61 ++#define ETIME 62 ++#define ENOSR 63 ++#define ENONET 64 ++#define ENOPKG 65 ++#define EREMOTE 66 ++#define ENOLINK 67 ++#define EADV 68 ++#define ESRMNT 69 ++#define ECOMM 70 ++#define EPROTO 71 ++#define EMULTIHOP 72 ++#define EDOTDOT 73 ++#define EBADMSG 74 ++#define EOVERFLOW 75 ++#define ENOTUNIQ 76 ++#define EBADFD 77 ++#define EREMCHG 78 ++#define ELIBACC 79 ++#define ELIBBAD 80 ++#define ELIBSCN 81 ++#define ELIBMAX 82 ++#define ELIBEXEC 83 ++#define EILSEQ 84 ++#define ERESTART 85 ++#define ESTRPIPE 86 ++#define EUSERS 87 ++#define ENOTSOCK 88 ++#define EDESTADDRREQ 89 ++#define EMSGSIZE 90 ++#define EPROTOTYPE 91 ++#define ENOPROTOOPT 92 ++#define EPROTONOSUPPORT 93 ++#define ESOCKTNOSUPPORT 94 ++#define EOPNOTSUPP 95 ++#define EPFNOSUPPORT 96 ++#define EAFNOSUPPORT 97 ++#define EADDRINUSE 98 ++#define EADDRNOTAVAIL 99 ++#define ENETDOWN 100 ++#define ENETUNREACH 101 ++#define ENETRESET 102 ++#define ECONNABORTED 103 ++#define ECONNRESET 104 ++#define ENOBUFS 105 ++#define EISCONN 106 ++#define ENOTCONN 107 ++#define ESHUTDOWN 108 ++#define ETOOMANYREFS 109 ++#define ETIMEDOUT 110 ++#define ECONNREFUSED 111 ++#define EHOSTDOWN 112 ++#define EHOSTUNREACH 113 ++#define EALREADY 114 ++#define EINPROGRESS 115 ++#define ESTALE 116 ++#define EUCLEAN 117 ++#define ENOTNAM 118 ++#define ENAVAIL 119 ++#define EISNAM 120 ++#define EREMOTEIO 121 ++#define EDQUOT 122 ++#define ENOMEDIUM 123 ++#define EMEDIUMTYPE 124 ++#define ECANCELED 125 ++#define ENOKEY 126 ++#define EKEYEXPIRED 127 ++#define EKEYREVOKED 128 ++#define EKEYREJECTED 129 ++#define EOWNERDEAD 130 ++#define ENOTRECOVERABLE 131 ++#define ERFKILL 132 ++#define EHWPOISON 133 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/fcntl.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/fcntl.h +new file mode 100644 +index 0000000..0afcf06 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/fcntl.h +@@ -0,0 +1,173 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_FCNTL_H ++#define _ASM_GENERIC_FCNTL_H ++ ++#include ++#define O_ACCMODE 00000003 ++#define O_RDONLY 00000000 ++#define O_WRONLY 00000001 ++#define O_RDWR 00000002 ++#ifndef O_CREAT ++#define O_CREAT 00000100 ++#endif ++#ifndef O_EXCL ++#define O_EXCL 00000200 ++#endif ++#ifndef O_NOCTTY ++#define O_NOCTTY 00000400 ++#endif ++#ifndef O_TRUNC ++#define O_TRUNC 00001000 ++#endif ++#ifndef O_APPEND ++#define O_APPEND 00002000 ++#endif ++#ifndef O_NONBLOCK ++#define O_NONBLOCK 00004000 ++#endif ++#ifndef O_DSYNC ++#define O_DSYNC 00010000 ++#endif ++#ifndef FASYNC ++#define FASYNC 00020000 ++#endif ++#ifndef O_DIRECT ++#define O_DIRECT 00040000 ++#endif ++#ifndef O_LARGEFILE ++#define O_LARGEFILE 00100000 ++#endif ++#ifndef O_DIRECTORY ++#define O_DIRECTORY 00200000 ++#endif ++#ifndef O_NOFOLLOW ++#define O_NOFOLLOW 00400000 ++#endif ++#ifndef O_NOATIME ++#define O_NOATIME 01000000 ++#endif ++#ifndef O_CLOEXEC ++#define O_CLOEXEC 02000000 ++#endif ++#ifndef O_SYNC ++#define __O_SYNC 04000000 ++#define O_SYNC (__O_SYNC | O_DSYNC) ++#endif ++#ifndef O_PATH ++#define O_PATH 010000000 ++#endif ++#ifndef __O_TMPFILE ++#define __O_TMPFILE 020000000 ++#endif ++#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY) ++#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT) ++#ifndef O_NDELAY ++#define O_NDELAY O_NONBLOCK ++#endif ++#define F_DUPFD 0 ++#define F_GETFD 1 ++#define F_SETFD 2 ++#define F_GETFL 3 ++#define F_SETFL 4 ++#ifndef F_GETLK ++#define F_GETLK 5 ++#define F_SETLK 6 ++#define F_SETLKW 7 ++#endif ++#ifndef F_SETOWN ++#define F_SETOWN 8 ++#define F_GETOWN 9 ++#endif ++#ifndef F_SETSIG ++#define F_SETSIG 10 ++#define F_GETSIG 11 ++#endif ++#ifndef __LP64__ ++#ifndef F_GETLK64 ++#define F_GETLK64 12 ++#define F_SETLK64 13 ++#define F_SETLKW64 14 ++#endif ++#endif ++#ifndef F_SETOWN_EX ++#define F_SETOWN_EX 15 ++#define F_GETOWN_EX 16 ++#endif ++#ifndef F_GETOWNER_UIDS ++#define F_GETOWNER_UIDS 17 ++#endif ++#define F_OFD_GETLK 36 ++#define F_OFD_SETLK 37 ++#define F_OFD_SETLKW 38 ++#define F_OWNER_TID 0 ++#define F_OWNER_PID 1 ++#define F_OWNER_PGRP 2 ++struct f_owner_ex { ++ int type; ++ __kernel_pid_t pid; ++}; ++#define FD_CLOEXEC 1 ++#ifndef F_RDLCK ++#define F_RDLCK 0 ++#define F_WRLCK 1 ++#define F_UNLCK 2 ++#endif ++#ifndef F_EXLCK ++#define F_EXLCK 4 ++#define F_SHLCK 8 ++#endif ++#define LOCK_SH 1 ++#define LOCK_EX 2 ++#define LOCK_NB 4 ++#define LOCK_UN 8 ++#define LOCK_MAND 32 ++#define LOCK_READ 64 ++#define LOCK_WRITE 128 ++#define LOCK_RW 192 ++#define F_LINUX_SPECIFIC_BASE 1024 ++#ifndef HAVE_ARCH_STRUCT_FLOCK ++#ifndef __ARCH_FLOCK_PAD ++#define __ARCH_FLOCK_PAD ++#endif ++ ++struct flock { ++ short l_type; ++ short l_whence; ++ __kernel_off_t l_start; ++ __kernel_off_t l_len; ++ __kernel_pid_t l_pid; ++ __ARCH_FLOCK_PAD ++}; ++#endif ++#ifndef HAVE_ARCH_STRUCT_FLOCK64 ++#ifndef __ARCH_FLOCK64_PAD ++#define __ARCH_FLOCK64_PAD ++#endif ++ ++struct flock64 { ++ short l_type; ++ short l_whence; ++ __kernel_loff_t l_start; ++ __kernel_loff_t l_len; ++ __kernel_pid_t l_pid; ++ __ARCH_FLOCK64_PAD ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/hugetlb_encode.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/hugetlb_encode.h +new file mode 100644 +index 0000000..73d8180 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/hugetlb_encode.h +@@ -0,0 +1,36 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_HUGETLB_ENCODE_H_ ++#define _ASM_GENERIC_HUGETLB_ENCODE_H_ ++#define HUGETLB_FLAG_ENCODE_SHIFT 26 ++#define HUGETLB_FLAG_ENCODE_MASK 0x3f ++#define HUGETLB_FLAG_ENCODE_16KB (14 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_64KB (16 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_512KB (19 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_1MB (20 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_2MB (21 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_8MB (23 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_16MB (24 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_32MB (25 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_256MB (28 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_512MB (29 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_1GB (30 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_2GB (31 << HUGETLB_FLAG_ENCODE_SHIFT) ++#define HUGETLB_FLAG_ENCODE_16GB (34 << HUGETLB_FLAG_ENCODE_SHIFT) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/int-l64.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/int-l64.h +new file mode 100644 +index 0000000..6ddf740 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/int-l64.h +@@ -0,0 +1,32 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_INT_L64_H ++#define _UAPI_ASM_GENERIC_INT_L64_H ++#include ++#ifndef __ASSEMBLY__ ++typedef __signed__ char __s8; ++typedef unsigned char __u8; ++typedef __signed__ short __s16; ++typedef unsigned short __u16; ++typedef __signed__ int __s32; ++typedef unsigned int __u32; ++typedef __signed__ long __s64; ++typedef unsigned long __u64; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/int-ll64.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/int-ll64.h +new file mode 100644 +index 0000000..dcad2eb +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/int-ll64.h +@@ -0,0 +1,37 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_INT_LL64_H ++#define _UAPI_ASM_GENERIC_INT_LL64_H ++#include ++#ifndef __ASSEMBLY__ ++typedef __signed__ char __s8; ++typedef unsigned char __u8; ++typedef __signed__ short __s16; ++typedef unsigned short __u16; ++typedef __signed__ int __s32; ++typedef unsigned int __u32; ++#ifdef __GNUC__ ++__extension__ typedef __signed__ long long __s64; ++__extension__ typedef unsigned long long __u64; ++#else ++typedef __signed__ long long __s64; ++typedef unsigned long long __u64; ++#endif ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctl.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctl.h +new file mode 100644 +index 0000000..84c2ec8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctl.h +@@ -0,0 +1,64 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_IOCTL_H ++#define _UAPI_ASM_GENERIC_IOCTL_H ++#define _IOC_NRBITS 8 ++#define _IOC_TYPEBITS 8 ++#ifndef _IOC_SIZEBITS ++#define _IOC_SIZEBITS 14 ++#endif ++#ifndef _IOC_DIRBITS ++#define _IOC_DIRBITS 2 ++#endif ++#define _IOC_NRMASK ((1 << _IOC_NRBITS) - 1) ++#define _IOC_TYPEMASK ((1 << _IOC_TYPEBITS) - 1) ++#define _IOC_SIZEMASK ((1 << _IOC_SIZEBITS) - 1) ++#define _IOC_DIRMASK ((1 << _IOC_DIRBITS) - 1) ++#define _IOC_NRSHIFT 0 ++#define _IOC_TYPESHIFT (_IOC_NRSHIFT + _IOC_NRBITS) ++#define _IOC_SIZESHIFT (_IOC_TYPESHIFT + _IOC_TYPEBITS) ++#define _IOC_DIRSHIFT (_IOC_SIZESHIFT + _IOC_SIZEBITS) ++#ifndef _IOC_NONE ++#define _IOC_NONE 0U ++#endif ++#ifndef _IOC_WRITE ++#define _IOC_WRITE 1U ++#endif ++#ifndef _IOC_READ ++#define _IOC_READ 2U ++#endif ++#define _IOC(dir,type,nr,size) (((dir) << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr) << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT)) ++#define _IOC_TYPECHECK(t) (sizeof(t)) ++#define _IO(type,nr) _IOC(_IOC_NONE, (type), (nr), 0) ++#define _IOR(type,nr,size) _IOC(_IOC_READ, (type), (nr), (_IOC_TYPECHECK(size))) ++#define _IOW(type,nr,size) _IOC(_IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(size))) ++#define _IOWR(type,nr,size) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), (_IOC_TYPECHECK(size))) ++#define _IOR_BAD(type,nr,size) _IOC(_IOC_READ, (type), (nr), sizeof(size)) ++#define _IOW_BAD(type,nr,size) _IOC(_IOC_WRITE, (type), (nr), sizeof(size)) ++#define _IOWR_BAD(type,nr,size) _IOC(_IOC_READ | _IOC_WRITE, (type), (nr), sizeof(size)) ++#define _IOC_DIR(nr) (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK) ++#define _IOC_TYPE(nr) (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK) ++#define _IOC_NR(nr) (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK) ++#define _IOC_SIZE(nr) (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK) ++#define IOC_IN (_IOC_WRITE << _IOC_DIRSHIFT) ++#define IOC_OUT (_IOC_READ << _IOC_DIRSHIFT) ++#define IOC_INOUT ((_IOC_WRITE | _IOC_READ) << _IOC_DIRSHIFT) ++#define IOCSIZE_MASK (_IOC_SIZEMASK << _IOC_SIZESHIFT) ++#define IOCSIZE_SHIFT (_IOC_SIZESHIFT) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctls.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctls.h +new file mode 100644 +index 0000000..f8a4357 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/ioctls.h +@@ -0,0 +1,112 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_IOCTLS_H ++#define __ASM_GENERIC_IOCTLS_H ++#include ++#define TCGETS 0x5401 ++#define TCSETS 0x5402 ++#define TCSETSW 0x5403 ++#define TCSETSF 0x5404 ++#define TCGETA 0x5405 ++#define TCSETA 0x5406 ++#define TCSETAW 0x5407 ++#define TCSETAF 0x5408 ++#define TCSBRK 0x5409 ++#define TCXONC 0x540A ++#define TCFLSH 0x540B ++#define TIOCEXCL 0x540C ++#define TIOCNXCL 0x540D ++#define TIOCSCTTY 0x540E ++#define TIOCGPGRP 0x540F ++#define TIOCSPGRP 0x5410 ++#define TIOCOUTQ 0x5411 ++#define TIOCSTI 0x5412 ++#define TIOCGWINSZ 0x5413 ++#define TIOCSWINSZ 0x5414 ++#define TIOCMGET 0x5415 ++#define TIOCMBIS 0x5416 ++#define TIOCMBIC 0x5417 ++#define TIOCMSET 0x5418 ++#define TIOCGSOFTCAR 0x5419 ++#define TIOCSSOFTCAR 0x541A ++#define FIONREAD 0x541B ++#define TIOCINQ FIONREAD ++#define TIOCLINUX 0x541C ++#define TIOCCONS 0x541D ++#define TIOCGSERIAL 0x541E ++#define TIOCSSERIAL 0x541F ++#define TIOCPKT 0x5420 ++#define FIONBIO 0x5421 ++#define TIOCNOTTY 0x5422 ++#define TIOCSETD 0x5423 ++#define TIOCGETD 0x5424 ++#define TCSBRKP 0x5425 ++#define TIOCSBRK 0x5427 ++#define TIOCCBRK 0x5428 ++#define TIOCGSID 0x5429 ++#define TCGETS2 _IOR('T', 0x2A, struct termios2) ++#define TCSETS2 _IOW('T', 0x2B, struct termios2) ++#define TCSETSW2 _IOW('T', 0x2C, struct termios2) ++#define TCSETSF2 _IOW('T', 0x2D, struct termios2) ++#define TIOCGRS485 0x542E ++#ifndef TIOCSRS485 ++#define TIOCSRS485 0x542F ++#endif ++#define TIOCGPTN _IOR('T', 0x30, unsigned int) ++#define TIOCSPTLCK _IOW('T', 0x31, int) ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) ++#define TCGETX 0x5432 ++#define TCSETX 0x5433 ++#define TCSETXF 0x5434 ++#define TCSETXW 0x5435 ++#define TIOCSIG _IOW('T', 0x36, int) ++#define TIOCVHANGUP 0x5437 ++#define TIOCGPKT _IOR('T', 0x38, int) ++#define TIOCGPTLCK _IOR('T', 0x39, int) ++#define TIOCGEXCL _IOR('T', 0x40, int) ++#define TIOCGPTPEER _IO('T', 0x41) ++#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) ++#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) ++#define FIONCLEX 0x5450 ++#define FIOCLEX 0x5451 ++#define FIOASYNC 0x5452 ++#define TIOCSERCONFIG 0x5453 ++#define TIOCSERGWILD 0x5454 ++#define TIOCSERSWILD 0x5455 ++#define TIOCGLCKTRMIOS 0x5456 ++#define TIOCSLCKTRMIOS 0x5457 ++#define TIOCSERGSTRUCT 0x5458 ++#define TIOCSERGETLSR 0x5459 ++#define TIOCSERGETMULTI 0x545A ++#define TIOCSERSETMULTI 0x545B ++#define TIOCMIWAIT 0x545C ++#define TIOCGICOUNT 0x545D ++#ifndef FIOQSIZE ++#define FIOQSIZE 0x5460 ++#endif ++#define TIOCPKT_DATA 0 ++#define TIOCPKT_FLUSHREAD 1 ++#define TIOCPKT_FLUSHWRITE 2 ++#define TIOCPKT_STOP 4 ++#define TIOCPKT_START 8 ++#define TIOCPKT_NOSTOP 16 ++#define TIOCPKT_DOSTOP 32 ++#define TIOCPKT_IOCTL 64 ++#define TIOCSER_TEMT 0x01 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/ipcbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/ipcbuf.h +new file mode 100644 +index 0000000..40c45ab +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/ipcbuf.h +@@ -0,0 +1,35 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_IPCBUF_H ++#define __ASM_GENERIC_IPCBUF_H ++#include ++struct ipc64_perm { ++ __kernel_key_t key; ++ __kernel_uid32_t uid; ++ __kernel_gid32_t gid; ++ __kernel_uid32_t cuid; ++ __kernel_gid32_t cgid; ++ __kernel_mode_t mode; ++ unsigned char __pad1[4 - sizeof(__kernel_mode_t)]; ++ unsigned short seq; ++ unsigned short __pad2; ++ __kernel_ulong_t __unused1; ++ __kernel_ulong_t __unused2; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/kvm_para.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/kvm_para.h +new file mode 100644 +index 0000000..878419c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/kvm_para.h +@@ -0,0 +1,18 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/mman-common.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/mman-common.h +new file mode 100644 +index 0000000..a088ce5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/mman-common.h +@@ -0,0 +1,67 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_MMAN_COMMON_H ++#define __ASM_GENERIC_MMAN_COMMON_H ++#define PROT_READ 0x1 ++#define PROT_WRITE 0x2 ++#define PROT_EXEC 0x4 ++#define PROT_SEM 0x8 ++#define PROT_NONE 0x0 ++#define PROT_GROWSDOWN 0x01000000 ++#define PROT_GROWSUP 0x02000000 ++#define MAP_TYPE 0x0f ++#define MAP_FIXED 0x10 ++#define MAP_ANONYMOUS 0x20 ++#define MAP_POPULATE 0x008000 ++#define MAP_NONBLOCK 0x010000 ++#define MAP_STACK 0x020000 ++#define MAP_HUGETLB 0x040000 ++#define MAP_SYNC 0x080000 ++#define MAP_FIXED_NOREPLACE 0x100000 ++#define MAP_UNINITIALIZED 0x4000000 ++#define MLOCK_ONFAULT 0x01 ++#define MS_ASYNC 1 ++#define MS_INVALIDATE 2 ++#define MS_SYNC 4 ++#define MADV_NORMAL 0 ++#define MADV_RANDOM 1 ++#define MADV_SEQUENTIAL 2 ++#define MADV_WILLNEED 3 ++#define MADV_DONTNEED 4 ++#define MADV_FREE 8 ++#define MADV_REMOVE 9 ++#define MADV_DONTFORK 10 ++#define MADV_DOFORK 11 ++#define MADV_HWPOISON 100 ++#define MADV_SOFT_OFFLINE 101 ++#define MADV_MERGEABLE 12 ++#define MADV_UNMERGEABLE 13 ++#define MADV_HUGEPAGE 14 ++#define MADV_NOHUGEPAGE 15 ++#define MADV_DONTDUMP 16 ++#define MADV_DODUMP 17 ++#define MADV_WIPEONFORK 18 ++#define MADV_KEEPONFORK 19 ++#define MADV_COLD 20 ++#define MADV_PAGEOUT 21 ++#define MAP_FILE 0 ++#define PKEY_DISABLE_ACCESS 0x1 ++#define PKEY_DISABLE_WRITE 0x2 ++#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/mman.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/mman.h +new file mode 100644 +index 0000000..33d43f7 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/mman.h +@@ -0,0 +1,30 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_MMAN_H ++#define __ASM_GENERIC_MMAN_H ++#include ++#define MAP_GROWSDOWN 0x0100 ++#define MAP_DENYWRITE 0x0800 ++#define MAP_EXECUTABLE 0x1000 ++#define MAP_LOCKED 0x2000 ++#define MAP_NORESERVE 0x4000 ++#define MCL_CURRENT 1 ++#define MCL_FUTURE 2 ++#define MCL_ONFAULT 4 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/msgbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/msgbuf.h +new file mode 100644 +index 0000000..827d050 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/msgbuf.h +@@ -0,0 +1,45 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_MSGBUF_H ++#define __ASM_GENERIC_MSGBUF_H ++#include ++#include ++struct msqid64_ds { ++ struct ipc64_perm msg_perm; ++#if __BITS_PER_LONG == 64 ++ long msg_stime; ++ long msg_rtime; ++ long msg_ctime; ++#else ++ unsigned long msg_stime; ++ unsigned long msg_stime_high; ++ unsigned long msg_rtime; ++ unsigned long msg_rtime_high; ++ unsigned long msg_ctime; ++ unsigned long msg_ctime_high; ++#endif ++ unsigned long msg_cbytes; ++ unsigned long msg_qnum; ++ unsigned long msg_qbytes; ++ __kernel_pid_t msg_lspid; ++ __kernel_pid_t msg_lrpid; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/param.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/param.h +new file mode 100644 +index 0000000..7897799 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/param.h +@@ -0,0 +1,31 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_GENERIC_PARAM_H ++#define _UAPI__ASM_GENERIC_PARAM_H ++#ifndef HZ ++#define HZ 100 ++#endif ++#ifndef EXEC_PAGESIZE ++#define EXEC_PAGESIZE 4096 ++#endif ++#ifndef NOGROUP ++#define NOGROUP (- 1) ++#endif ++#define MAXHOSTNAMELEN 64 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/poll.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/poll.h +new file mode 100644 +index 0000000..372bc77 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/poll.h +@@ -0,0 +1,51 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_POLL_H ++#define __ASM_GENERIC_POLL_H ++#define POLLIN 0x0001 ++#define POLLPRI 0x0002 ++#define POLLOUT 0x0004 ++#define POLLERR 0x0008 ++#define POLLHUP 0x0010 ++#define POLLNVAL 0x0020 ++#define POLLRDNORM 0x0040 ++#define POLLRDBAND 0x0080 ++#ifndef POLLWRNORM ++#define POLLWRNORM 0x0100 ++#endif ++#ifndef POLLWRBAND ++#define POLLWRBAND 0x0200 ++#endif ++#ifndef POLLMSG ++#define POLLMSG 0x0400 ++#endif ++#ifndef POLLREMOVE ++#define POLLREMOVE 0x1000 ++#endif ++#ifndef POLLRDHUP ++#define POLLRDHUP 0x2000 ++#endif ++#define POLLFREE (__force __poll_t) 0x4000 ++#define POLL_BUSY_LOOP (__force __poll_t) 0x8000 ++struct pollfd { ++ int fd; ++ short events; ++ short revents; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/posix_types.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/posix_types.h +new file mode 100644 +index 0000000..4045127 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/posix_types.h +@@ -0,0 +1,86 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_POSIX_TYPES_H ++#define __ASM_GENERIC_POSIX_TYPES_H ++#include ++#ifndef __kernel_long_t ++typedef long __kernel_long_t; ++typedef unsigned long __kernel_ulong_t; ++#endif ++#ifndef __kernel_ino_t ++typedef __kernel_ulong_t __kernel_ino_t; ++#endif ++#ifndef __kernel_mode_t ++typedef unsigned int __kernel_mode_t; ++#endif ++#ifndef __kernel_pid_t ++typedef int __kernel_pid_t; ++#endif ++#ifndef __kernel_ipc_pid_t ++typedef int __kernel_ipc_pid_t; ++#endif ++#ifndef __kernel_uid_t ++typedef unsigned int __kernel_uid_t; ++typedef unsigned int __kernel_gid_t; ++#endif ++#ifndef __kernel_suseconds_t ++typedef __kernel_long_t __kernel_suseconds_t; ++#endif ++#ifndef __kernel_daddr_t ++typedef int __kernel_daddr_t; ++#endif ++#ifndef __kernel_uid32_t ++typedef unsigned int __kernel_uid32_t; ++typedef unsigned int __kernel_gid32_t; ++#endif ++#ifndef __kernel_old_uid_t ++typedef __kernel_uid_t __kernel_old_uid_t; ++typedef __kernel_gid_t __kernel_old_gid_t; ++#endif ++#ifndef __kernel_old_dev_t ++typedef unsigned int __kernel_old_dev_t; ++#endif ++#ifndef __kernel_size_t ++#if __BITS_PER_LONG != 64 ++typedef unsigned int __kernel_size_t; ++typedef int __kernel_ssize_t; ++typedef int __kernel_ptrdiff_t; ++#else ++typedef __kernel_ulong_t __kernel_size_t; ++typedef __kernel_long_t __kernel_ssize_t; ++typedef __kernel_long_t __kernel_ptrdiff_t; ++#endif ++#endif ++#ifndef __kernel_fsid_t ++typedef struct { ++ int val[2]; ++} __kernel_fsid_t; ++#endif ++typedef __kernel_long_t __kernel_off_t; ++typedef long long __kernel_loff_t; ++typedef __kernel_long_t __kernel_old_time_t; ++typedef __kernel_long_t __kernel_time_t; ++typedef long long __kernel_time64_t; ++typedef __kernel_long_t __kernel_clock_t; ++typedef int __kernel_timer_t; ++typedef int __kernel_clockid_t; ++typedef char * __kernel_caddr_t; ++typedef unsigned short __kernel_uid16_t; ++typedef unsigned short __kernel_gid16_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/resource.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/resource.h +new file mode 100644 +index 0000000..843910b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/resource.h +@@ -0,0 +1,51 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_RESOURCE_H ++#define _UAPI_ASM_GENERIC_RESOURCE_H ++#define RLIMIT_CPU 0 ++#define RLIMIT_FSIZE 1 ++#define RLIMIT_DATA 2 ++#define RLIMIT_STACK 3 ++#define RLIMIT_CORE 4 ++#ifndef RLIMIT_RSS ++#define RLIMIT_RSS 5 ++#endif ++#ifndef RLIMIT_NPROC ++#define RLIMIT_NPROC 6 ++#endif ++#ifndef RLIMIT_NOFILE ++#define RLIMIT_NOFILE 7 ++#endif ++#ifndef RLIMIT_MEMLOCK ++#define RLIMIT_MEMLOCK 8 ++#endif ++#ifndef RLIMIT_AS ++#define RLIMIT_AS 9 ++#endif ++#define RLIMIT_LOCKS 10 ++#define RLIMIT_SIGPENDING 11 ++#define RLIMIT_MSGQUEUE 12 ++#define RLIMIT_NICE 13 ++#define RLIMIT_RTPRIO 14 ++#define RLIMIT_RTTIME 15 ++#define RLIM_NLIMITS 16 ++#ifndef RLIM_INFINITY ++#define RLIM_INFINITY (~0UL) ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/sembuf.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/sembuf.h +new file mode 100644 +index 0000000..46306f7 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/sembuf.h +@@ -0,0 +1,38 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SEMBUF_H ++#define __ASM_GENERIC_SEMBUF_H ++#include ++#include ++struct semid64_ds { ++ struct ipc64_perm sem_perm; ++#if __BITS_PER_LONG == 64 ++ long sem_otime; ++ long sem_ctime; ++#else ++ unsigned long sem_otime; ++ unsigned long sem_otime_high; ++ unsigned long sem_ctime; ++ unsigned long sem_ctime_high; ++#endif ++ unsigned long sem_nsems; ++ unsigned long __unused3; ++ unsigned long __unused4; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/setup.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/setup.h +new file mode 100644 +index 0000000..f44a6dd +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/setup.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SETUP_H ++#define __ASM_GENERIC_SETUP_H ++#define COMMAND_LINE_SIZE 512 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/shmbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/shmbuf.h +new file mode 100644 +index 0000000..067ffbc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/shmbuf.h +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SHMBUF_H ++#define __ASM_GENERIC_SHMBUF_H ++#include ++struct shmid64_ds { ++ struct ipc64_perm shm_perm; ++ size_t shm_segsz; ++#if __BITS_PER_LONG == 64 ++ long shm_atime; ++ long shm_dtime; ++ long shm_ctime; ++#else ++ unsigned long shm_atime; ++ unsigned long shm_atime_high; ++ unsigned long shm_dtime; ++ unsigned long shm_dtime_high; ++ unsigned long shm_ctime; ++ unsigned long shm_ctime_high; ++#endif ++ __kernel_pid_t shm_cpid; ++ __kernel_pid_t shm_lpid; ++ unsigned long shm_nattch; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++struct shminfo64 { ++ unsigned long shmmax; ++ unsigned long shmmin; ++ unsigned long shmmni; ++ unsigned long shmseg; ++ unsigned long shmall; ++ unsigned long __unused1; ++ unsigned long __unused2; ++ unsigned long __unused3; ++ unsigned long __unused4; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/siginfo.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/siginfo.h +new file mode 100644 +index 0000000..16a85c3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/siginfo.h +@@ -0,0 +1,240 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_SIGINFO_H ++#define _UAPI_ASM_GENERIC_SIGINFO_H ++#include ++#include ++typedef union sigval { ++ int sival_int; ++ void __user * sival_ptr; ++} sigval_t; ++#define SI_MAX_SIZE 128 ++#ifndef __ARCH_SI_BAND_T ++#define __ARCH_SI_BAND_T long ++#endif ++#ifndef __ARCH_SI_CLOCK_T ++#define __ARCH_SI_CLOCK_T __kernel_clock_t ++#endif ++#ifndef __ARCH_SI_ATTRIBUTES ++#define __ARCH_SI_ATTRIBUTES ++#endif ++union __sifields { ++ struct { ++ __kernel_pid_t _pid; ++ __kernel_uid32_t _uid; ++ } _kill; ++ struct { ++ __kernel_timer_t _tid; ++ int _overrun; ++ sigval_t _sigval; ++ int _sys_private; ++ } _timer; ++ struct { ++ __kernel_pid_t _pid; ++ __kernel_uid32_t _uid; ++ sigval_t _sigval; ++ } _rt; ++ struct { ++ __kernel_pid_t _pid; ++ __kernel_uid32_t _uid; ++ int _status; ++ __ARCH_SI_CLOCK_T _utime; ++ __ARCH_SI_CLOCK_T _stime; ++ } _sigchld; ++ struct { ++ void __user * _addr; ++#ifdef __ARCH_SI_TRAPNO ++ int _trapno; ++#endif ++#ifdef __ia64__ ++ int _imm; ++ unsigned int _flags; ++ unsigned long _isr; ++#endif ++#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? sizeof(short) : __alignof__(void *)) ++ union { ++ short _addr_lsb; ++ struct { ++ char _dummy_bnd[__ADDR_BND_PKEY_PAD]; ++ void __user * _lower; ++ void __user * _upper; ++ } _addr_bnd; ++ struct { ++ char _dummy_pkey[__ADDR_BND_PKEY_PAD]; ++ __u32 _pkey; ++ } _addr_pkey; ++ }; ++ } _sigfault; ++ struct { ++ __ARCH_SI_BAND_T _band; ++ int _fd; ++ } _sigpoll; ++ struct { ++ void __user * _call_addr; ++ int _syscall; ++ unsigned int _arch; ++ } _sigsys; ++}; ++#ifndef __ARCH_HAS_SWAPPED_SIGINFO ++#define __SIGINFO struct { int si_signo; int si_errno; int si_code; union __sifields _sifields; \ ++} ++#else ++#define __SIGINFO struct { int si_signo; int si_code; int si_errno; union __sifields _sifields; \ ++} ++#endif ++typedef struct siginfo { ++ union { ++ __SIGINFO; ++ int _si_pad[SI_MAX_SIZE / sizeof(int)]; ++ }; ++} __ARCH_SI_ATTRIBUTES siginfo_t; ++#define si_pid _sifields._kill._pid ++#define si_uid _sifields._kill._uid ++#define si_tid _sifields._timer._tid ++#define si_overrun _sifields._timer._overrun ++#define si_sys_private _sifields._timer._sys_private ++#define si_status _sifields._sigchld._status ++#define si_utime _sifields._sigchld._utime ++#define si_stime _sifields._sigchld._stime ++#define si_value _sifields._rt._sigval ++#define si_int _sifields._rt._sigval.sival_int ++#define si_ptr _sifields._rt._sigval.sival_ptr ++#define si_addr _sifields._sigfault._addr ++#ifdef __ARCH_SI_TRAPNO ++#define si_trapno _sifields._sigfault._trapno ++#endif ++#define si_addr_lsb _sifields._sigfault._addr_lsb ++#define si_lower _sifields._sigfault._addr_bnd._lower ++#define si_upper _sifields._sigfault._addr_bnd._upper ++#define si_pkey _sifields._sigfault._addr_pkey._pkey ++#define si_band _sifields._sigpoll._band ++#define si_fd _sifields._sigpoll._fd ++#define si_call_addr _sifields._sigsys._call_addr ++#define si_syscall _sifields._sigsys._syscall ++#define si_arch _sifields._sigsys._arch ++#define SI_USER 0 ++#define SI_KERNEL 0x80 ++#define SI_QUEUE - 1 ++#define SI_TIMER - 2 ++#define SI_MESGQ - 3 ++#define SI_ASYNCIO - 4 ++#define SI_SIGIO - 5 ++#define SI_TKILL - 6 ++#define SI_DETHREAD - 7 ++#define SI_ASYNCNL - 60 ++#define SI_FROMUSER(siptr) ((siptr)->si_code <= 0) ++#define SI_FROMKERNEL(siptr) ((siptr)->si_code > 0) ++#define ILL_ILLOPC 1 ++#define ILL_ILLOPN 2 ++#define ILL_ILLADR 3 ++#define ILL_ILLTRP 4 ++#define ILL_PRVOPC 5 ++#define ILL_PRVREG 6 ++#define ILL_COPROC 7 ++#define ILL_BADSTK 8 ++#define ILL_BADIADDR 9 ++#define __ILL_BREAK 10 ++#define __ILL_BNDMOD 11 ++#define NSIGILL 11 ++#define FPE_INTDIV 1 ++#define FPE_INTOVF 2 ++#define FPE_FLTDIV 3 ++#define FPE_FLTOVF 4 ++#define FPE_FLTUND 5 ++#define FPE_FLTRES 6 ++#define FPE_FLTINV 7 ++#define FPE_FLTSUB 8 ++#define __FPE_DECOVF 9 ++#define __FPE_DECDIV 10 ++#define __FPE_DECERR 11 ++#define __FPE_INVASC 12 ++#define __FPE_INVDEC 13 ++#define FPE_FLTUNK 14 ++#define FPE_CONDTRAP 15 ++#define NSIGFPE 15 ++#define SEGV_MAPERR 1 ++#define SEGV_ACCERR 2 ++#define SEGV_BNDERR 3 ++#ifdef __ia64__ ++#define __SEGV_PSTKOVF 4 ++#else ++#define SEGV_PKUERR 4 ++#endif ++#define SEGV_ACCADI 5 ++#define SEGV_ADIDERR 6 ++#define SEGV_ADIPERR 7 ++#define SEGV_MTEAERR 8 ++#define SEGV_MTESERR 9 ++#define NSIGSEGV 9 ++#define BUS_ADRALN 1 ++#define BUS_ADRERR 2 ++#define BUS_OBJERR 3 ++#define BUS_MCEERR_AR 4 ++#define BUS_MCEERR_AO 5 ++#define NSIGBUS 5 ++#define TRAP_BRKPT 1 ++#define TRAP_TRACE 2 ++#define TRAP_BRANCH 3 ++#define TRAP_HWBKPT 4 ++#define TRAP_UNK 5 ++#define NSIGTRAP 5 ++#define CLD_EXITED 1 ++#define CLD_KILLED 2 ++#define CLD_DUMPED 3 ++#define CLD_TRAPPED 4 ++#define CLD_STOPPED 5 ++#define CLD_CONTINUED 6 ++#define NSIGCHLD 6 ++#define POLL_IN 1 ++#define POLL_OUT 2 ++#define POLL_MSG 3 ++#define POLL_ERR 4 ++#define POLL_PRI 5 ++#define POLL_HUP 6 ++#define NSIGPOLL 6 ++#define SYS_SECCOMP 1 ++#define NSIGSYS 1 ++#define EMT_TAGOVF 1 ++#define NSIGEMT 1 ++#define SIGEV_SIGNAL 0 ++#define SIGEV_NONE 1 ++#define SIGEV_THREAD 2 ++#define SIGEV_THREAD_ID 4 ++#ifndef __ARCH_SIGEV_PREAMBLE_SIZE ++#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) ++#endif ++#define SIGEV_MAX_SIZE 64 ++#define SIGEV_PAD_SIZE ((SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / sizeof(int)) ++typedef struct sigevent { ++ sigval_t sigev_value; ++ int sigev_signo; ++ int sigev_notify; ++ union { ++ int _pad[SIGEV_PAD_SIZE]; ++ int _tid; ++ struct { ++ void(* _function) (sigval_t); ++ void * _attribute; ++ } _sigev_thread; ++ } _sigev_un; ++} sigevent_t; ++#define sigev_notify_function _sigev_un._sigev_thread._function ++#define sigev_notify_attributes _sigev_un._sigev_thread._attribute ++#define sigev_notify_thread_id _sigev_un._tid ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/signal-defs.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/signal-defs.h +new file mode 100644 +index 0000000..a6de2e4 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/signal-defs.h +@@ -0,0 +1,40 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SIGNAL_DEFS_H ++#define __ASM_GENERIC_SIGNAL_DEFS_H ++#include ++#ifndef SIG_BLOCK ++#define SIG_BLOCK 0 ++#endif ++#ifndef SIG_UNBLOCK ++#define SIG_UNBLOCK 1 ++#endif ++#ifndef SIG_SETMASK ++#define SIG_SETMASK 2 ++#endif ++#ifndef __ASSEMBLY__ ++typedef void __signalfn_t(int); ++typedef __signalfn_t __user * __sighandler_t; ++typedef void __restorefn_t(void); ++typedef __restorefn_t __user * __sigrestore_t; ++#define SIG_DFL ((__force __sighandler_t) 0) ++#define SIG_IGN ((__force __sighandler_t) 1) ++#define SIG_ERR ((__force __sighandler_t) - 1) ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/signal.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/signal.h +new file mode 100644 +index 0000000..1210cbc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/signal.h +@@ -0,0 +1,99 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI__ASM_GENERIC_SIGNAL_H ++#define _UAPI__ASM_GENERIC_SIGNAL_H ++#include ++#define _KERNEL__NSIG 64 ++#define _NSIG_BPW __BITS_PER_LONG ++#define _NSIG_WORDS (_KERNEL__NSIG / _NSIG_BPW) ++#define SIGHUP 1 ++#define SIGINT 2 ++#define SIGQUIT 3 ++#define SIGILL 4 ++#define SIGTRAP 5 ++#define SIGABRT 6 ++#define SIGIOT 6 ++#define SIGBUS 7 ++#define SIGFPE 8 ++#define SIGKILL 9 ++#define SIGUSR1 10 ++#define SIGSEGV 11 ++#define SIGUSR2 12 ++#define SIGPIPE 13 ++#define SIGALRM 14 ++#define SIGTERM 15 ++#define SIGSTKFLT 16 ++#define SIGCHLD 17 ++#define SIGCONT 18 ++#define SIGSTOP 19 ++#define SIGTSTP 20 ++#define SIGTTIN 21 ++#define SIGTTOU 22 ++#define SIGURG 23 ++#define SIGXCPU 24 ++#define SIGXFSZ 25 ++#define SIGVTALRM 26 ++#define SIGPROF 27 ++#define SIGWINCH 28 ++#define SIGIO 29 ++#define SIGPOLL SIGIO ++#define SIGPWR 30 ++#define SIGSYS 31 ++#define SIGUNUSED 31 ++#define __SIGRTMIN 32 ++#ifndef __SIGRTMAX ++#define __SIGRTMAX _KERNEL__NSIG ++#endif ++#define SA_NOCLDSTOP 0x00000001 ++#define SA_NOCLDWAIT 0x00000002 ++#define SA_SIGINFO 0x00000004 ++#define SA_ONSTACK 0x08000000 ++#define SA_RESTART 0x10000000 ++#define SA_NODEFER 0x40000000 ++#define SA_RESETHAND 0x80000000 ++#define SA_NOMASK SA_NODEFER ++#define SA_ONESHOT SA_RESETHAND ++#if !defined(MINSIGSTKSZ) || !defined(SIGSTKSZ) ++#define MINSIGSTKSZ 2048 ++#define SIGSTKSZ 8192 ++#endif ++#ifndef __ASSEMBLY__ ++typedef struct { ++ unsigned long sig[_NSIG_WORDS]; ++} sigset_t; ++typedef unsigned long old_sigset_t; ++#include ++#ifdef SA_RESTORER ++#define __ARCH_HAS_SA_RESTORER ++#endif ++struct sigaction { ++ __sighandler_t sa_handler; ++ unsigned long sa_flags; ++#ifdef SA_RESTORER ++ __sigrestore_t sa_restorer; ++#endif ++ sigset_t sa_mask; ++}; ++typedef struct sigaltstack { ++ void __user * ss_sp; ++ int ss_flags; ++ size_t ss_size; ++} stack_t; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/socket.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/socket.h +new file mode 100644 +index 0000000..11557aa +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/socket.h +@@ -0,0 +1,114 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SOCKET_H ++#define __ASM_GENERIC_SOCKET_H ++#include ++#include ++#define SOL_SOCKET 1 ++#define SO_DEBUG 1 ++#define SO_REUSEADDR 2 ++#define SO_TYPE 3 ++#define SO_ERROR 4 ++#define SO_DONTROUTE 5 ++#define SO_BROADCAST 6 ++#define SO_SNDBUF 7 ++#define SO_RCVBUF 8 ++#define SO_SNDBUFFORCE 32 ++#define SO_RCVBUFFORCE 33 ++#define SO_KEEPALIVE 9 ++#define SO_OOBINLINE 10 ++#define SO_NO_CHECK 11 ++#define SO_PRIORITY 12 ++#define SO_LINGER 13 ++#define SO_BSDCOMPAT 14 ++#define SO_REUSEPORT 15 ++#ifndef SO_PASSCRED ++#define SO_PASSCRED 16 ++#define SO_PEERCRED 17 ++#define SO_RCVLOWAT 18 ++#define SO_SNDLOWAT 19 ++#define SO_RCVTIMEO_OLD 20 ++#define SO_SNDTIMEO_OLD 21 ++#endif ++#define SO_SECURITY_AUTHENTICATION 22 ++#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 ++#define SO_SECURITY_ENCRYPTION_NETWORK 24 ++#define SO_BINDTODEVICE 25 ++#define SO_ATTACH_FILTER 26 ++#define SO_DETACH_FILTER 27 ++#define SO_GET_FILTER SO_ATTACH_FILTER ++#define SO_PEERNAME 28 ++#define SO_ACCEPTCONN 30 ++#define SO_PEERSEC 31 ++#define SO_PASSSEC 34 ++#define SO_MARK 36 ++#define SO_PROTOCOL 38 ++#define SO_DOMAIN 39 ++#define SO_RXQ_OVFL 40 ++#define SO_WIFI_STATUS 41 ++#define SCM_WIFI_STATUS SO_WIFI_STATUS ++#define SO_PEEK_OFF 42 ++#define SO_NOFCS 43 ++#define SO_LOCK_FILTER 44 ++#define SO_SELECT_ERR_QUEUE 45 ++#define SO_BUSY_POLL 46 ++#define SO_MAX_PACING_RATE 47 ++#define SO_BPF_EXTENSIONS 48 ++#define SO_INCOMING_CPU 49 ++#define SO_ATTACH_BPF 50 ++#define SO_DETACH_BPF SO_DETACH_FILTER ++#define SO_ATTACH_REUSEPORT_CBPF 51 ++#define SO_ATTACH_REUSEPORT_EBPF 52 ++#define SO_CNX_ADVICE 53 ++#define SCM_TIMESTAMPING_OPT_STATS 54 ++#define SO_MEMINFO 55 ++#define SO_INCOMING_NAPI_ID 56 ++#define SO_COOKIE 57 ++#define SCM_TIMESTAMPING_PKTINFO 58 ++#define SO_PEERGROUPS 59 ++#define SO_ZEROCOPY 60 ++#define SO_TXTIME 61 ++#define SCM_TXTIME SO_TXTIME ++#define SO_BINDTOIFINDEX 62 ++#define SO_TIMESTAMP_OLD 29 ++#define SO_TIMESTAMPNS_OLD 35 ++#define SO_TIMESTAMPING_OLD 37 ++#define SO_TIMESTAMP_NEW 63 ++#define SO_TIMESTAMPNS_NEW 64 ++#define SO_TIMESTAMPING_NEW 65 ++#define SO_RCVTIMEO_NEW 66 ++#define SO_SNDTIMEO_NEW 67 ++#define SO_DETACH_REUSEPORT_BPF 68 ++#if __BITS_PER_LONG == 64 || defined(__x86_64__) && defined(__ILP32__) ++#define SO_TIMESTAMP SO_TIMESTAMP_OLD ++#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD ++#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD ++#define SO_RCVTIMEO SO_RCVTIMEO_OLD ++#define SO_SNDTIMEO SO_SNDTIMEO_OLD ++#else ++#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) ++#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) ++#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) ++#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) ++#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) ++#endif ++#define SCM_TIMESTAMP SO_TIMESTAMP ++#define SCM_TIMESTAMPNS SO_TIMESTAMPNS ++#define SCM_TIMESTAMPING SO_TIMESTAMPING ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/sockios.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/sockios.h +new file mode 100644 +index 0000000..afbc6ad +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/sockios.h +@@ -0,0 +1,28 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_SOCKIOS_H ++#define __ASM_GENERIC_SOCKIOS_H ++#define FIOSETOWN 0x8901 ++#define SIOCSPGRP 0x8902 ++#define FIOGETOWN 0x8903 ++#define SIOCGPGRP 0x8904 ++#define SIOCATMARK 0x8905 ++#define SIOCGSTAMP_OLD 0x8906 ++#define SIOCGSTAMPNS_OLD 0x8907 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/stat.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/stat.h +new file mode 100644 +index 0000000..9cc00f2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/stat.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_STAT_H ++#define __ASM_GENERIC_STAT_H ++#include ++#define STAT_HAVE_NSEC 1 ++struct stat { ++ unsigned long st_dev; ++ unsigned long st_ino; ++ unsigned int st_mode; ++ unsigned int st_nlink; ++ unsigned int st_uid; ++ unsigned int st_gid; ++ unsigned long st_rdev; ++ unsigned long __pad1; ++ long st_size; ++ int st_blksize; ++ int __pad2; ++ long st_blocks; ++ long st_atime; ++ unsigned long st_atime_nsec; ++ long st_mtime; ++ unsigned long st_mtime_nsec; ++ long st_ctime; ++ unsigned long st_ctime_nsec; ++ unsigned int __unused4; ++ unsigned int __unused5; ++}; ++#if __BITS_PER_LONG != 64 || defined(__ARCH_WANT_STAT64) ++struct stat64 { ++ unsigned long long st_dev; ++ unsigned long long st_ino; ++ unsigned int st_mode; ++ unsigned int st_nlink; ++ unsigned int st_uid; ++ unsigned int st_gid; ++ unsigned long long st_rdev; ++ unsigned long long __pad1; ++ long long st_size; ++ int st_blksize; ++ int __pad2; ++ long long st_blocks; ++ int st_atime; ++ unsigned int st_atime_nsec; ++ int st_mtime; ++ unsigned int st_mtime_nsec; ++ int st_ctime; ++ unsigned int st_ctime_nsec; ++ unsigned int __unused4; ++ unsigned int __unused5; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/statfs.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/statfs.h +new file mode 100644 +index 0000000..7184ce9 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/statfs.h +@@ -0,0 +1,77 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_GENERIC_STATFS_H ++#define _UAPI_GENERIC_STATFS_H ++#include ++#ifndef __statfs_word ++#if __BITS_PER_LONG == 64 ++#define __statfs_word __kernel_long_t ++#else ++#define __statfs_word __u32 ++#endif ++#endif ++struct statfs { ++ __statfs_word f_type; ++ __statfs_word f_bsize; ++ __statfs_word f_blocks; ++ __statfs_word f_bfree; ++ __statfs_word f_bavail; ++ __statfs_word f_files; ++ __statfs_word f_ffree; ++ __kernel_fsid_t f_fsid; ++ __statfs_word f_namelen; ++ __statfs_word f_frsize; ++ __statfs_word f_flags; ++ __statfs_word f_spare[4]; ++}; ++#ifndef ARCH_PACK_STATFS64 ++#define ARCH_PACK_STATFS64 ++#endif ++struct statfs64 { ++ __statfs_word f_type; ++ __statfs_word f_bsize; ++ __u64 f_blocks; ++ __u64 f_bfree; ++ __u64 f_bavail; ++ __u64 f_files; ++ __u64 f_ffree; ++ __kernel_fsid_t f_fsid; ++ __statfs_word f_namelen; ++ __statfs_word f_frsize; ++ __statfs_word f_flags; ++ __statfs_word f_spare[4]; ++} ARCH_PACK_STATFS64; ++#ifndef ARCH_PACK_COMPAT_STATFS64 ++#define ARCH_PACK_COMPAT_STATFS64 ++#endif ++struct compat_statfs64 { ++ __u32 f_type; ++ __u32 f_bsize; ++ __u64 f_blocks; ++ __u64 f_bfree; ++ __u64 f_bavail; ++ __u64 f_files; ++ __u64 f_ffree; ++ __kernel_fsid_t f_fsid; ++ __u32 f_namelen; ++ __u32 f_frsize; ++ __u32 f_flags; ++ __u32 f_spare[4]; ++} ARCH_PACK_COMPAT_STATFS64; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/swab.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/swab.h +new file mode 100644 +index 0000000..b6119db +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/swab.h +@@ -0,0 +1,27 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_SWAB_H ++#define _ASM_GENERIC_SWAB_H ++#include ++#if __BITS_PER_LONG == 32 ++#if defined(__GNUC__) && !defined(__STRICT_ANSI__) ++#define __SWAB_64_THRU_32__ ++#endif ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/termbits.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/termbits.h +new file mode 100644 +index 0000000..b592964 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/termbits.h +@@ -0,0 +1,194 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_TERMBITS_H ++#define __ASM_GENERIC_TERMBITS_H ++#include ++typedef unsigned char cc_t; ++typedef unsigned int speed_t; ++typedef unsigned int tcflag_t; ++#define NCCS 19 ++struct termios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++}; ++struct termios2 { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t c_ispeed; ++ speed_t c_ospeed; ++}; ++struct ktermios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t c_ispeed; ++ speed_t c_ospeed; ++}; ++#define VINTR 0 ++#define VQUIT 1 ++#define VERASE 2 ++#define VKILL 3 ++#define VEOF 4 ++#define VTIME 5 ++#define VMIN 6 ++#define VSWTC 7 ++#define VSTART 8 ++#define VSTOP 9 ++#define VSUSP 10 ++#define VEOL 11 ++#define VREPRINT 12 ++#define VDISCARD 13 ++#define VWERASE 14 ++#define VLNEXT 15 ++#define VEOL2 16 ++#define IGNBRK 0000001 ++#define BRKINT 0000002 ++#define IGNPAR 0000004 ++#define PARMRK 0000010 ++#define INPCK 0000020 ++#define ISTRIP 0000040 ++#define INLCR 0000100 ++#define IGNCR 0000200 ++#define ICRNL 0000400 ++#define IUCLC 0001000 ++#define IXON 0002000 ++#define IXANY 0004000 ++#define IXOFF 0010000 ++#define IMAXBEL 0020000 ++#define IUTF8 0040000 ++#define OPOST 0000001 ++#define OLCUC 0000002 ++#define ONLCR 0000004 ++#define OCRNL 0000010 ++#define ONOCR 0000020 ++#define ONLRET 0000040 ++#define OFILL 0000100 ++#define OFDEL 0000200 ++#define NLDLY 0000400 ++#define NL0 0000000 ++#define NL1 0000400 ++#define CRDLY 0003000 ++#define CR0 0000000 ++#define CR1 0001000 ++#define CR2 0002000 ++#define CR3 0003000 ++#define TABDLY 0014000 ++#define TAB0 0000000 ++#define TAB1 0004000 ++#define TAB2 0010000 ++#define TAB3 0014000 ++#define XTABS 0014000 ++#define BSDLY 0020000 ++#define BS0 0000000 ++#define BS1 0020000 ++#define VTDLY 0040000 ++#define VT0 0000000 ++#define VT1 0040000 ++#define FFDLY 0100000 ++#define FF0 0000000 ++#define FF1 0100000 ++#define CBAUD 0010017 ++#define B0 0000000 ++#define B50 0000001 ++#define B75 0000002 ++#define B110 0000003 ++#define B134 0000004 ++#define B150 0000005 ++#define B200 0000006 ++#define B300 0000007 ++#define B600 0000010 ++#define B1200 0000011 ++#define B1800 0000012 ++#define B2400 0000013 ++#define B4800 0000014 ++#define B9600 0000015 ++#define B19200 0000016 ++#define B38400 0000017 ++#define EXTA B19200 ++#define EXTB B38400 ++#define CSIZE 0000060 ++#define CS5 0000000 ++#define CS6 0000020 ++#define CS7 0000040 ++#define CS8 0000060 ++#define CSTOPB 0000100 ++#define CREAD 0000200 ++#define PARENB 0000400 ++#define PARODD 0001000 ++#define HUPCL 0002000 ++#define CLOCAL 0004000 ++#define CBAUDEX 0010000 ++#define BOTHER 0010000 ++#define B57600 0010001 ++#define B115200 0010002 ++#define B230400 0010003 ++#define B460800 0010004 ++#define B500000 0010005 ++#define B576000 0010006 ++#define B921600 0010007 ++#define B1000000 0010010 ++#define B1152000 0010011 ++#define B1500000 0010012 ++#define B2000000 0010013 ++#define B2500000 0010014 ++#define B3000000 0010015 ++#define B3500000 0010016 ++#define B4000000 0010017 ++#define CIBAUD 002003600000 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++#define IBSHIFT 16 ++#define ISIG 0000001 ++#define ICANON 0000002 ++#define XCASE 0000004 ++#define ECHO 0000010 ++#define ECHOE 0000020 ++#define ECHOK 0000040 ++#define ECHONL 0000100 ++#define NOFLSH 0000200 ++#define TOSTOP 0000400 ++#define ECHOCTL 0001000 ++#define ECHOPRT 0002000 ++#define ECHOKE 0004000 ++#define FLUSHO 0010000 ++#define PENDIN 0040000 ++#define IEXTEN 0100000 ++#define EXTPROC 0200000 ++#define TCOOFF 0 ++#define TCOON 1 ++#define TCIOFF 2 ++#define TCION 3 ++#define TCIFLUSH 0 ++#define TCOFLUSH 1 ++#define TCIOFLUSH 2 ++#define TCSANOW 0 ++#define TCSADRAIN 1 ++#define TCSAFLUSH 2 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/termios.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/termios.h +new file mode 100644 +index 0000000..77b260b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/termios.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_GENERIC_TERMIOS_H ++#define _UAPI_ASM_GENERIC_TERMIOS_H ++#include ++#include ++struct winsize { ++ unsigned short ws_row; ++ unsigned short ws_col; ++ unsigned short ws_xpixel; ++ unsigned short ws_ypixel; ++}; ++#define NCC 8 ++struct termio { ++ unsigned short c_iflag; ++ unsigned short c_oflag; ++ unsigned short c_cflag; ++ unsigned short c_lflag; ++ unsigned char c_line; ++ unsigned char c_cc[NCC]; ++}; ++#define TIOCM_LE 0x001 ++#define TIOCM_DTR 0x002 ++#define TIOCM_RTS 0x004 ++#define TIOCM_ST 0x008 ++#define TIOCM_SR 0x010 ++#define TIOCM_CTS 0x020 ++#define TIOCM_CAR 0x040 ++#define TIOCM_RNG 0x080 ++#define TIOCM_DSR 0x100 ++#define TIOCM_CD TIOCM_CAR ++#define TIOCM_RI TIOCM_RNG ++#define TIOCM_OUT1 0x2000 ++#define TIOCM_OUT2 0x4000 ++#define TIOCM_LOOP 0x8000 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/types.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/types.h +new file mode 100644 +index 0000000..ea6e7df +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/types.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_GENERIC_TYPES_H ++#define _ASM_GENERIC_TYPES_H ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/ucontext.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/ucontext.h +new file mode 100644 +index 0000000..17d8f70 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/ucontext.h +@@ -0,0 +1,28 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_GENERIC_UCONTEXT_H ++#define __ASM_GENERIC_UCONTEXT_H ++struct ucontext { ++ unsigned long uc_flags; ++ struct ucontext * uc_link; ++ stack_t uc_stack; ++ struct sigcontext uc_mcontext; ++ sigset_t uc_sigmask; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-generic/unistd.h b/build/ohos/ohos-sysroot/usr/include/asm-generic/unistd.h +new file mode 100644 +index 0000000..412e751 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-generic/unistd.h +@@ -0,0 +1,442 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include ++#ifndef __SYSCALL ++#define __SYSCALL(x,y) ++#endif ++#if __BITS_PER_LONG == 32 || defined(__SYSCALL_COMPAT) ++#define __SC_3264(_nr,_32,_64) __SYSCALL(_nr, _32) ++#else ++#define __SC_3264(_nr,_32,_64) __SYSCALL(_nr, _64) ++#endif ++#ifdef __SYSCALL_COMPAT ++#define __SC_COMP(_nr,_sys,_comp) __SYSCALL(_nr, _comp) ++#define __SC_COMP_3264(_nr,_32,_64,_comp) __SYSCALL(_nr, _comp) ++#else ++#define __SC_COMP(_nr,_sys,_comp) __SYSCALL(_nr, _sys) ++#define __SC_COMP_3264(_nr,_32,_64,_comp) __SC_3264(_nr, _32, _64) ++#endif ++#define __NR_io_setup 0 ++#define __NR_io_destroy 1 ++#define __NR_io_submit 2 ++#define __NR_io_cancel 3 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_io_getevents 4 ++#endif ++#define __NR_setxattr 5 ++#define __NR_lsetxattr 6 ++#define __NR_fsetxattr 7 ++#define __NR_getxattr 8 ++#define __NR_lgetxattr 9 ++#define __NR_fgetxattr 10 ++#define __NR_listxattr 11 ++#define __NR_llistxattr 12 ++#define __NR_flistxattr 13 ++#define __NR_removexattr 14 ++#define __NR_lremovexattr 15 ++#define __NR_fremovexattr 16 ++#define __NR_getcwd 17 ++#define __NR_lookup_dcookie 18 ++#define __NR_eventfd2 19 ++#define __NR_epoll_create1 20 ++#define __NR_epoll_ctl 21 ++#define __NR_epoll_pwait 22 ++#define __NR_dup 23 ++#define __NR_dup3 24 ++#define __NR3264_fcntl 25 ++#define __NR_inotify_init1 26 ++#define __NR_inotify_add_watch 27 ++#define __NR_inotify_rm_watch 28 ++#define __NR_ioctl 29 ++#define __NR_ioprio_set 30 ++#define __NR_ioprio_get 31 ++#define __NR_flock 32 ++#define __NR_mknodat 33 ++#define __NR_mkdirat 34 ++#define __NR_unlinkat 35 ++#define __NR_symlinkat 36 ++#define __NR_linkat 37 ++#ifdef __ARCH_WANT_RENAMEAT ++#define __NR_renameat 38 ++#endif ++#define __NR_umount2 39 ++#define __NR_mount 40 ++#define __NR_pivot_root 41 ++#define __NR_nfsservctl 42 ++#define __NR3264_statfs 43 ++#define __NR3264_fstatfs 44 ++#define __NR3264_truncate 45 ++#define __NR3264_ftruncate 46 ++#define __NR_fallocate 47 ++#define __NR_faccessat 48 ++#define __NR_chdir 49 ++#define __NR_fchdir 50 ++#define __NR_chroot 51 ++#define __NR_fchmod 52 ++#define __NR_fchmodat 53 ++#define __NR_fchownat 54 ++#define __NR_fchown 55 ++#define __NR_openat 56 ++#define __NR_close 57 ++#define __NR_vhangup 58 ++#define __NR_pipe2 59 ++#define __NR_quotactl 60 ++#define __NR_getdents64 61 ++#define __NR3264_lseek 62 ++#define __NR_read 63 ++#define __NR_write 64 ++#define __NR_readv 65 ++#define __NR_writev 66 ++#define __NR_pread64 67 ++#define __NR_pwrite64 68 ++#define __NR_preadv 69 ++#define __NR_pwritev 70 ++#define __NR3264_sendfile 71 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_pselect6 72 ++#define __NR_ppoll 73 ++#endif ++#define __NR_signalfd4 74 ++#define __NR_vmsplice 75 ++#define __NR_splice 76 ++#define __NR_tee 77 ++#define __NR_readlinkat 78 ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR3264_fstatat 79 ++#define __NR3264_fstat 80 ++#endif ++#define __NR_sync 81 ++#define __NR_fsync 82 ++#define __NR_fdatasync 83 ++#ifdef __ARCH_WANT_SYNC_FILE_RANGE2 ++#define __NR_sync_file_range2 84 ++#else ++#define __NR_sync_file_range 84 ++#endif ++#define __NR_timerfd_create 85 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timerfd_settime 86 ++#define __NR_timerfd_gettime 87 ++#endif ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_utimensat 88 ++#endif ++#define __NR_acct 89 ++#define __NR_capget 90 ++#define __NR_capset 91 ++#define __NR_personality 92 ++#define __NR_exit 93 ++#define __NR_exit_group 94 ++#define __NR_waitid 95 ++#define __NR_set_tid_address 96 ++#define __NR_unshare 97 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_futex 98 ++#endif ++#define __NR_set_robust_list 99 ++#define __NR_get_robust_list 100 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_nanosleep 101 ++#endif ++#define __NR_getitimer 102 ++#define __NR_setitimer 103 ++#define __NR_kexec_load 104 ++#define __NR_init_module 105 ++#define __NR_delete_module 106 ++#define __NR_timer_create 107 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timer_gettime 108 ++#endif ++#define __NR_timer_getoverrun 109 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_timer_settime 110 ++#endif ++#define __NR_timer_delete 111 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_clock_settime 112 ++#define __NR_clock_gettime 113 ++#define __NR_clock_getres 114 ++#define __NR_clock_nanosleep 115 ++#endif ++#define __NR_syslog 116 ++#define __NR_ptrace 117 ++#define __NR_sched_setparam 118 ++#define __NR_sched_setscheduler 119 ++#define __NR_sched_getscheduler 120 ++#define __NR_sched_getparam 121 ++#define __NR_sched_setaffinity 122 ++#define __NR_sched_getaffinity 123 ++#define __NR_sched_yield 124 ++#define __NR_sched_get_priority_max 125 ++#define __NR_sched_get_priority_min 126 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_sched_rr_get_interval 127 ++#endif ++#define __NR_restart_syscall 128 ++#define __NR_kill 129 ++#define __NR_tkill 130 ++#define __NR_tgkill 131 ++#define __NR_sigaltstack 132 ++#define __NR_rt_sigsuspend 133 ++#define __NR_rt_sigaction 134 ++#define __NR_rt_sigprocmask 135 ++#define __NR_rt_sigpending 136 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_rt_sigtimedwait 137 ++#endif ++#define __NR_rt_sigqueueinfo 138 ++#define __NR_rt_sigreturn 139 ++#define __NR_setpriority 140 ++#define __NR_getpriority 141 ++#define __NR_reboot 142 ++#define __NR_setregid 143 ++#define __NR_setgid 144 ++#define __NR_setreuid 145 ++#define __NR_setuid 146 ++#define __NR_setresuid 147 ++#define __NR_getresuid 148 ++#define __NR_setresgid 149 ++#define __NR_getresgid 150 ++#define __NR_setfsuid 151 ++#define __NR_setfsgid 152 ++#define __NR_times 153 ++#define __NR_setpgid 154 ++#define __NR_getpgid 155 ++#define __NR_getsid 156 ++#define __NR_setsid 157 ++#define __NR_getgroups 158 ++#define __NR_setgroups 159 ++#define __NR_uname 160 ++#define __NR_sethostname 161 ++#define __NR_setdomainname 162 ++#ifdef __ARCH_WANT_SET_GET_RLIMIT ++#define __NR_getrlimit 163 ++#define __NR_setrlimit 164 ++#endif ++#define __NR_getrusage 165 ++#define __NR_umask 166 ++#define __NR_prctl 167 ++#define __NR_getcpu 168 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_gettimeofday 169 ++#define __NR_settimeofday 170 ++#define __NR_adjtimex 171 ++#endif ++#define __NR_getpid 172 ++#define __NR_getppid 173 ++#define __NR_getuid 174 ++#define __NR_geteuid 175 ++#define __NR_getgid 176 ++#define __NR_getegid 177 ++#define __NR_gettid 178 ++#define __NR_sysinfo 179 ++#define __NR_mq_open 180 ++#define __NR_mq_unlink 181 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_mq_timedsend 182 ++#define __NR_mq_timedreceive 183 ++#endif ++#define __NR_mq_notify 184 ++#define __NR_mq_getsetattr 185 ++#define __NR_msgget 186 ++#define __NR_msgctl 187 ++#define __NR_msgrcv 188 ++#define __NR_msgsnd 189 ++#define __NR_semget 190 ++#define __NR_semctl 191 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_semtimedop 192 ++#endif ++#define __NR_semop 193 ++#define __NR_shmget 194 ++#define __NR_shmctl 195 ++#define __NR_shmat 196 ++#define __NR_shmdt 197 ++#define __NR_socket 198 ++#define __NR_socketpair 199 ++#define __NR_bind 200 ++#define __NR_listen 201 ++#define __NR_accept 202 ++#define __NR_connect 203 ++#define __NR_getsockname 204 ++#define __NR_getpeername 205 ++#define __NR_sendto 206 ++#define __NR_recvfrom 207 ++#define __NR_setsockopt 208 ++#define __NR_getsockopt 209 ++#define __NR_shutdown 210 ++#define __NR_sendmsg 211 ++#define __NR_recvmsg 212 ++#define __NR_readahead 213 ++#define __NR_brk 214 ++#define __NR_munmap 215 ++#define __NR_mremap 216 ++#define __NR_add_key 217 ++#define __NR_request_key 218 ++#define __NR_keyctl 219 ++#define __NR_clone 220 ++#define __NR_execve 221 ++#define __NR3264_mmap 222 ++#define __NR3264_fadvise64 223 ++#ifndef __ARCH_NOMMU ++#define __NR_swapon 224 ++#define __NR_swapoff 225 ++#define __NR_mprotect 226 ++#define __NR_msync 227 ++#define __NR_mlock 228 ++#define __NR_munlock 229 ++#define __NR_mlockall 230 ++#define __NR_munlockall 231 ++#define __NR_mincore 232 ++#define __NR_madvise 233 ++#define __NR_remap_file_pages 234 ++#define __NR_mbind 235 ++#define __NR_get_mempolicy 236 ++#define __NR_set_mempolicy 237 ++#define __NR_migrate_pages 238 ++#define __NR_move_pages 239 ++#endif ++#define __NR_rt_tgsigqueueinfo 240 ++#define __NR_perf_event_open 241 ++#define __NR_accept4 242 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_recvmmsg 243 ++#endif ++#define __NR_arch_specific_syscall 244 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_wait4 260 ++#endif ++#define __NR_prlimit64 261 ++#define __NR_fanotify_init 262 ++#define __NR_fanotify_mark 263 ++#define __NR_name_to_handle_at 264 ++#define __NR_open_by_handle_at 265 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_clock_adjtime 266 ++#endif ++#define __NR_syncfs 267 ++#define __NR_setns 268 ++#define __NR_sendmmsg 269 ++#define __NR_process_vm_readv 270 ++#define __NR_process_vm_writev 271 ++#define __NR_kcmp 272 ++#define __NR_finit_module 273 ++#define __NR_sched_setattr 274 ++#define __NR_sched_getattr 275 ++#define __NR_renameat2 276 ++#define __NR_seccomp 277 ++#define __NR_getrandom 278 ++#define __NR_memfd_create 279 ++#define __NR_bpf 280 ++#define __NR_execveat 281 ++#define __NR_userfaultfd 282 ++#define __NR_membarrier 283 ++#define __NR_mlock2 284 ++#define __NR_copy_file_range 285 ++#define __NR_preadv2 286 ++#define __NR_pwritev2 287 ++#define __NR_pkey_mprotect 288 ++#define __NR_pkey_alloc 289 ++#define __NR_pkey_free 290 ++#define __NR_statx 291 ++#if defined(__ARCH_WANT_TIME32_SYSCALLS) || __BITS_PER_LONG != 32 ++#define __NR_io_pgetevents 292 ++#endif ++#define __NR_rseq 293 ++#define __NR_kexec_file_load 294 ++#if __BITS_PER_LONG == 32 ++#define __NR_clock_gettime64 403 ++#define __NR_clock_settime64 404 ++#define __NR_clock_adjtime64 405 ++#define __NR_clock_getres_time64 406 ++#define __NR_clock_nanosleep_time64 407 ++#define __NR_timer_gettime64 408 ++#define __NR_timer_settime64 409 ++#define __NR_timerfd_gettime64 410 ++#define __NR_timerfd_settime64 411 ++#define __NR_utimensat_time64 412 ++#define __NR_pselect6_time64 413 ++#define __NR_ppoll_time64 414 ++#define __NR_io_pgetevents_time64 416 ++#define __NR_recvmmsg_time64 417 ++#define __NR_mq_timedsend_time64 418 ++#define __NR_mq_timedreceive_time64 419 ++#define __NR_semtimedop_time64 420 ++#define __NR_rt_sigtimedwait_time64 421 ++#define __NR_futex_time64 422 ++#define __NR_sched_rr_get_interval_time64 423 ++#endif ++#define __NR_pidfd_send_signal 424 ++#define __NR_io_uring_setup 425 ++#define __NR_io_uring_enter 426 ++#define __NR_io_uring_register 427 ++#define __NR_open_tree 428 ++#define __NR_move_mount 429 ++#define __NR_fsopen 430 ++#define __NR_fsconfig 431 ++#define __NR_fsmount 432 ++#define __NR_fspick 433 ++#define __NR_pidfd_open 434 ++#ifdef __ARCH_WANT_SYS_CLONE3 ++#define __NR_clone3 435 ++#endif ++#define __NR_close_range 436 ++#define __NR_openat2 437 ++#define __NR_pidfd_getfd 438 ++#define __NR_faccessat2 439 ++#define __NR_process_madvise 440 ++#undef __NR_syscalls ++#define __NR_syscalls 441 ++#if __BITS_PER_LONG == 64 && !defined(__SYSCALL_COMPAT) ++#define __NR_fcntl __NR3264_fcntl ++#define __NR_statfs __NR3264_statfs ++#define __NR_fstatfs __NR3264_fstatfs ++#define __NR_truncate __NR3264_truncate ++#define __NR_ftruncate __NR3264_ftruncate ++#define __NR_lseek __NR3264_lseek ++#define __NR_sendfile __NR3264_sendfile ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR_newfstatat __NR3264_fstatat ++#define __NR_fstat __NR3264_fstat ++#endif ++#define __NR_mmap __NR3264_mmap ++#define __NR_fadvise64 __NR3264_fadvise64 ++#ifdef __NR3264_stat ++#define __NR_stat __NR3264_stat ++#define __NR_lstat __NR3264_lstat ++#endif ++#else ++#define __NR_fcntl64 __NR3264_fcntl ++#define __NR_statfs64 __NR3264_statfs ++#define __NR_fstatfs64 __NR3264_fstatfs ++#define __NR_truncate64 __NR3264_truncate ++#define __NR_ftruncate64 __NR3264_ftruncate ++#define __NR_llseek __NR3264_lseek ++#define __NR_sendfile64 __NR3264_sendfile ++#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64) ++#define __NR_fstatat64 __NR3264_fstatat ++#define __NR_fstat64 __NR3264_fstat ++#endif ++#define __NR_mmap2 __NR3264_mmap ++#define __NR_fadvise64_64 __NR3264_fadvise64 ++#ifdef __NR3264_stat ++#define __NR_stat64 __NR3264_stat ++#define __NR_lstat64 __NR3264_lstat ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/auxvec.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/auxvec.h +new file mode 100644 +index 0000000..74fca55 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/auxvec.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_AUXVEC_H ++#define __ASM_AUXVEC_H ++#define AT_SYSINFO_EHDR 33 ++#define AT_VECTOR_SIZE_ARCH 1 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitfield.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitfield.h +new file mode 100644 +index 0000000..a0a9ffd +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitfield.h +@@ -0,0 +1,28 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __UAPI_ASM_BITFIELD_H ++#define __UAPI_ASM_BITFIELD_H ++#ifdef __MIPSEB__ ++#define __BITFIELD_FIELD(field,more) field; more ++#elif defined(__MIPSEL__) ++#define __BITFIELD_FIELD(field,more) more field; ++#else ++#error "MIPS but neither __MIPSEL__ nor __MIPSEB__?" ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitsperlong.h +new file mode 100644 +index 0000000..f9a9718 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bitsperlong.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_MIPS_BITSPERLONG_H ++#define __ASM_MIPS_BITSPERLONG_H ++#define __BITS_PER_LONG _MIPS_SZLONG ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bpf_perf_event.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..fa7bc48 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/bpf_perf_event.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/break.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/break.h +new file mode 100644 +index 0000000..48e0688 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/break.h +@@ -0,0 +1,33 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __UAPI_ASM_BREAK_H ++#define __UAPI_ASM_BREAK_H ++#define BRK_USERBP 0 ++#define BRK_SSTEPBP 5 ++#define BRK_OVERFLOW 6 ++#define BRK_DIVZERO 7 ++#define BRK_RANGE 8 ++#define BRK_BUG 12 ++#define BRK_UPROBE 13 ++#define BRK_UPROBE_XOL 14 ++#define BRK_MEMU 514 ++#define BRK_KPROBE_BP 515 ++#define BRK_KPROBE_SSTEPBP 516 ++#define BRK_MULOVF 1023 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/byteorder.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/byteorder.h +new file mode 100644 +index 0000000..0413549 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/byteorder.h +@@ -0,0 +1,28 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_BYTEORDER_H ++#define _ASM_BYTEORDER_H ++#ifdef __MIPSEB__ ++#include ++#elif defined(__MIPSEL__) ++#include ++#else ++#error "MIPS, but neither __MIPSEB__, nor __MIPSEL__???" ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/cachectl.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/cachectl.h +new file mode 100644 +index 0000000..0808e69 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/cachectl.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_CACHECTL ++#define _ASM_CACHECTL ++#define ICACHE (1 << 0) ++#define DCACHE (1 << 1) ++#define BCACHE (ICACHE | DCACHE) ++#define CACHEABLE 0 ++#define UNCACHEABLE 1 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/errno.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/errno.h +new file mode 100644 +index 0000000..1ba0afe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/errno.h +@@ -0,0 +1,123 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_ERRNO_H ++#define _ASM_ERRNO_H ++#include ++#define ENOMSG 35 ++#define EIDRM 36 ++#define ECHRNG 37 ++#define EL2NSYNC 38 ++#define EL3HLT 39 ++#define EL3RST 40 ++#define ELNRNG 41 ++#define EUNATCH 42 ++#define ENOCSI 43 ++#define EL2HLT 44 ++#define EDEADLK 45 ++#define ENOLCK 46 ++#define EBADE 50 ++#define EBADR 51 ++#define EXFULL 52 ++#define ENOANO 53 ++#define EBADRQC 54 ++#define EBADSLT 55 ++#define EDEADLOCK 56 ++#define EBFONT 59 ++#define ENOSTR 60 ++#define ENODATA 61 ++#define ETIME 62 ++#define ENOSR 63 ++#define ENONET 64 ++#define ENOPKG 65 ++#define EREMOTE 66 ++#define ENOLINK 67 ++#define EADV 68 ++#define ESRMNT 69 ++#define ECOMM 70 ++#define EPROTO 71 ++#define EDOTDOT 73 ++#define EMULTIHOP 74 ++#define EBADMSG 77 ++#define ENAMETOOLONG 78 ++#define EOVERFLOW 79 ++#define ENOTUNIQ 80 ++#define EBADFD 81 ++#define EREMCHG 82 ++#define ELIBACC 83 ++#define ELIBBAD 84 ++#define ELIBSCN 85 ++#define ELIBMAX 86 ++#define ELIBEXEC 87 ++#define EILSEQ 88 ++#define ENOSYS 89 ++#define ELOOP 90 ++#define ERESTART 91 ++#define ESTRPIPE 92 ++#define ENOTEMPTY 93 ++#define EUSERS 94 ++#define ENOTSOCK 95 ++#define EDESTADDRREQ 96 ++#define EMSGSIZE 97 ++#define EPROTOTYPE 98 ++#define ENOPROTOOPT 99 ++#define EPROTONOSUPPORT 120 ++#define ESOCKTNOSUPPORT 121 ++#define EOPNOTSUPP 122 ++#define EPFNOSUPPORT 123 ++#define EAFNOSUPPORT 124 ++#define EADDRINUSE 125 ++#define EADDRNOTAVAIL 126 ++#define ENETDOWN 127 ++#define ENETUNREACH 128 ++#define ENETRESET 129 ++#define ECONNABORTED 130 ++#define ECONNRESET 131 ++#define ENOBUFS 132 ++#define EISCONN 133 ++#define ENOTCONN 134 ++#define EUCLEAN 135 ++#define ENOTNAM 137 ++#define ENAVAIL 138 ++#define EISNAM 139 ++#define EREMOTEIO 140 ++#define EINIT 141 ++#define EREMDEV 142 ++#define ESHUTDOWN 143 ++#define ETOOMANYREFS 144 ++#define ETIMEDOUT 145 ++#define ECONNREFUSED 146 ++#define EHOSTDOWN 147 ++#define EHOSTUNREACH 148 ++#define EWOULDBLOCK EAGAIN ++#define EALREADY 149 ++#define EINPROGRESS 150 ++#define ESTALE 151 ++#define ECANCELED 158 ++#define ENOMEDIUM 159 ++#define EMEDIUMTYPE 160 ++#define ENOKEY 161 ++#define EKEYEXPIRED 162 ++#define EKEYREVOKED 163 ++#define EKEYREJECTED 164 ++#define EOWNERDEAD 165 ++#define ENOTRECOVERABLE 166 ++#define ERFKILL 167 ++#define EHWPOISON 168 ++#define EDQUOT 1133 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/fcntl.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/fcntl.h +new file mode 100644 +index 0000000..e6059b6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/fcntl.h +@@ -0,0 +1,50 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_FCNTL_H ++#define _ASM_FCNTL_H ++#include ++#include ++#define O_APPEND 0x0008 ++#define O_DSYNC 0x0010 ++#define O_NONBLOCK 0x0080 ++#define O_CREAT 0x0100 ++#define O_TRUNC 0x0200 ++#define O_EXCL 0x0400 ++#define O_NOCTTY 0x0800 ++#define FASYNC 0x1000 ++#define O_LARGEFILE 0x2000 ++#define __O_SYNC 0x4000 ++#define O_SYNC (__O_SYNC | O_DSYNC) ++#define O_DIRECT 0x8000 ++#define F_GETLK 14 ++#define F_SETLK 6 ++#define F_SETLKW 7 ++#define F_SETOWN 24 ++#define F_GETOWN 23 ++#ifndef __mips64 ++#define F_GETLK64 33 ++#define F_SETLK64 34 ++#define F_SETLKW64 35 ++#endif ++#if _MIPS_SIM != _MIPS_SIM_ABI64 ++#include ++#define HAVE_ARCH_STRUCT_FLOCK ++#endif ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/hwcap.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/hwcap.h +new file mode 100644 +index 0000000..dc0a339 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/hwcap.h +@@ -0,0 +1,36 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_HWCAP_H ++#define _ASM_HWCAP_H ++#define HWCAP_MIPS_R6 (1 << 0) ++#define HWCAP_MIPS_MSA (1 << 1) ++#define HWCAP_MIPS_CRC32 (1 << 2) ++#define HWCAP_MIPS_MIPS16 (1 << 3) ++#define HWCAP_MIPS_MDMX (1 << 4) ++#define HWCAP_MIPS_MIPS3D (1 << 5) ++#define HWCAP_MIPS_SMARTMIPS (1 << 6) ++#define HWCAP_MIPS_DSP (1 << 7) ++#define HWCAP_MIPS_DSP2 (1 << 8) ++#define HWCAP_MIPS_DSP3 (1 << 9) ++#define HWCAP_MIPS_MIPS16E2 (1 << 10) ++#define HWCAP_LOONGSON_MMI (1 << 11) ++#define HWCAP_LOONGSON_EXT (1 << 12) ++#define HWCAP_LOONGSON_EXT2 (1 << 13) ++#define HWCAP_LOONGSON_CPUCFG (1 << 14) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/inst.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/inst.h +new file mode 100644 +index 0000000..49f6a68 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/inst.h +@@ -0,0 +1,993 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_INST_H ++#define _ASM_INST_H ++#include ++enum major_op { ++ spec_op, ++ bcond_op, ++ j_op, ++ jal_op, ++ beq_op, ++ bne_op, ++ blez_op, ++ bgtz_op, ++ addi_op, ++ pop10_op = addi_op, ++ addiu_op, ++ slti_op, ++ sltiu_op, ++ andi_op, ++ ori_op, ++ xori_op, ++ lui_op, ++ cop0_op, ++ cop1_op, ++ cop2_op, ++ cop1x_op, ++ beql_op, ++ bnel_op, ++ blezl_op, ++ bgtzl_op, ++ daddi_op, ++ pop30_op = daddi_op, ++ daddiu_op, ++ ldl_op, ++ ldr_op, ++ spec2_op, ++ jalx_op, ++ mdmx_op, ++ msa_op = mdmx_op, ++ spec3_op, ++ lb_op, ++ lh_op, ++ lwl_op, ++ lw_op, ++ lbu_op, ++ lhu_op, ++ lwr_op, ++ lwu_op, ++ sb_op, ++ sh_op, ++ swl_op, ++ sw_op, ++ sdl_op, ++ sdr_op, ++ swr_op, ++ cache_op, ++ ll_op, ++ lwc1_op, ++ lwc2_op, ++ bc6_op = lwc2_op, ++ pref_op, ++ lld_op, ++ ldc1_op, ++ ldc2_op, ++ pop66_op = ldc2_op, ++ ld_op, ++ sc_op, ++ swc1_op, ++ swc2_op, ++ balc6_op = swc2_op, ++ major_3b_op, ++ scd_op, ++ sdc1_op, ++ sdc2_op, ++ pop76_op = sdc2_op, ++ sd_op ++}; ++enum spec_op { ++ sll_op, ++ movc_op, ++ srl_op, ++ sra_op, ++ sllv_op, ++ pmon_op, ++ srlv_op, ++ srav_op, ++ jr_op, ++ jalr_op, ++ movz_op, ++ movn_op, ++ syscall_op, ++ break_op, ++ spim_op, ++ sync_op, ++ mfhi_op, ++ mthi_op, ++ mflo_op, ++ mtlo_op, ++ dsllv_op, ++ spec2_unused_op, ++ dsrlv_op, ++ dsrav_op, ++ mult_op, ++ multu_op, ++ div_op, ++ divu_op, ++ dmult_op, ++ dmultu_op, ++ ddiv_op, ++ ddivu_op, ++ add_op, ++ addu_op, ++ sub_op, ++ subu_op, ++ and_op, ++ or_op, ++ xor_op, ++ nor_op, ++ spec3_unused_op, ++ spec4_unused_op, ++ slt_op, ++ sltu_op, ++ dadd_op, ++ daddu_op, ++ dsub_op, ++ dsubu_op, ++ tge_op, ++ tgeu_op, ++ tlt_op, ++ tltu_op, ++ teq_op, ++ seleqz_op, ++ tne_op, ++ selnez_op, ++ dsll_op, ++ spec5_unused_op, ++ dsrl_op, ++ dsra_op, ++ dsll32_op, ++ spec6_unused_op, ++ dsrl32_op, ++ dsra32_op ++}; ++enum spec2_op { ++ madd_op, ++ maddu_op, ++ mul_op, ++ spec2_3_unused_op, ++ msub_op, ++ msubu_op, ++ clz_op = 0x20, ++ clo_op, ++ dclz_op = 0x24, ++ dclo_op, ++ sdbpp_op = 0x3f ++}; ++enum spec3_op { ++ ext_op, ++ dextm_op, ++ dextu_op, ++ dext_op, ++ ins_op, ++ dinsm_op, ++ dinsu_op, ++ dins_op, ++ yield_op = 0x09, ++ lx_op = 0x0a, ++ lwle_op = 0x19, ++ lwre_op = 0x1a, ++ cachee_op = 0x1b, ++ sbe_op = 0x1c, ++ she_op = 0x1d, ++ sce_op = 0x1e, ++ swe_op = 0x1f, ++ bshfl_op = 0x20, ++ swle_op = 0x21, ++ swre_op = 0x22, ++ prefe_op = 0x23, ++ dbshfl_op = 0x24, ++ cache6_op = 0x25, ++ sc6_op = 0x26, ++ scd6_op = 0x27, ++ lbue_op = 0x28, ++ lhue_op = 0x29, ++ lbe_op = 0x2c, ++ lhe_op = 0x2d, ++ lle_op = 0x2e, ++ lwe_op = 0x2f, ++ pref6_op = 0x35, ++ ll6_op = 0x36, ++ lld6_op = 0x37, ++ rdhwr_op = 0x3b ++}; ++enum mult_op { ++ mult_mult_op = 0x0, ++ mult_mul_op = 0x2, ++ mult_muh_op = 0x3, ++}; ++enum multu_op { ++ multu_multu_op = 0x0, ++ multu_mulu_op = 0x2, ++ multu_muhu_op = 0x3, ++}; ++enum div_op { ++ div_div_op = 0x0, ++ div_div6_op = 0x2, ++ div_mod_op = 0x3, ++}; ++enum divu_op { ++ divu_divu_op = 0x0, ++ divu_divu6_op = 0x2, ++ divu_modu_op = 0x3, ++}; ++enum dmult_op { ++ dmult_dmult_op = 0x0, ++ dmult_dmul_op = 0x2, ++ dmult_dmuh_op = 0x3, ++}; ++enum dmultu_op { ++ dmultu_dmultu_op = 0x0, ++ dmultu_dmulu_op = 0x2, ++ dmultu_dmuhu_op = 0x3, ++}; ++enum ddiv_op { ++ ddiv_ddiv_op = 0x0, ++ ddiv_ddiv6_op = 0x2, ++ ddiv_dmod_op = 0x3, ++}; ++enum ddivu_op { ++ ddivu_ddivu_op = 0x0, ++ ddivu_ddivu6_op = 0x2, ++ ddivu_dmodu_op = 0x3, ++}; ++enum rt_op { ++ bltz_op, ++ bgez_op, ++ bltzl_op, ++ bgezl_op, ++ spimi_op, ++ unused_rt_op_0x05, ++ unused_rt_op_0x06, ++ unused_rt_op_0x07, ++ tgei_op, ++ tgeiu_op, ++ tlti_op, ++ tltiu_op, ++ teqi_op, ++ unused_0x0d_rt_op, ++ tnei_op, ++ unused_0x0f_rt_op, ++ bltzal_op, ++ bgezal_op, ++ bltzall_op, ++ bgezall_op, ++ rt_op_0x14, ++ rt_op_0x15, ++ rt_op_0x16, ++ rt_op_0x17, ++ rt_op_0x18, ++ rt_op_0x19, ++ rt_op_0x1a, ++ rt_op_0x1b, ++ bposge32_op, ++ rt_op_0x1d, ++ rt_op_0x1e, ++ synci_op ++}; ++enum cop_op { ++ mfc_op = 0x00, ++ dmfc_op = 0x01, ++ cfc_op = 0x02, ++ mfhc0_op = 0x02, ++ mfhc_op = 0x03, ++ mtc_op = 0x04, ++ dmtc_op = 0x05, ++ ctc_op = 0x06, ++ mthc0_op = 0x06, ++ mthc_op = 0x07, ++ bc_op = 0x08, ++ bc1eqz_op = 0x09, ++ mfmc0_op = 0x0b, ++ bc1nez_op = 0x0d, ++ wrpgpr_op = 0x0e, ++ cop_op = 0x10, ++ copm_op = 0x18 ++}; ++enum bcop_op { ++ bcf_op, ++ bct_op, ++ bcfl_op, ++ bctl_op ++}; ++enum cop0_coi_func { ++ tlbr_op = 0x01, ++ tlbwi_op = 0x02, ++ tlbwr_op = 0x06, ++ tlbp_op = 0x08, ++ rfe_op = 0x10, ++ eret_op = 0x18, ++ wait_op = 0x20, ++ hypcall_op = 0x28 ++}; ++enum cop0_com_func { ++ tlbr1_op = 0x01, ++ tlbw_op = 0x02, ++ tlbp1_op = 0x08, ++ dctr_op = 0x09, ++ dctw_op = 0x0a ++}; ++enum cop1_fmt { ++ s_fmt, ++ d_fmt, ++ e_fmt, ++ q_fmt, ++ w_fmt, ++ l_fmt ++}; ++enum cop1_sdw_func { ++ fadd_op = 0x00, ++ fsub_op = 0x01, ++ fmul_op = 0x02, ++ fdiv_op = 0x03, ++ fsqrt_op = 0x04, ++ fabs_op = 0x05, ++ fmov_op = 0x06, ++ fneg_op = 0x07, ++ froundl_op = 0x08, ++ ftruncl_op = 0x09, ++ fceill_op = 0x0a, ++ ffloorl_op = 0x0b, ++ fround_op = 0x0c, ++ ftrunc_op = 0x0d, ++ fceil_op = 0x0e, ++ ffloor_op = 0x0f, ++ fsel_op = 0x10, ++ fmovc_op = 0x11, ++ fmovz_op = 0x12, ++ fmovn_op = 0x13, ++ fseleqz_op = 0x14, ++ frecip_op = 0x15, ++ frsqrt_op = 0x16, ++ fselnez_op = 0x17, ++ fmaddf_op = 0x18, ++ fmsubf_op = 0x19, ++ frint_op = 0x1a, ++ fclass_op = 0x1b, ++ fmin_op = 0x1c, ++ fmina_op = 0x1d, ++ fmax_op = 0x1e, ++ fmaxa_op = 0x1f, ++ fcvts_op = 0x20, ++ fcvtd_op = 0x21, ++ fcvte_op = 0x22, ++ fcvtw_op = 0x24, ++ fcvtl_op = 0x25, ++ fcmp_op = 0x30 ++}; ++enum cop1x_func { ++ lwxc1_op = 0x00, ++ ldxc1_op = 0x01, ++ swxc1_op = 0x08, ++ sdxc1_op = 0x09, ++ pfetch_op = 0x0f, ++ madd_s_op = 0x20, ++ madd_d_op = 0x21, ++ madd_e_op = 0x22, ++ msub_s_op = 0x28, ++ msub_d_op = 0x29, ++ msub_e_op = 0x2a, ++ nmadd_s_op = 0x30, ++ nmadd_d_op = 0x31, ++ nmadd_e_op = 0x32, ++ nmsub_s_op = 0x38, ++ nmsub_d_op = 0x39, ++ nmsub_e_op = 0x3a ++}; ++enum mad_func { ++ madd_fp_op = 0x08, ++ msub_fp_op = 0x0a, ++ nmadd_fp_op = 0x0c, ++ nmsub_fp_op = 0x0e ++}; ++enum ptw_func { ++ lwdir_op = 0x00, ++ lwpte_op = 0x01, ++ lddir_op = 0x02, ++ ldpte_op = 0x03, ++}; ++enum lx_func { ++ lwx_op = 0x00, ++ lhx_op = 0x04, ++ lbux_op = 0x06, ++ ldx_op = 0x08, ++ lwux_op = 0x10, ++ lhux_op = 0x14, ++ lbx_op = 0x16, ++}; ++enum bshfl_func { ++ wsbh_op = 0x2, ++ seb_op = 0x10, ++ seh_op = 0x18, ++}; ++enum dbshfl_func { ++ dsbh_op = 0x2, ++ dshd_op = 0x5, ++}; ++enum msa_func { ++ msa_elm_op = 0x19, ++}; ++enum msa_elm { ++ msa_ctc_op = 0x3e, ++ msa_cfc_op = 0x7e, ++}; ++enum msa_mi10_func { ++ msa_ld_op = 8, ++ msa_st_op = 9, ++}; ++enum msa_2b_fmt { ++ msa_fmt_b = 0, ++ msa_fmt_h = 1, ++ msa_fmt_w = 2, ++ msa_fmt_d = 3, ++}; ++enum mm_major_op { ++ mm_pool32a_op, ++ mm_pool16a_op, ++ mm_lbu16_op, ++ mm_move16_op, ++ mm_addi32_op, ++ mm_lbu32_op, ++ mm_sb32_op, ++ mm_lb32_op, ++ mm_pool32b_op, ++ mm_pool16b_op, ++ mm_lhu16_op, ++ mm_andi16_op, ++ mm_addiu32_op, ++ mm_lhu32_op, ++ mm_sh32_op, ++ mm_lh32_op, ++ mm_pool32i_op, ++ mm_pool16c_op, ++ mm_lwsp16_op, ++ mm_pool16d_op, ++ mm_ori32_op, ++ mm_pool32f_op, ++ mm_pool32s_op, ++ mm_reserved2_op, ++ mm_pool32c_op, ++ mm_lwgp16_op, ++ mm_lw16_op, ++ mm_pool16e_op, ++ mm_xori32_op, ++ mm_jals32_op, ++ mm_addiupc_op, ++ mm_reserved3_op, ++ mm_reserved4_op, ++ mm_pool16f_op, ++ mm_sb16_op, ++ mm_beqz16_op, ++ mm_slti32_op, ++ mm_beq32_op, ++ mm_swc132_op, ++ mm_lwc132_op, ++ mm_reserved5_op, ++ mm_reserved6_op, ++ mm_sh16_op, ++ mm_bnez16_op, ++ mm_sltiu32_op, ++ mm_bne32_op, ++ mm_sdc132_op, ++ mm_ldc132_op, ++ mm_reserved7_op, ++ mm_reserved8_op, ++ mm_swsp16_op, ++ mm_b16_op, ++ mm_andi32_op, ++ mm_j32_op, ++ mm_sd32_op, ++ mm_ld32_op, ++ mm_reserved11_op, ++ mm_reserved12_op, ++ mm_sw16_op, ++ mm_li16_op, ++ mm_jalx32_op, ++ mm_jal32_op, ++ mm_sw32_op, ++ mm_lw32_op, ++}; ++enum mm_32i_minor_op { ++ mm_bltz_op, ++ mm_bltzal_op, ++ mm_bgez_op, ++ mm_bgezal_op, ++ mm_blez_op, ++ mm_bnezc_op, ++ mm_bgtz_op, ++ mm_beqzc_op, ++ mm_tlti_op, ++ mm_tgei_op, ++ mm_tltiu_op, ++ mm_tgeiu_op, ++ mm_tnei_op, ++ mm_lui_op, ++ mm_teqi_op, ++ mm_reserved13_op, ++ mm_synci_op, ++ mm_bltzals_op, ++ mm_reserved14_op, ++ mm_bgezals_op, ++ mm_bc2f_op, ++ mm_bc2t_op, ++ mm_reserved15_op, ++ mm_reserved16_op, ++ mm_reserved17_op, ++ mm_reserved18_op, ++ mm_bposge64_op, ++ mm_bposge32_op, ++ mm_bc1f_op, ++ mm_bc1t_op, ++ mm_reserved19_op, ++ mm_reserved20_op, ++ mm_bc1any2f_op, ++ mm_bc1any2t_op, ++ mm_bc1any4f_op, ++ mm_bc1any4t_op, ++}; ++enum mm_32a_minor_op { ++ mm_sll32_op = 0x000, ++ mm_ins_op = 0x00c, ++ mm_sllv32_op = 0x010, ++ mm_ext_op = 0x02c, ++ mm_pool32axf_op = 0x03c, ++ mm_srl32_op = 0x040, ++ mm_srlv32_op = 0x050, ++ mm_sra_op = 0x080, ++ mm_srav_op = 0x090, ++ mm_rotr_op = 0x0c0, ++ mm_lwxs_op = 0x118, ++ mm_addu32_op = 0x150, ++ mm_subu32_op = 0x1d0, ++ mm_wsbh_op = 0x1ec, ++ mm_mul_op = 0x210, ++ mm_and_op = 0x250, ++ mm_or32_op = 0x290, ++ mm_xor32_op = 0x310, ++ mm_slt_op = 0x350, ++ mm_sltu_op = 0x390, ++}; ++enum mm_32b_func { ++ mm_lwc2_func = 0x0, ++ mm_lwp_func = 0x1, ++ mm_ldc2_func = 0x2, ++ mm_ldp_func = 0x4, ++ mm_lwm32_func = 0x5, ++ mm_cache_func = 0x6, ++ mm_ldm_func = 0x7, ++ mm_swc2_func = 0x8, ++ mm_swp_func = 0x9, ++ mm_sdc2_func = 0xa, ++ mm_sdp_func = 0xc, ++ mm_swm32_func = 0xd, ++ mm_sdm_func = 0xf, ++}; ++enum mm_32c_func { ++ mm_pref_func = 0x2, ++ mm_ll_func = 0x3, ++ mm_swr_func = 0x9, ++ mm_sc_func = 0xb, ++ mm_lwu_func = 0xe, ++}; ++enum mm_32axf_minor_op { ++ mm_mfc0_op = 0x003, ++ mm_mtc0_op = 0x00b, ++ mm_tlbp_op = 0x00d, ++ mm_mfhi32_op = 0x035, ++ mm_jalr_op = 0x03c, ++ mm_tlbr_op = 0x04d, ++ mm_mflo32_op = 0x075, ++ mm_jalrhb_op = 0x07c, ++ mm_tlbwi_op = 0x08d, ++ mm_mthi32_op = 0x0b5, ++ mm_tlbwr_op = 0x0cd, ++ mm_mtlo32_op = 0x0f5, ++ mm_di_op = 0x11d, ++ mm_jalrs_op = 0x13c, ++ mm_jalrshb_op = 0x17c, ++ mm_sync_op = 0x1ad, ++ mm_syscall_op = 0x22d, ++ mm_wait_op = 0x24d, ++ mm_eret_op = 0x3cd, ++ mm_divu_op = 0x5dc, ++}; ++enum mm_32f_minor_op { ++ mm_32f_00_op = 0x00, ++ mm_32f_01_op = 0x01, ++ mm_32f_02_op = 0x02, ++ mm_32f_10_op = 0x08, ++ mm_32f_11_op = 0x09, ++ mm_32f_12_op = 0x0a, ++ mm_32f_20_op = 0x10, ++ mm_32f_30_op = 0x18, ++ mm_32f_40_op = 0x20, ++ mm_32f_41_op = 0x21, ++ mm_32f_42_op = 0x22, ++ mm_32f_50_op = 0x28, ++ mm_32f_51_op = 0x29, ++ mm_32f_52_op = 0x2a, ++ mm_32f_60_op = 0x30, ++ mm_32f_70_op = 0x38, ++ mm_32f_73_op = 0x3b, ++ mm_32f_74_op = 0x3c, ++}; ++enum mm_32f_10_minor_op { ++ mm_lwxc1_op = 0x1, ++ mm_swxc1_op, ++ mm_ldxc1_op, ++ mm_sdxc1_op, ++ mm_luxc1_op, ++ mm_suxc1_op, ++}; ++enum mm_32f_func { ++ mm_lwxc1_func = 0x048, ++ mm_swxc1_func = 0x088, ++ mm_ldxc1_func = 0x0c8, ++ mm_sdxc1_func = 0x108, ++}; ++enum mm_32f_40_minor_op { ++ mm_fmovf_op, ++ mm_fmovt_op, ++}; ++enum mm_32f_60_minor_op { ++ mm_fadd_op, ++ mm_fsub_op, ++ mm_fmul_op, ++ mm_fdiv_op, ++}; ++enum mm_32f_70_minor_op { ++ mm_fmovn_op, ++ mm_fmovz_op, ++}; ++enum mm_32f_73_minor_op { ++ mm_fmov0_op = 0x01, ++ mm_fcvtl_op = 0x04, ++ mm_movf0_op = 0x05, ++ mm_frsqrt_op = 0x08, ++ mm_ffloorl_op = 0x0c, ++ mm_fabs0_op = 0x0d, ++ mm_fcvtw_op = 0x24, ++ mm_movt0_op = 0x25, ++ mm_fsqrt_op = 0x28, ++ mm_ffloorw_op = 0x2c, ++ mm_fneg0_op = 0x2d, ++ mm_cfc1_op = 0x40, ++ mm_frecip_op = 0x48, ++ mm_fceill_op = 0x4c, ++ mm_fcvtd0_op = 0x4d, ++ mm_ctc1_op = 0x60, ++ mm_fceilw_op = 0x6c, ++ mm_fcvts0_op = 0x6d, ++ mm_mfc1_op = 0x80, ++ mm_fmov1_op = 0x81, ++ mm_movf1_op = 0x85, ++ mm_ftruncl_op = 0x8c, ++ mm_fabs1_op = 0x8d, ++ mm_mtc1_op = 0xa0, ++ mm_movt1_op = 0xa5, ++ mm_ftruncw_op = 0xac, ++ mm_fneg1_op = 0xad, ++ mm_mfhc1_op = 0xc0, ++ mm_froundl_op = 0xcc, ++ mm_fcvtd1_op = 0xcd, ++ mm_mthc1_op = 0xe0, ++ mm_froundw_op = 0xec, ++ mm_fcvts1_op = 0xed, ++}; ++enum mm_32s_minor_op { ++ mm_32s_elm_op = 0x16, ++}; ++enum mm_16c_minor_op { ++ mm_lwm16_op = 0x04, ++ mm_swm16_op = 0x05, ++ mm_jr16_op = 0x0c, ++ mm_jrc_op = 0x0d, ++ mm_jalr16_op = 0x0e, ++ mm_jalrs16_op = 0x0f, ++ mm_jraddiusp_op = 0x18, ++}; ++enum mm_16d_minor_op { ++ mm_addius5_func, ++ mm_addiusp_func, ++}; ++enum MIPS16e_ops { ++ MIPS16e_jal_op = 003, ++ MIPS16e_ld_op = 007, ++ MIPS16e_i8_op = 014, ++ MIPS16e_sd_op = 017, ++ MIPS16e_lb_op = 020, ++ MIPS16e_lh_op = 021, ++ MIPS16e_lwsp_op = 022, ++ MIPS16e_lw_op = 023, ++ MIPS16e_lbu_op = 024, ++ MIPS16e_lhu_op = 025, ++ MIPS16e_lwpc_op = 026, ++ MIPS16e_lwu_op = 027, ++ MIPS16e_sb_op = 030, ++ MIPS16e_sh_op = 031, ++ MIPS16e_swsp_op = 032, ++ MIPS16e_sw_op = 033, ++ MIPS16e_rr_op = 035, ++ MIPS16e_extend_op = 036, ++ MIPS16e_i64_op = 037, ++}; ++enum MIPS16e_i64_func { ++ MIPS16e_ldsp_func, ++ MIPS16e_sdsp_func, ++ MIPS16e_sdrasp_func, ++ MIPS16e_dadjsp_func, ++ MIPS16e_ldpc_func, ++}; ++enum MIPS16e_rr_func { ++ MIPS16e_jr_func, ++}; ++enum MIPS6e_i8_func { ++ MIPS16e_swrasp_func = 02, ++}; ++#define MM_NOP16 0x0c00 ++struct j_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int target : 26,; ++ )) ++}; ++struct i_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 16,; ++ )))) ++}; ++struct u_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int uimmediate : 16,; ++ )))) ++}; ++struct c_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int c_op : 3, __BITFIELD_FIELD(unsigned int cache : 2, __BITFIELD_FIELD(unsigned int simmediate : 16,; ++ ))))) ++}; ++struct r_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct c0r_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int z : 8, __BITFIELD_FIELD(unsigned int sel : 3,; ++ )))))) ++}; ++struct mfmc0_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int sc : 1, __BITFIELD_FIELD(unsigned int : 2, __BITFIELD_FIELD(unsigned int sel : 3,; ++ )))))))) ++}; ++struct co_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int co : 1, __BITFIELD_FIELD(unsigned int code : 19, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))) ++}; ++struct p_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct f_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int : 1, __BITFIELD_FIELD(unsigned int fmt : 4, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int re : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ ))))))) ++}; ++struct ma_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int fmt : 2,; ++ ))))))) ++}; ++struct b_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int code : 20, __BITFIELD_FIELD(unsigned int func : 6,; ++ ))) ++}; ++struct ps_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct v_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int sel : 4, __BITFIELD_FIELD(unsigned int fmt : 1, __BITFIELD_FIELD(unsigned int vt : 5, __BITFIELD_FIELD(unsigned int vs : 5, __BITFIELD_FIELD(unsigned int vd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ ))))))) ++}; ++struct msa_mi10_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int s10 : 10, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int wd : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int df : 2,; ++ )))))) ++}; ++struct dsp_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct spec3_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(signed int simmediate : 9, __BITFIELD_FIELD(unsigned int func : 7,; ++ ))))) ++}; ++struct fb_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int bc : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int flag : 2, __BITFIELD_FIELD(signed int simmediate : 16,; ++ ))))) ++}; ++struct fp0_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fmt : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_fp0_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 2, __BITFIELD_FIELD(unsigned int func : 6,; ++ ))))))) ++}; ++struct fp1_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_fp1_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 8, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_fp2_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int zero : 2, __BITFIELD_FIELD(unsigned int fmt : 2, __BITFIELD_FIELD(unsigned int op : 3, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))))) ++}; ++struct mm_fp3_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int op : 7, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_fp4_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int cc : 3, __BITFIELD_FIELD(unsigned int fmt : 3, __BITFIELD_FIELD(unsigned int cond : 4, __BITFIELD_FIELD(unsigned int func : 6,; ++ ))))))) ++}; ++struct mm_fp5_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int op : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct fp6_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_fp6_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int ft : 5, __BITFIELD_FIELD(unsigned int fs : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct mm_i_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(signed int simmediate : 16,; ++ )))) ++}; ++struct mm_m_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(signed int simmediate : 12,; ++ ))))) ++}; ++struct mm_x_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int func : 11,; ++ ))))) ++}; ++struct mm_a_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 23,; ++ ))) ++}; ++struct mm_b0_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(signed int simmediate : 10, __BITFIELD_FIELD(unsigned int : 16,; ++ ))) ++}; ++struct mm_b1_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,; ++ )))) ++}; ++struct mm16_m_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int func : 4, __BITFIELD_FIELD(unsigned int rlist : 2, __BITFIELD_FIELD(unsigned int imm : 4, __BITFIELD_FIELD(unsigned int : 16,; ++ ))))) ++}; ++struct mm16_rb_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(unsigned int base : 3, __BITFIELD_FIELD(signed int simmediate : 4, __BITFIELD_FIELD(unsigned int : 16,; ++ ))))) ++}; ++struct mm16_r3_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 3, __BITFIELD_FIELD(signed int simmediate : 7, __BITFIELD_FIELD(unsigned int : 16,; ++ )))) ++}; ++struct mm16_r5_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int imm : 5, __BITFIELD_FIELD(unsigned int : 16,; ++ )))) ++}; ++struct loongson3_lswc2_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int fr : 1, __BITFIELD_FIELD(unsigned int offset : 9, __BITFIELD_FIELD(unsigned int ls : 1, __BITFIELD_FIELD(unsigned int rq : 5,; ++ ))))))) ++}; ++struct loongson3_lsdc2_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int base : 5, __BITFIELD_FIELD(unsigned int rt : 5, __BITFIELD_FIELD(unsigned int index : 5, __BITFIELD_FIELD(unsigned int offset : 8, __BITFIELD_FIELD(unsigned int opcode1 : 3,; ++ )))))) ++}; ++struct loongson3_lscsr_format { ++ __BITFIELD_FIELD(unsigned int opcode : 6, __BITFIELD_FIELD(unsigned int rs : 5, __BITFIELD_FIELD(unsigned int fr : 5, __BITFIELD_FIELD(unsigned int rd : 5, __BITFIELD_FIELD(unsigned int fd : 5, __BITFIELD_FIELD(unsigned int func : 6,; ++ )))))) ++}; ++struct m16e_rr { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int nd : 1, __BITFIELD_FIELD(unsigned int l : 1, __BITFIELD_FIELD(unsigned int ra : 1, __BITFIELD_FIELD(unsigned int func : 5,; ++ )))))) ++}; ++struct m16e_jal { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int x : 1, __BITFIELD_FIELD(unsigned int imm20_16 : 5, __BITFIELD_FIELD(signed int imm25_21 : 5,; ++ )))) ++}; ++struct m16e_i64 { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,; ++ ))) ++}; ++struct m16e_ri64 { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,; ++ )))) ++}; ++struct m16e_ri { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int imm : 8,; ++ ))) ++}; ++struct m16e_rri { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int rx : 3, __BITFIELD_FIELD(unsigned int ry : 3, __BITFIELD_FIELD(unsigned int imm : 5,; ++ )))) ++}; ++struct m16e_i8 { ++ __BITFIELD_FIELD(unsigned int opcode : 5, __BITFIELD_FIELD(unsigned int func : 3, __BITFIELD_FIELD(unsigned int imm : 8,; ++ ))) ++}; ++union mips_instruction { ++ unsigned int word; ++ unsigned short halfword[2]; ++ unsigned char byte[4]; ++ struct j_format j_format; ++ struct i_format i_format; ++ struct u_format u_format; ++ struct c_format c_format; ++ struct r_format r_format; ++ struct c0r_format c0r_format; ++ struct mfmc0_format mfmc0_format; ++ struct co_format co_format; ++ struct p_format p_format; ++ struct f_format f_format; ++ struct ma_format ma_format; ++ struct msa_mi10_format msa_mi10_format; ++ struct b_format b_format; ++ struct ps_format ps_format; ++ struct v_format v_format; ++ struct dsp_format dsp_format; ++ struct spec3_format spec3_format; ++ struct fb_format fb_format; ++ struct fp0_format fp0_format; ++ struct mm_fp0_format mm_fp0_format; ++ struct fp1_format fp1_format; ++ struct mm_fp1_format mm_fp1_format; ++ struct mm_fp2_format mm_fp2_format; ++ struct mm_fp3_format mm_fp3_format; ++ struct mm_fp4_format mm_fp4_format; ++ struct mm_fp5_format mm_fp5_format; ++ struct fp6_format fp6_format; ++ struct mm_fp6_format mm_fp6_format; ++ struct mm_i_format mm_i_format; ++ struct mm_m_format mm_m_format; ++ struct mm_x_format mm_x_format; ++ struct mm_a_format mm_a_format; ++ struct mm_b0_format mm_b0_format; ++ struct mm_b1_format mm_b1_format; ++ struct mm16_m_format mm16_m_format; ++ struct mm16_rb_format mm16_rb_format; ++ struct mm16_r3_format mm16_r3_format; ++ struct mm16_r5_format mm16_r5_format; ++ struct loongson3_lswc2_format loongson3_lswc2_format; ++ struct loongson3_lsdc2_format loongson3_lsdc2_format; ++ struct loongson3_lscsr_format loongson3_lscsr_format; ++}; ++union mips16e_instruction { ++ unsigned int full : 16; ++ struct m16e_rr rr; ++ struct m16e_jal jal; ++ struct m16e_i64 i64; ++ struct m16e_ri64 ri64; ++ struct m16e_ri ri; ++ struct m16e_rri rri; ++ struct m16e_i8 i8; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctl.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctl.h +new file mode 100644 +index 0000000..73e6244 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctl.h +@@ -0,0 +1,27 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_IOCTL_H ++#define __ASM_IOCTL_H ++#define _IOC_SIZEBITS 13 ++#define _IOC_DIRBITS 3 ++#define _IOC_NONE 1U ++#define _IOC_READ 2U ++#define _IOC_WRITE 4U ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctls.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctls.h +new file mode 100644 +index 0000000..694546f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ioctls.h +@@ -0,0 +1,108 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_IOCTLS_H ++#define __ASM_IOCTLS_H ++#include ++#define TCGETA 0x5401 ++#define TCSETA 0x5402 ++#define TCSETAW 0x5403 ++#define TCSETAF 0x5404 ++#define TCSBRK 0x5405 ++#define TCXONC 0x5406 ++#define TCFLSH 0x5407 ++#define TCGETS 0x540d ++#define TCSETS 0x540e ++#define TCSETSW 0x540f ++#define TCSETSF 0x5410 ++#define TIOCEXCL 0x740d ++#define TIOCNXCL 0x740e ++#define TIOCOUTQ 0x7472 ++#define TIOCSTI 0x5472 ++#define TIOCMGET 0x741d ++#define TIOCMBIS 0x741b ++#define TIOCMBIC 0x741c ++#define TIOCMSET 0x741a ++#define TIOCPKT 0x5470 ++#define TIOCPKT_DATA 0x00 ++#define TIOCPKT_FLUSHREAD 0x01 ++#define TIOCPKT_FLUSHWRITE 0x02 ++#define TIOCPKT_STOP 0x04 ++#define TIOCPKT_START 0x08 ++#define TIOCPKT_NOSTOP 0x10 ++#define TIOCPKT_DOSTOP 0x20 ++#define TIOCPKT_IOCTL 0x40 ++#define TIOCSWINSZ _IOW('t', 103, struct winsize) ++#define TIOCGWINSZ _IOR('t', 104, struct winsize) ++#define TIOCNOTTY 0x5471 ++#define TIOCSETD 0x7401 ++#define TIOCGETD 0x7400 ++#define FIOCLEX 0x6601 ++#define FIONCLEX 0x6602 ++#define FIOASYNC 0x667d ++#define FIONBIO 0x667e ++#define FIOQSIZE 0x667f ++#define TIOCGLTC 0x7474 ++#define TIOCSLTC 0x7475 ++#define TIOCSPGRP _IOW('t', 118, int) ++#define TIOCGPGRP _IOR('t', 119, int) ++#define TIOCCONS _IOW('t', 120, int) ++#define FIONREAD 0x467f ++#define TIOCINQ FIONREAD ++#define TIOCGETP 0x7408 ++#define TIOCSETP 0x7409 ++#define TIOCSETN 0x740a ++#define TIOCSBRK 0x5427 ++#define TIOCCBRK 0x5428 ++#define TIOCGSID 0x7416 ++#define TCGETS2 _IOR('T', 0x2A, struct termios2) ++#define TCSETS2 _IOW('T', 0x2B, struct termios2) ++#define TCSETSW2 _IOW('T', 0x2C, struct termios2) ++#define TCSETSF2 _IOW('T', 0x2D, struct termios2) ++#define TIOCGRS485 _IOR('T', 0x2E, struct serial_rs485) ++#define TIOCSRS485 _IOWR('T', 0x2F, struct serial_rs485) ++#define TIOCGPTN _IOR('T', 0x30, unsigned int) ++#define TIOCSPTLCK _IOW('T', 0x31, int) ++#define TIOCGDEV _IOR('T', 0x32, unsigned int) ++#define TIOCSIG _IOW('T', 0x36, int) ++#define TIOCVHANGUP 0x5437 ++#define TIOCGPKT _IOR('T', 0x38, int) ++#define TIOCGPTLCK _IOR('T', 0x39, int) ++#define TIOCGEXCL _IOR('T', 0x40, int) ++#define TIOCGPTPEER _IO('T', 0x41) ++#define TIOCGISO7816 _IOR('T', 0x42, struct serial_iso7816) ++#define TIOCSISO7816 _IOWR('T', 0x43, struct serial_iso7816) ++#define TIOCSCTTY 0x5480 ++#define TIOCGSOFTCAR 0x5481 ++#define TIOCSSOFTCAR 0x5482 ++#define TIOCLINUX 0x5483 ++#define TIOCGSERIAL 0x5484 ++#define TIOCSSERIAL 0x5485 ++#define TCSBRKP 0x5486 ++#define TIOCSERCONFIG 0x5488 ++#define TIOCSERGWILD 0x5489 ++#define TIOCSERSWILD 0x548a ++#define TIOCGLCKTRMIOS 0x548b ++#define TIOCSLCKTRMIOS 0x548c ++#define TIOCSERGSTRUCT 0x548d ++#define TIOCSERGETLSR 0x548e ++#define TIOCSERGETMULTI 0x548f ++#define TIOCSERSETMULTI 0x5490 ++#define TIOCMIWAIT 0x5491 ++#define TIOCGICOUNT 0x5492 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ipcbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ipcbuf.h +new file mode 100644 +index 0000000..0021f14 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ipcbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm.h +new file mode 100644 +index 0000000..c42ea8d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm.h +@@ -0,0 +1,100 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __LINUX_KVM_MIPS_H ++#define __LINUX_KVM_MIPS_H ++#include ++#define __KVM_HAVE_READONLY_MEM ++#define KVM_COALESCED_MMIO_PAGE_OFFSET 1 ++struct kvm_regs { ++ __u64 gpr[32]; ++ __u64 hi; ++ __u64 lo; ++ __u64 pc; ++}; ++struct kvm_fpu { ++}; ++#define KVM_REG_MIPS_GP (KVM_REG_MIPS | 0x0000000000000000ULL) ++#define KVM_REG_MIPS_CP0 (KVM_REG_MIPS | 0x0000000000010000ULL) ++#define KVM_REG_MIPS_KVM (KVM_REG_MIPS | 0x0000000000020000ULL) ++#define KVM_REG_MIPS_FPU (KVM_REG_MIPS | 0x0000000000030000ULL) ++#define KVM_REG_MIPS_R0 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 0) ++#define KVM_REG_MIPS_R1 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 1) ++#define KVM_REG_MIPS_R2 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 2) ++#define KVM_REG_MIPS_R3 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 3) ++#define KVM_REG_MIPS_R4 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 4) ++#define KVM_REG_MIPS_R5 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 5) ++#define KVM_REG_MIPS_R6 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 6) ++#define KVM_REG_MIPS_R7 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 7) ++#define KVM_REG_MIPS_R8 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 8) ++#define KVM_REG_MIPS_R9 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 9) ++#define KVM_REG_MIPS_R10 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 10) ++#define KVM_REG_MIPS_R11 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 11) ++#define KVM_REG_MIPS_R12 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 12) ++#define KVM_REG_MIPS_R13 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 13) ++#define KVM_REG_MIPS_R14 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 14) ++#define KVM_REG_MIPS_R15 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 15) ++#define KVM_REG_MIPS_R16 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 16) ++#define KVM_REG_MIPS_R17 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 17) ++#define KVM_REG_MIPS_R18 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 18) ++#define KVM_REG_MIPS_R19 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 19) ++#define KVM_REG_MIPS_R20 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 20) ++#define KVM_REG_MIPS_R21 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 21) ++#define KVM_REG_MIPS_R22 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 22) ++#define KVM_REG_MIPS_R23 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 23) ++#define KVM_REG_MIPS_R24 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 24) ++#define KVM_REG_MIPS_R25 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 25) ++#define KVM_REG_MIPS_R26 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 26) ++#define KVM_REG_MIPS_R27 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 27) ++#define KVM_REG_MIPS_R28 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 28) ++#define KVM_REG_MIPS_R29 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 29) ++#define KVM_REG_MIPS_R30 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 30) ++#define KVM_REG_MIPS_R31 (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 31) ++#define KVM_REG_MIPS_HI (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 32) ++#define KVM_REG_MIPS_LO (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 33) ++#define KVM_REG_MIPS_PC (KVM_REG_MIPS_GP | KVM_REG_SIZE_U64 | 34) ++#define KVM_REG_MIPS_MAAR (KVM_REG_MIPS_CP0 | (1 << 8)) ++#define KVM_REG_MIPS_CP0_MAAR(n) (KVM_REG_MIPS_MAAR | KVM_REG_SIZE_U64 | (n)) ++#define KVM_REG_MIPS_COUNT_CTL (KVM_REG_MIPS_KVM | KVM_REG_SIZE_U64 | 0) ++#define KVM_REG_MIPS_COUNT_CTL_DC 0x00000001 ++#define KVM_REG_MIPS_COUNT_RESUME (KVM_REG_MIPS_KVM | KVM_REG_SIZE_U64 | 1) ++#define KVM_REG_MIPS_COUNT_HZ (KVM_REG_MIPS_KVM | KVM_REG_SIZE_U64 | 2) ++#define KVM_REG_MIPS_FPR (KVM_REG_MIPS_FPU | 0x0000000000000000ULL) ++#define KVM_REG_MIPS_FCR (KVM_REG_MIPS_FPU | 0x0000000000000100ULL) ++#define KVM_REG_MIPS_MSACR (KVM_REG_MIPS_FPU | 0x0000000000000200ULL) ++#define KVM_REG_MIPS_FPR_32(n) (KVM_REG_MIPS_FPR | KVM_REG_SIZE_U32 | (n)) ++#define KVM_REG_MIPS_FPR_64(n) (KVM_REG_MIPS_FPR | KVM_REG_SIZE_U64 | (n)) ++#define KVM_REG_MIPS_VEC_128(n) (KVM_REG_MIPS_FPR | KVM_REG_SIZE_U128 | (n)) ++#define KVM_REG_MIPS_FCR_IR (KVM_REG_MIPS_FCR | KVM_REG_SIZE_U32 | 0) ++#define KVM_REG_MIPS_FCR_CSR (KVM_REG_MIPS_FCR | KVM_REG_SIZE_U32 | 31) ++#define KVM_REG_MIPS_MSA_IR (KVM_REG_MIPS_MSACR | KVM_REG_SIZE_U32 | 0) ++#define KVM_REG_MIPS_MSA_CSR (KVM_REG_MIPS_MSACR | KVM_REG_SIZE_U32 | 1) ++struct kvm_debug_exit_arch { ++ __u64 epc; ++}; ++struct kvm_guest_debug_arch { ++}; ++struct kvm_sync_regs { ++}; ++struct kvm_sregs { ++}; ++struct kvm_mips_interrupt { ++ __u32 cpu; ++ __u32 irq; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm_para.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm_para.h +new file mode 100644 +index 0000000..e19f7a0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/kvm_para.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/mman.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/mman.h +new file mode 100644 +index 0000000..86df482 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/mman.h +@@ -0,0 +1,76 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MMAN_H ++#define _ASM_MMAN_H ++#define PROT_NONE 0x00 ++#define PROT_READ 0x01 ++#define PROT_WRITE 0x02 ++#define PROT_EXEC 0x04 ++#define PROT_SEM 0x10 ++#define PROT_GROWSDOWN 0x01000000 ++#define PROT_GROWSUP 0x02000000 ++#define MAP_TYPE 0x00f ++#define MAP_FIXED 0x010 ++#define MAP_RENAME 0x020 ++#define MAP_AUTOGROW 0x040 ++#define MAP_LOCAL 0x080 ++#define MAP_AUTORSRV 0x100 ++#define MAP_NORESERVE 0x0400 ++#define MAP_ANONYMOUS 0x0800 ++#define MAP_GROWSDOWN 0x1000 ++#define MAP_DENYWRITE 0x2000 ++#define MAP_EXECUTABLE 0x4000 ++#define MAP_LOCKED 0x8000 ++#define MAP_POPULATE 0x10000 ++#define MAP_NONBLOCK 0x20000 ++#define MAP_STACK 0x40000 ++#define MAP_HUGETLB 0x80000 ++#define MAP_FIXED_NOREPLACE 0x100000 ++#define MS_ASYNC 0x0001 ++#define MS_INVALIDATE 0x0002 ++#define MS_SYNC 0x0004 ++#define MCL_CURRENT 1 ++#define MCL_FUTURE 2 ++#define MCL_ONFAULT 4 ++#define MLOCK_ONFAULT 0x01 ++#define MADV_NORMAL 0 ++#define MADV_RANDOM 1 ++#define MADV_SEQUENTIAL 2 ++#define MADV_WILLNEED 3 ++#define MADV_DONTNEED 4 ++#define MADV_FREE 8 ++#define MADV_REMOVE 9 ++#define MADV_DONTFORK 10 ++#define MADV_DOFORK 11 ++#define MADV_MERGEABLE 12 ++#define MADV_UNMERGEABLE 13 ++#define MADV_HWPOISON 100 ++#define MADV_HUGEPAGE 14 ++#define MADV_NOHUGEPAGE 15 ++#define MADV_DONTDUMP 16 ++#define MADV_DODUMP 17 ++#define MADV_WIPEONFORK 18 ++#define MADV_KEEPONFORK 19 ++#define MADV_COLD 20 ++#define MADV_PAGEOUT 21 ++#define MAP_FILE 0 ++#define PKEY_DISABLE_ACCESS 0x1 ++#define PKEY_DISABLE_WRITE 0x2 ++#define PKEY_ACCESS_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/msgbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/msgbuf.h +new file mode 100644 +index 0000000..3343df1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/msgbuf.h +@@ -0,0 +1,73 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MSGBUF_H ++#define _ASM_MSGBUF_H ++#include ++#ifdef __mips64 ++struct msqid64_ds { ++ struct ipc64_perm msg_perm; ++ long msg_stime; ++ long msg_rtime; ++ long msg_ctime; ++ unsigned long msg_cbytes; ++ unsigned long msg_qnum; ++ unsigned long msg_qbytes; ++ __kernel_pid_t msg_lspid; ++ __kernel_pid_t msg_lrpid; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++#elif defined(__MIPSEB__) ++struct msqid64_ds { ++ struct ipc64_perm msg_perm; ++ unsigned long msg_stime_high; ++ unsigned long msg_stime; ++ unsigned long msg_rtime_high; ++ unsigned long msg_rtime; ++ unsigned long msg_ctime_high; ++ unsigned long msg_ctime; ++ unsigned long msg_cbytes; ++ unsigned long msg_qnum; ++ unsigned long msg_qbytes; ++ __kernel_pid_t msg_lspid; ++ __kernel_pid_t msg_lrpid; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++#elif defined(__MIPSEL__) ++struct msqid64_ds { ++ struct ipc64_perm msg_perm; ++ unsigned long msg_stime; ++ unsigned long msg_stime_high; ++ unsigned long msg_rtime; ++ unsigned long msg_rtime_high; ++ unsigned long msg_ctime; ++ unsigned long msg_ctime_high; ++ unsigned long msg_cbytes; ++ unsigned long msg_qnum; ++ unsigned long msg_qbytes; ++ __kernel_pid_t msg_lspid; ++ __kernel_pid_t msg_lrpid; ++ unsigned long __unused4; ++ unsigned long __unused5; ++}; ++#else ++#warning noendianessset ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/param.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/param.h +new file mode 100644 +index 0000000..cdfa9b8 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/param.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_PARAM_H ++#define _ASM_PARAM_H ++#define EXEC_PAGESIZE 65536 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/poll.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/poll.h +new file mode 100644 +index 0000000..566ec4f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/poll.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_POLL_H ++#define __ASM_POLL_H ++#define POLLWRNORM POLLOUT ++#define POLLWRBAND 0x0100 ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/posix_types.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/posix_types.h +new file mode 100644 +index 0000000..30c9f32 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/posix_types.h +@@ -0,0 +1,25 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_POSIX_TYPES_H ++#define _ASM_POSIX_TYPES_H ++#include ++typedef long __kernel_daddr_t; ++#define __kernel_daddr_t __kernel_daddr_t ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ptrace.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ptrace.h +new file mode 100644 +index 0000000..1f587d5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ptrace.h +@@ -0,0 +1,79 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_PTRACE_H ++#define _ASM_PTRACE_H ++#include ++#define FPR_BASE 32 ++#define PC 64 ++#define CAUSE 65 ++#define BADVADDR 66 ++#define MMHI 67 ++#define MMLO 68 ++#define FPC_CSR 69 ++#define FPC_EIR 70 ++#define DSP_BASE 71 ++#define DSP_CONTROL 77 ++#define ACX 78 ++struct pt_regs { ++ __u64 regs[32]; ++ __u64 lo; ++ __u64 hi; ++ __u64 cp0_epc; ++ __u64 cp0_badvaddr; ++ __u64 cp0_status; ++ __u64 cp0_cause; ++} __attribute__((aligned(8))); ++#define PTRACE_GETREGS 12 ++#define PTRACE_SETREGS 13 ++#define PTRACE_GETFPREGS 14 ++#define PTRACE_SETFPREGS 15 ++#define PTRACE_OLDSETOPTIONS 21 ++#define PTRACE_GET_THREAD_AREA 25 ++#define PTRACE_SET_THREAD_AREA 26 ++#define PTRACE_PEEKTEXT_3264 0xc0 ++#define PTRACE_PEEKDATA_3264 0xc1 ++#define PTRACE_POKETEXT_3264 0xc2 ++#define PTRACE_POKEDATA_3264 0xc3 ++#define PTRACE_GET_THREAD_AREA_3264 0xc4 ++enum pt_watch_style { ++ pt_watch_style_mips32, ++ pt_watch_style_mips64 ++}; ++struct mips32_watch_regs { ++ unsigned int watchlo[8]; ++ unsigned short watchhi[8]; ++ unsigned short watch_masks[8]; ++ unsigned int num_valid; ++} __attribute__((aligned(8))); ++struct mips64_watch_regs { ++ unsigned long long watchlo[8]; ++ unsigned short watchhi[8]; ++ unsigned short watch_masks[8]; ++ unsigned int num_valid; ++} __attribute__((aligned(8))); ++struct pt_watch_regs { ++ enum pt_watch_style style; ++ union { ++ struct mips32_watch_regs mips32; ++ struct mips64_watch_regs mips64; ++ }; ++}; ++#define PTRACE_GET_WATCH_REGS 0xd0 ++#define PTRACE_SET_WATCH_REGS 0xd1 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/reg.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/reg.h +new file mode 100644 +index 0000000..70015bc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/reg.h +@@ -0,0 +1,182 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __UAPI_ASM_MIPS_REG_H ++#define __UAPI_ASM_MIPS_REG_H ++#define MIPS32_EF_R0 6 ++#define MIPS32_EF_R1 7 ++#define MIPS32_EF_R2 8 ++#define MIPS32_EF_R3 9 ++#define MIPS32_EF_R4 10 ++#define MIPS32_EF_R5 11 ++#define MIPS32_EF_R6 12 ++#define MIPS32_EF_R7 13 ++#define MIPS32_EF_R8 14 ++#define MIPS32_EF_R9 15 ++#define MIPS32_EF_R10 16 ++#define MIPS32_EF_R11 17 ++#define MIPS32_EF_R12 18 ++#define MIPS32_EF_R13 19 ++#define MIPS32_EF_R14 20 ++#define MIPS32_EF_R15 21 ++#define MIPS32_EF_R16 22 ++#define MIPS32_EF_R17 23 ++#define MIPS32_EF_R18 24 ++#define MIPS32_EF_R19 25 ++#define MIPS32_EF_R20 26 ++#define MIPS32_EF_R21 27 ++#define MIPS32_EF_R22 28 ++#define MIPS32_EF_R23 29 ++#define MIPS32_EF_R24 30 ++#define MIPS32_EF_R25 31 ++#define MIPS32_EF_R26 32 ++#define MIPS32_EF_R27 33 ++#define MIPS32_EF_R28 34 ++#define MIPS32_EF_R29 35 ++#define MIPS32_EF_R30 36 ++#define MIPS32_EF_R31 37 ++#define MIPS32_EF_LO 38 ++#define MIPS32_EF_HI 39 ++#define MIPS32_EF_CP0_EPC 40 ++#define MIPS32_EF_CP0_BADVADDR 41 ++#define MIPS32_EF_CP0_STATUS 42 ++#define MIPS32_EF_CP0_CAUSE 43 ++#define MIPS32_EF_UNUSED0 44 ++#define MIPS32_EF_SIZE 180 ++#define MIPS64_EF_R0 0 ++#define MIPS64_EF_R1 1 ++#define MIPS64_EF_R2 2 ++#define MIPS64_EF_R3 3 ++#define MIPS64_EF_R4 4 ++#define MIPS64_EF_R5 5 ++#define MIPS64_EF_R6 6 ++#define MIPS64_EF_R7 7 ++#define MIPS64_EF_R8 8 ++#define MIPS64_EF_R9 9 ++#define MIPS64_EF_R10 10 ++#define MIPS64_EF_R11 11 ++#define MIPS64_EF_R12 12 ++#define MIPS64_EF_R13 13 ++#define MIPS64_EF_R14 14 ++#define MIPS64_EF_R15 15 ++#define MIPS64_EF_R16 16 ++#define MIPS64_EF_R17 17 ++#define MIPS64_EF_R18 18 ++#define MIPS64_EF_R19 19 ++#define MIPS64_EF_R20 20 ++#define MIPS64_EF_R21 21 ++#define MIPS64_EF_R22 22 ++#define MIPS64_EF_R23 23 ++#define MIPS64_EF_R24 24 ++#define MIPS64_EF_R25 25 ++#define MIPS64_EF_R26 26 ++#define MIPS64_EF_R27 27 ++#define MIPS64_EF_R28 28 ++#define MIPS64_EF_R29 29 ++#define MIPS64_EF_R30 30 ++#define MIPS64_EF_R31 31 ++#define MIPS64_EF_LO 32 ++#define MIPS64_EF_HI 33 ++#define MIPS64_EF_CP0_EPC 34 ++#define MIPS64_EF_CP0_BADVADDR 35 ++#define MIPS64_EF_CP0_STATUS 36 ++#define MIPS64_EF_CP0_CAUSE 37 ++#define MIPS64_EF_SIZE 304 ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++#define EF_R0 MIPS32_EF_R0 ++#define EF_R1 MIPS32_EF_R1 ++#define EF_R2 MIPS32_EF_R2 ++#define EF_R3 MIPS32_EF_R3 ++#define EF_R4 MIPS32_EF_R4 ++#define EF_R5 MIPS32_EF_R5 ++#define EF_R6 MIPS32_EF_R6 ++#define EF_R7 MIPS32_EF_R7 ++#define EF_R8 MIPS32_EF_R8 ++#define EF_R9 MIPS32_EF_R9 ++#define EF_R10 MIPS32_EF_R10 ++#define EF_R11 MIPS32_EF_R11 ++#define EF_R12 MIPS32_EF_R12 ++#define EF_R13 MIPS32_EF_R13 ++#define EF_R14 MIPS32_EF_R14 ++#define EF_R15 MIPS32_EF_R15 ++#define EF_R16 MIPS32_EF_R16 ++#define EF_R17 MIPS32_EF_R17 ++#define EF_R18 MIPS32_EF_R18 ++#define EF_R19 MIPS32_EF_R19 ++#define EF_R20 MIPS32_EF_R20 ++#define EF_R21 MIPS32_EF_R21 ++#define EF_R22 MIPS32_EF_R22 ++#define EF_R23 MIPS32_EF_R23 ++#define EF_R24 MIPS32_EF_R24 ++#define EF_R25 MIPS32_EF_R25 ++#define EF_R26 MIPS32_EF_R26 ++#define EF_R27 MIPS32_EF_R27 ++#define EF_R28 MIPS32_EF_R28 ++#define EF_R29 MIPS32_EF_R29 ++#define EF_R30 MIPS32_EF_R30 ++#define EF_R31 MIPS32_EF_R31 ++#define EF_LO MIPS32_EF_LO ++#define EF_HI MIPS32_EF_HI ++#define EF_CP0_EPC MIPS32_EF_CP0_EPC ++#define EF_CP0_BADVADDR MIPS32_EF_CP0_BADVADDR ++#define EF_CP0_STATUS MIPS32_EF_CP0_STATUS ++#define EF_CP0_CAUSE MIPS32_EF_CP0_CAUSE ++#define EF_UNUSED0 MIPS32_EF_UNUSED0 ++#define EF_SIZE MIPS32_EF_SIZE ++#elif _MIPS_SIM==_MIPS_SIM_ABI64||_MIPS_SIM==_MIPS_SIM_NABI32 ++#define EF_R0 MIPS64_EF_R0 ++#define EF_R1 MIPS64_EF_R1 ++#define EF_R2 MIPS64_EF_R2 ++#define EF_R3 MIPS64_EF_R3 ++#define EF_R4 MIPS64_EF_R4 ++#define EF_R5 MIPS64_EF_R5 ++#define EF_R6 MIPS64_EF_R6 ++#define EF_R7 MIPS64_EF_R7 ++#define EF_R8 MIPS64_EF_R8 ++#define EF_R9 MIPS64_EF_R9 ++#define EF_R10 MIPS64_EF_R10 ++#define EF_R11 MIPS64_EF_R11 ++#define EF_R12 MIPS64_EF_R12 ++#define EF_R13 MIPS64_EF_R13 ++#define EF_R14 MIPS64_EF_R14 ++#define EF_R15 MIPS64_EF_R15 ++#define EF_R16 MIPS64_EF_R16 ++#define EF_R17 MIPS64_EF_R17 ++#define EF_R18 MIPS64_EF_R18 ++#define EF_R19 MIPS64_EF_R19 ++#define EF_R20 MIPS64_EF_R20 ++#define EF_R21 MIPS64_EF_R21 ++#define EF_R22 MIPS64_EF_R22 ++#define EF_R23 MIPS64_EF_R23 ++#define EF_R24 MIPS64_EF_R24 ++#define EF_R25 MIPS64_EF_R25 ++#define EF_R26 MIPS64_EF_R26 ++#define EF_R27 MIPS64_EF_R27 ++#define EF_R28 MIPS64_EF_R28 ++#define EF_R29 MIPS64_EF_R29 ++#define EF_R30 MIPS64_EF_R30 ++#define EF_R31 MIPS64_EF_R31 ++#define EF_LO MIPS64_EF_LO ++#define EF_HI MIPS64_EF_HI ++#define EF_CP0_EPC MIPS64_EF_CP0_EPC ++#define EF_CP0_BADVADDR MIPS64_EF_CP0_BADVADDR ++#define EF_CP0_STATUS MIPS64_EF_CP0_STATUS ++#define EF_CP0_CAUSE MIPS64_EF_CP0_CAUSE ++#define EF_SIZE MIPS64_EF_SIZE ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/resource.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/resource.h +new file mode 100644 +index 0000000..f0cefad +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/resource.h +@@ -0,0 +1,30 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RESOURCE_H ++#define _ASM_RESOURCE_H ++#define RLIMIT_NOFILE 5 ++#define RLIMIT_AS 6 ++#define RLIMIT_RSS 7 ++#define RLIMIT_NPROC 8 ++#define RLIMIT_MEMLOCK 9 ++#ifndef __mips64 ++#define RLIM_INFINITY 0x7fffffffUL ++#endif ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sembuf.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sembuf.h +new file mode 100644 +index 0000000..eb4675d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sembuf.h +@@ -0,0 +1,41 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SEMBUF_H ++#define _ASM_SEMBUF_H ++#include ++#ifdef __mips64 ++struct semid64_ds { ++ struct ipc64_perm sem_perm; ++ long sem_otime; ++ long sem_ctime; ++ unsigned long sem_nsems; ++ unsigned long __unused1; ++ unsigned long __unused2; ++}; ++#else ++struct semid64_ds { ++ struct ipc64_perm sem_perm; ++ unsigned long sem_otime; ++ unsigned long sem_ctime; ++ unsigned long sem_nsems; ++ unsigned long sem_otime_high; ++ unsigned long sem_ctime_high; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/setup.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/setup.h +new file mode 100644 +index 0000000..4a10233 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/setup.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _MIPS_SETUP_H ++#define _MIPS_SETUP_H ++#define COMMAND_LINE_SIZE 4096 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sgidefs.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sgidefs.h +new file mode 100644 +index 0000000..92750de +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sgidefs.h +@@ -0,0 +1,31 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_SGIDEFS_H ++#define __ASM_SGIDEFS_H ++#define _MIPS_ISA_MIPS1 1 ++#define _MIPS_ISA_MIPS2 2 ++#define _MIPS_ISA_MIPS3 3 ++#define _MIPS_ISA_MIPS4 4 ++#define _MIPS_ISA_MIPS5 5 ++#define _MIPS_ISA_MIPS32 6 ++#define _MIPS_ISA_MIPS64 7 ++#define _MIPS_SIM_ABI32 1 ++#define _MIPS_SIM_NABI32 2 ++#define _MIPS_SIM_ABI64 3 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/shmbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/shmbuf.h +new file mode 100644 +index 0000000..8aa7563 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/shmbuf.h +@@ -0,0 +1,61 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SHMBUF_H ++#define _ASM_SHMBUF_H ++#ifdef __mips64 ++struct shmid64_ds { ++ struct ipc64_perm shm_perm; ++ size_t shm_segsz; ++ long shm_atime; ++ long shm_dtime; ++ long shm_ctime; ++ __kernel_pid_t shm_cpid; ++ __kernel_pid_t shm_lpid; ++ unsigned long shm_nattch; ++ unsigned long __unused1; ++ unsigned long __unused2; ++}; ++#else ++struct shmid64_ds { ++ struct ipc64_perm shm_perm; ++ size_t shm_segsz; ++ unsigned long shm_atime; ++ unsigned long shm_dtime; ++ unsigned long shm_ctime; ++ __kernel_pid_t shm_cpid; ++ __kernel_pid_t shm_lpid; ++ unsigned long shm_nattch; ++ unsigned short shm_atime_high; ++ unsigned short shm_dtime_high; ++ unsigned short shm_ctime_high; ++ unsigned short __unused1; ++}; ++#endif ++struct shminfo64 { ++ unsigned long shmmax; ++ unsigned long shmmin; ++ unsigned long shmmni; ++ unsigned long shmseg; ++ unsigned long shmall; ++ unsigned long __unused1; ++ unsigned long __unused2; ++ unsigned long __unused3; ++ unsigned long __unused4; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sigcontext.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sigcontext.h +new file mode 100644 +index 0000000..387ad68 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sigcontext.h +@@ -0,0 +1,69 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SIGCONTEXT_H ++#define _ASM_SIGCONTEXT_H ++#include ++#include ++#define USED_FP (1 << 0) ++#define USED_FR1 (1 << 1) ++#define USED_HYBRID_FPRS (1 << 2) ++#define USED_EXTCONTEXT (1 << 3) ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++struct sigcontext { ++ unsigned int sc_regmask; ++ unsigned int sc_status; ++ unsigned long long sc_pc; ++ unsigned long long sc_regs[32]; ++ unsigned long long sc_fpregs[32]; ++ unsigned int sc_acx; ++ unsigned int sc_fpc_csr; ++ unsigned int sc_fpc_eir; ++ unsigned int sc_used_math; ++ unsigned int sc_dsp; ++ unsigned long long sc_mdhi; ++ unsigned long long sc_mdlo; ++ unsigned long sc_hi1; ++ unsigned long sc_lo1; ++ unsigned long sc_hi2; ++ unsigned long sc_lo2; ++ unsigned long sc_hi3; ++ unsigned long sc_lo3; ++}; ++#endif ++#if _MIPS_SIM == _MIPS_SIM_ABI64 || _MIPS_SIM == _MIPS_SIM_NABI32 ++#include ++struct sigcontext { ++ __u64 sc_regs[32]; ++ __u64 sc_fpregs[32]; ++ __u64 sc_mdhi; ++ __u64 sc_hi1; ++ __u64 sc_hi2; ++ __u64 sc_hi3; ++ __u64 sc_mdlo; ++ __u64 sc_lo1; ++ __u64 sc_lo2; ++ __u64 sc_lo3; ++ __u64 sc_pc; ++ __u32 sc_fpc_csr; ++ __u32 sc_used_math; ++ __u32 sc_dsp; ++ __u32 sc_reserved; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/siginfo.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/siginfo.h +new file mode 100644 +index 0000000..c70d8dc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/siginfo.h +@@ -0,0 +1,31 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SIGINFO_H ++#define _ASM_SIGINFO_H ++#define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(long) + 2 * sizeof(int)) ++#undef __ARCH_SI_TRAPNO ++#define __ARCH_HAS_SWAPPED_SIGINFO ++#include ++#undef SI_ASYNCIO ++#undef SI_TIMER ++#undef SI_MESGQ ++#define SI_ASYNCIO - 2 ++#define SI_TIMER - 3 ++#define SI_MESGQ - 4 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/signal.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/signal.h +new file mode 100644 +index 0000000..ae12ebf +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/signal.h +@@ -0,0 +1,90 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SIGNAL_H ++#define _ASM_SIGNAL_H ++#include ++#define _KERNEL__NSIG 128 ++#define _NSIG_BPW (sizeof(unsigned long) * 8) ++#define _NSIG_WORDS (_KERNEL__NSIG / _NSIG_BPW) ++typedef struct { ++ unsigned long sig[_NSIG_WORDS]; ++} sigset_t; ++typedef unsigned long old_sigset_t; ++#define SIGHUP 1 ++#define SIGINT 2 ++#define SIGQUIT 3 ++#define SIGILL 4 ++#define SIGTRAP 5 ++#define SIGIOT 6 ++#define SIGABRT SIGIOT ++#define SIGEMT 7 ++#define SIGFPE 8 ++#define SIGKILL 9 ++#define SIGBUS 10 ++#define SIGSEGV 11 ++#define SIGSYS 12 ++#define SIGPIPE 13 ++#define SIGALRM 14 ++#define SIGTERM 15 ++#define SIGUSR1 16 ++#define SIGUSR2 17 ++#define SIGCHLD 18 ++#define SIGCLD SIGCHLD ++#define SIGPWR 19 ++#define SIGWINCH 20 ++#define SIGURG 21 ++#define SIGIO 22 ++#define SIGPOLL SIGIO ++#define SIGSTOP 23 ++#define SIGTSTP 24 ++#define SIGCONT 25 ++#define SIGTTIN 26 ++#define SIGTTOU 27 ++#define SIGVTALRM 28 ++#define SIGPROF 29 ++#define SIGXCPU 30 ++#define SIGXFSZ 31 ++#define __SIGRTMIN 32 ++#define __SIGRTMAX _KERNEL__NSIG ++#define SA_ONSTACK 0x08000000 ++#define SA_RESETHAND 0x80000000 ++#define SA_RESTART 0x10000000 ++#define SA_SIGINFO 0x00000008 ++#define SA_NODEFER 0x40000000 ++#define SA_NOCLDWAIT 0x00010000 ++#define SA_NOCLDSTOP 0x00000001 ++#define SA_NOMASK SA_NODEFER ++#define SA_ONESHOT SA_RESETHAND ++#define MINSIGSTKSZ 2048 ++#define SIGSTKSZ 8192 ++#define SIG_BLOCK 1 ++#define SIG_UNBLOCK 2 ++#define SIG_SETMASK 3 ++#include ++struct sigaction { ++ unsigned int sa_flags; ++ __sighandler_t sa_handler; ++ sigset_t sa_mask; ++}; ++typedef struct sigaltstack { ++ void * ss_sp; ++ size_t ss_size; ++ int ss_flags; ++} stack_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/socket.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/socket.h +new file mode 100644 +index 0000000..f616ae0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/socket.h +@@ -0,0 +1,113 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SOCKET_H ++#define _ASM_SOCKET_H ++#include ++#include ++#define SOL_SOCKET 0xffff ++#define SO_DEBUG 0x0001 ++#define SO_REUSEADDR 0x0004 ++#define SO_KEEPALIVE 0x0008 ++#define SO_DONTROUTE 0x0010 ++#define SO_BROADCAST 0x0020 ++#define SO_LINGER 0x0080 ++#define SO_OOBINLINE 0x0100 ++#define SO_REUSEPORT 0x0200 ++#define SO_TYPE 0x1008 ++#define SO_STYLE SO_TYPE ++#define SO_ERROR 0x1007 ++#define SO_SNDBUF 0x1001 ++#define SO_RCVBUF 0x1002 ++#define SO_SNDLOWAT 0x1003 ++#define SO_RCVLOWAT 0x1004 ++#define SO_SNDTIMEO_OLD 0x1005 ++#define SO_RCVTIMEO_OLD 0x1006 ++#define SO_ACCEPTCONN 0x1009 ++#define SO_PROTOCOL 0x1028 ++#define SO_DOMAIN 0x1029 ++#define SO_NO_CHECK 11 ++#define SO_PRIORITY 12 ++#define SO_BSDCOMPAT 14 ++#define SO_PASSCRED 17 ++#define SO_PEERCRED 18 ++#define SO_SECURITY_AUTHENTICATION 22 ++#define SO_SECURITY_ENCRYPTION_TRANSPORT 23 ++#define SO_SECURITY_ENCRYPTION_NETWORK 24 ++#define SO_BINDTODEVICE 25 ++#define SO_ATTACH_FILTER 26 ++#define SO_DETACH_FILTER 27 ++#define SO_GET_FILTER SO_ATTACH_FILTER ++#define SO_PEERNAME 28 ++#define SO_PEERSEC 30 ++#define SO_SNDBUFFORCE 31 ++#define SO_RCVBUFFORCE 33 ++#define SO_PASSSEC 34 ++#define SO_MARK 36 ++#define SO_RXQ_OVFL 40 ++#define SO_WIFI_STATUS 41 ++#define SCM_WIFI_STATUS SO_WIFI_STATUS ++#define SO_PEEK_OFF 42 ++#define SO_NOFCS 43 ++#define SO_LOCK_FILTER 44 ++#define SO_SELECT_ERR_QUEUE 45 ++#define SO_BUSY_POLL 46 ++#define SO_MAX_PACING_RATE 47 ++#define SO_BPF_EXTENSIONS 48 ++#define SO_INCOMING_CPU 49 ++#define SO_ATTACH_BPF 50 ++#define SO_DETACH_BPF SO_DETACH_FILTER ++#define SO_ATTACH_REUSEPORT_CBPF 51 ++#define SO_ATTACH_REUSEPORT_EBPF 52 ++#define SO_CNX_ADVICE 53 ++#define SCM_TIMESTAMPING_OPT_STATS 54 ++#define SO_MEMINFO 55 ++#define SO_INCOMING_NAPI_ID 56 ++#define SO_COOKIE 57 ++#define SCM_TIMESTAMPING_PKTINFO 58 ++#define SO_PEERGROUPS 59 ++#define SO_ZEROCOPY 60 ++#define SO_TXTIME 61 ++#define SCM_TXTIME SO_TXTIME ++#define SO_BINDTOIFINDEX 62 ++#define SO_TIMESTAMP_OLD 29 ++#define SO_TIMESTAMPNS_OLD 35 ++#define SO_TIMESTAMPING_OLD 37 ++#define SO_TIMESTAMP_NEW 63 ++#define SO_TIMESTAMPNS_NEW 64 ++#define SO_TIMESTAMPING_NEW 65 ++#define SO_RCVTIMEO_NEW 66 ++#define SO_SNDTIMEO_NEW 67 ++#define SO_DETACH_REUSEPORT_BPF 68 ++#if __BITS_PER_LONG == 64 ++#define SO_TIMESTAMP SO_TIMESTAMP_OLD ++#define SO_TIMESTAMPNS SO_TIMESTAMPNS_OLD ++#define SO_TIMESTAMPING SO_TIMESTAMPING_OLD ++#define SO_RCVTIMEO SO_RCVTIMEO_OLD ++#define SO_SNDTIMEO SO_SNDTIMEO_OLD ++#else ++#define SO_TIMESTAMP (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMP_OLD : SO_TIMESTAMP_NEW) ++#define SO_TIMESTAMPNS (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPNS_OLD : SO_TIMESTAMPNS_NEW) ++#define SO_TIMESTAMPING (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_TIMESTAMPING_OLD : SO_TIMESTAMPING_NEW) ++#define SO_RCVTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_RCVTIMEO_OLD : SO_RCVTIMEO_NEW) ++#define SO_SNDTIMEO (sizeof(time_t) == sizeof(__kernel_long_t) ? SO_SNDTIMEO_OLD : SO_SNDTIMEO_NEW) ++#endif ++#define SCM_TIMESTAMP SO_TIMESTAMP ++#define SCM_TIMESTAMPNS SO_TIMESTAMPNS ++#define SCM_TIMESTAMPING SO_TIMESTAMPING ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sockios.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sockios.h +new file mode 100644 +index 0000000..4240418 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sockios.h +@@ -0,0 +1,29 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SOCKIOS_H ++#define _ASM_SOCKIOS_H ++#include ++#define FIOGETOWN _IOR('f', 123, int) ++#define FIOSETOWN _IOW('f', 124, int) ++#define SIOCATMARK _IOR('s', 7, int) ++#define SIOCSPGRP _IOW('s', 8, pid_t) ++#define SIOCGPGRP _IOR('s', 9, pid_t) ++#define SIOCGSTAMP_OLD 0x8906 ++#define SIOCGSTAMPNS_OLD 0x8907 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/stat.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/stat.h +new file mode 100644 +index 0000000..184025b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/stat.h +@@ -0,0 +1,92 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_STAT_H ++#define _ASM_STAT_H ++#include ++#include ++#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 ++struct stat { ++ unsigned st_dev; ++ long st_pad1[3]; ++ ino_t st_ino; ++ mode_t st_mode; ++ __u32 st_nlink; ++ uid_t st_uid; ++ gid_t st_gid; ++ unsigned st_rdev; ++ long st_pad2[2]; ++ long st_size; ++ long st_pad3; ++ long st_atime; ++ long st_atime_nsec; ++ long st_mtime; ++ long st_mtime_nsec; ++ long st_ctime; ++ long st_ctime_nsec; ++ long st_blksize; ++ long st_blocks; ++ long st_pad4[14]; ++}; ++struct stat64 { ++ unsigned long st_dev; ++ unsigned long st_pad0[3]; ++ unsigned long long st_ino; ++ mode_t st_mode; ++ __u32 st_nlink; ++ uid_t st_uid; ++ gid_t st_gid; ++ unsigned long st_rdev; ++ unsigned long st_pad1[3]; ++ long long st_size; ++ long st_atime; ++ unsigned long st_atime_nsec; ++ long st_mtime; ++ unsigned long st_mtime_nsec; ++ long st_ctime; ++ unsigned long st_ctime_nsec; ++ unsigned long st_blksize; ++ unsigned long st_pad2; ++ long long st_blocks; ++}; ++#endif ++#if _MIPS_SIM == _MIPS_SIM_ABI64 ++struct stat { ++ unsigned int st_dev; ++ unsigned int st_pad0[3]; ++ unsigned long st_ino; ++ mode_t st_mode; ++ __u32 st_nlink; ++ uid_t st_uid; ++ gid_t st_gid; ++ unsigned int st_rdev; ++ unsigned int st_pad1[3]; ++ long st_size; ++ unsigned int st_atime; ++ unsigned int st_atime_nsec; ++ unsigned int st_mtime; ++ unsigned int st_mtime_nsec; ++ unsigned int st_ctime; ++ unsigned int st_ctime_nsec; ++ unsigned int st_blksize; ++ unsigned int st_pad2; ++ unsigned long st_blocks; ++}; ++#endif ++#define STAT_HAVE_NSEC 1 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/statfs.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/statfs.h +new file mode 100644 +index 0000000..1f6abff +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/statfs.h +@@ -0,0 +1,86 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_STATFS_H ++#define _ASM_STATFS_H ++#include ++#include ++struct statfs { ++ long f_type; ++#define f_fstyp f_type ++ long f_bsize; ++ long f_frsize; ++ long f_blocks; ++ long f_bfree; ++ long f_files; ++ long f_ffree; ++ long f_bavail; ++ __kernel_fsid_t f_fsid; ++ long f_namelen; ++ long f_flags; ++ long f_spare[5]; ++}; ++#if _MIPS_SIM == _MIPS_SIM_ABI32 || _MIPS_SIM == _MIPS_SIM_NABI32 ++struct statfs64 { ++ __u32 f_type; ++ __u32 f_bsize; ++ __u32 f_frsize; ++ __u32 __pad; ++ __u64 f_blocks; ++ __u64 f_bfree; ++ __u64 f_files; ++ __u64 f_ffree; ++ __u64 f_bavail; ++ __kernel_fsid_t f_fsid; ++ __u32 f_namelen; ++ __u32 f_flags; ++ __u32 f_spare[5]; ++}; ++#endif ++#if _MIPS_SIM == _MIPS_SIM_ABI64 ++struct statfs64 { ++ long f_type; ++ long f_bsize; ++ long f_frsize; ++ long f_blocks; ++ long f_bfree; ++ long f_files; ++ long f_ffree; ++ long f_bavail; ++ __kernel_fsid_t f_fsid; ++ long f_namelen; ++ long f_flags; ++ long f_spare[5]; ++}; ++struct compat_statfs64 { ++ __u32 f_type; ++ __u32 f_bsize; ++ __u32 f_frsize; ++ __u32 __pad; ++ __u64 f_blocks; ++ __u64 f_bfree; ++ __u64 f_files; ++ __u64 f_ffree; ++ __u64 f_bavail; ++ __kernel_fsid_t f_fsid; ++ __u32 f_namelen; ++ __u32 f_flags; ++ __u32 f_spare[5]; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/swab.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/swab.h +new file mode 100644 +index 0000000..20c2662 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/swab.h +@@ -0,0 +1,30 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SWAB_H ++#define _ASM_SWAB_H ++#include ++#define __SWAB_64_THRU_32__ ++#if !defined(__mips16) && (defined(__mips_isa_rev) && __mips_isa_rev >= 2 || defined(_MIPS_ARCH_LOONGSON3A)) ++#define __arch_swab16 __arch_swab16 ++#define __arch_swab32 __arch_swab32 ++#ifdef __mips64 ++#define __arch_swab64 __arch_swab64 ++#endif ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sysmips.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sysmips.h +new file mode 100644 +index 0000000..f217c7d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/sysmips.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_SYSMIPS_H ++#define _ASM_SYSMIPS_H ++#define SETNAME 1 ++#define FLUSH_CACHE 3 ++#define MIPS_FIXADE 7 ++#define MIPS_RDNVRAM 10 ++#define MIPS_ATOMIC_SET 2001 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termbits.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termbits.h +new file mode 100644 +index 0000000..a913ee3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termbits.h +@@ -0,0 +1,197 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_TERMBITS_H ++#define _ASM_TERMBITS_H ++#include ++typedef unsigned char cc_t; ++typedef unsigned int speed_t; ++typedef unsigned int tcflag_t; ++#define NCCS 23 ++struct termios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++}; ++struct termios2 { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t c_ispeed; ++ speed_t c_ospeed; ++}; ++struct ktermios { ++ tcflag_t c_iflag; ++ tcflag_t c_oflag; ++ tcflag_t c_cflag; ++ tcflag_t c_lflag; ++ cc_t c_line; ++ cc_t c_cc[NCCS]; ++ speed_t c_ispeed; ++ speed_t c_ospeed; ++}; ++#define VINTR 0 ++#define VQUIT 1 ++#define VERASE 2 ++#define VKILL 3 ++#define VMIN 4 ++#define VTIME 5 ++#define VEOL2 6 ++#define VSWTC 7 ++#define VSWTCH VSWTC ++#define VSTART 8 ++#define VSTOP 9 ++#define VSUSP 10 ++#define VREPRINT 12 ++#define VDISCARD 13 ++#define VWERASE 14 ++#define VLNEXT 15 ++#define VEOF 16 ++#define VEOL 17 ++#define IGNBRK 0000001 ++#define BRKINT 0000002 ++#define IGNPAR 0000004 ++#define PARMRK 0000010 ++#define INPCK 0000020 ++#define ISTRIP 0000040 ++#define INLCR 0000100 ++#define IGNCR 0000200 ++#define ICRNL 0000400 ++#define IUCLC 0001000 ++#define IXON 0002000 ++#define IXANY 0004000 ++#define IXOFF 0010000 ++#define IMAXBEL 0020000 ++#define IUTF8 0040000 ++#define OPOST 0000001 ++#define OLCUC 0000002 ++#define ONLCR 0000004 ++#define OCRNL 0000010 ++#define ONOCR 0000020 ++#define ONLRET 0000040 ++#define OFILL 0000100 ++#define OFDEL 0000200 ++#define NLDLY 0000400 ++#define NL0 0000000 ++#define NL1 0000400 ++#define CRDLY 0003000 ++#define CR0 0000000 ++#define CR1 0001000 ++#define CR2 0002000 ++#define CR3 0003000 ++#define TABDLY 0014000 ++#define TAB0 0000000 ++#define TAB1 0004000 ++#define TAB2 0010000 ++#define TAB3 0014000 ++#define XTABS 0014000 ++#define BSDLY 0020000 ++#define BS0 0000000 ++#define BS1 0020000 ++#define VTDLY 0040000 ++#define VT0 0000000 ++#define VT1 0040000 ++#define FFDLY 0100000 ++#define FF0 0000000 ++#define FF1 0100000 ++#define CBAUD 0010017 ++#define B0 0000000 ++#define B50 0000001 ++#define B75 0000002 ++#define B110 0000003 ++#define B134 0000004 ++#define B150 0000005 ++#define B200 0000006 ++#define B300 0000007 ++#define B600 0000010 ++#define B1200 0000011 ++#define B1800 0000012 ++#define B2400 0000013 ++#define B4800 0000014 ++#define B9600 0000015 ++#define B19200 0000016 ++#define B38400 0000017 ++#define EXTA B19200 ++#define EXTB B38400 ++#define CSIZE 0000060 ++#define CS5 0000000 ++#define CS6 0000020 ++#define CS7 0000040 ++#define CS8 0000060 ++#define CSTOPB 0000100 ++#define CREAD 0000200 ++#define PARENB 0000400 ++#define PARODD 0001000 ++#define HUPCL 0002000 ++#define CLOCAL 0004000 ++#define CBAUDEX 0010000 ++#define BOTHER 0010000 ++#define B57600 0010001 ++#define B115200 0010002 ++#define B230400 0010003 ++#define B460800 0010004 ++#define B500000 0010005 ++#define B576000 0010006 ++#define B921600 0010007 ++#define B1000000 0010010 ++#define B1152000 0010011 ++#define B1500000 0010012 ++#define B2000000 0010013 ++#define B2500000 0010014 ++#define B3000000 0010015 ++#define B3500000 0010016 ++#define B4000000 0010017 ++#define CIBAUD 002003600000 ++#define CMSPAR 010000000000 ++#define CRTSCTS 020000000000 ++#define IBSHIFT 16 ++#define ISIG 0000001 ++#define ICANON 0000002 ++#define XCASE 0000004 ++#define ECHO 0000010 ++#define ECHOE 0000020 ++#define ECHOK 0000040 ++#define ECHONL 0000100 ++#define NOFLSH 0000200 ++#define IEXTEN 0000400 ++#define ECHOCTL 0001000 ++#define ECHOPRT 0002000 ++#define ECHOKE 0004000 ++#define FLUSHO 0020000 ++#define PENDIN 0040000 ++#define TOSTOP 0100000 ++#define ITOSTOP TOSTOP ++#define EXTPROC 0200000 ++#define TIOCSER_TEMT 0x01 ++#define TCOOFF 0 ++#define TCOON 1 ++#define TCIOFF 2 ++#define TCION 3 ++#define TCIFLUSH 0 ++#define TCOFLUSH 1 ++#define TCIOFLUSH 2 ++#define TCSANOW TCSETS ++#define TCSADRAIN TCSETSW ++#define TCSAFLUSH TCSETSF ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termios.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termios.h +new file mode 100644 +index 0000000..a7eab0c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/termios.h +@@ -0,0 +1,76 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_TERMIOS_H ++#define _ASM_TERMIOS_H ++#include ++#include ++#include ++struct sgttyb { ++ char sg_ispeed; ++ char sg_ospeed; ++ char sg_erase; ++ char sg_kill; ++ int sg_flags; ++}; ++struct tchars { ++ char t_intrc; ++ char t_quitc; ++ char t_startc; ++ char t_stopc; ++ char t_eofc; ++ char t_brkc; ++}; ++struct ltchars { ++ char t_suspc; ++ char t_dsuspc; ++ char t_rprntc; ++ char t_flushc; ++ char t_werasc; ++ char t_lnextc; ++}; ++struct winsize { ++ unsigned short ws_row; ++ unsigned short ws_col; ++ unsigned short ws_xpixel; ++ unsigned short ws_ypixel; ++}; ++#define NCC 8 ++struct termio { ++ unsigned short c_iflag; ++ unsigned short c_oflag; ++ unsigned short c_cflag; ++ unsigned short c_lflag; ++ char c_line; ++ unsigned char c_cc[NCCS]; ++}; ++#define TIOCM_LE 0x001 ++#define TIOCM_DTR 0x002 ++#define TIOCM_RTS 0x004 ++#define TIOCM_ST 0x010 ++#define TIOCM_SR 0x020 ++#define TIOCM_CTS 0x040 ++#define TIOCM_CAR 0x100 ++#define TIOCM_CD TIOCM_CAR ++#define TIOCM_RNG 0x200 ++#define TIOCM_RI TIOCM_RNG ++#define TIOCM_DSR 0x400 ++#define TIOCM_OUT1 0x2000 ++#define TIOCM_OUT2 0x4000 ++#define TIOCM_LOOP 0x8000 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/types.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/types.h +new file mode 100644 +index 0000000..251cbcc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/types.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_TYPES_H ++#define _ASM_TYPES_H ++#if _MIPS_SZLONG == 64 && !defined(__SANE_USERSPACE_TYPES__) ++#include ++#else ++#include ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ucontext.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ucontext.h +new file mode 100644 +index 0000000..8775722 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/ucontext.h +@@ -0,0 +1,40 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __MIPS_UAPI_ASM_UCONTEXT_H ++#define __MIPS_UAPI_ASM_UCONTEXT_H ++struct extcontext { ++ unsigned int magic; ++ unsigned int size; ++}; ++struct msa_extcontext { ++ struct extcontext ext; ++#define MSA_EXTCONTEXT_MAGIC 0x784d5341 ++ unsigned long long wr[32]; ++ unsigned int csr; ++}; ++#define END_EXTCONTEXT_MAGIC 0x78454e44 ++struct ucontext { ++ unsigned long uc_flags; ++ struct ucontext * uc_link; ++ stack_t uc_stack; ++ struct sigcontext uc_mcontext; ++ sigset_t uc_sigmask; ++ unsigned long long uc_extcontext[0]; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd.h +new file mode 100644 +index 0000000..a9e6de7 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd.h +@@ -0,0 +1,34 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_UNISTD_H ++#define _ASM_UNISTD_H ++#include ++#if _MIPS_SIM == _MIPS_SIM_ABI32 ++#define __NR_Linux 4000 ++#include ++#endif ++#if _MIPS_SIM == _MIPS_SIM_ABI64 ++#define __NR_Linux 5000 ++#include ++#endif ++#if _MIPS_SIM == _MIPS_SIM_NABI32 ++#define __NR_Linux 6000 ++#include ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n32.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n32.h +new file mode 100644 +index 0000000..73e4167 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n32.h +@@ -0,0 +1,390 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_N32_H ++#define _ASM_MIPS_UNISTD_N32_H ++#define __NR_read (__NR_Linux + 0) ++#define __NR_write (__NR_Linux + 1) ++#define __NR_open (__NR_Linux + 2) ++#define __NR_close (__NR_Linux + 3) ++#define __NR_stat (__NR_Linux + 4) ++#define __NR_fstat (__NR_Linux + 5) ++#define __NR_lstat (__NR_Linux + 6) ++#define __NR_poll (__NR_Linux + 7) ++#define __NR_lseek (__NR_Linux + 8) ++#define __NR_mmap (__NR_Linux + 9) ++#define __NR_mprotect (__NR_Linux + 10) ++#define __NR_munmap (__NR_Linux + 11) ++#define __NR_brk (__NR_Linux + 12) ++#define __NR_rt_sigaction (__NR_Linux + 13) ++#define __NR_rt_sigprocmask (__NR_Linux + 14) ++#define __NR_ioctl (__NR_Linux + 15) ++#define __NR_pread64 (__NR_Linux + 16) ++#define __NR_pwrite64 (__NR_Linux + 17) ++#define __NR_readv (__NR_Linux + 18) ++#define __NR_writev (__NR_Linux + 19) ++#define __NR_access (__NR_Linux + 20) ++#define __NR_pipe (__NR_Linux + 21) ++#define __NR__newselect (__NR_Linux + 22) ++#define __NR_sched_yield (__NR_Linux + 23) ++#define __NR_mremap (__NR_Linux + 24) ++#define __NR_msync (__NR_Linux + 25) ++#define __NR_mincore (__NR_Linux + 26) ++#define __NR_madvise (__NR_Linux + 27) ++#define __NR_shmget (__NR_Linux + 28) ++#define __NR_shmat (__NR_Linux + 29) ++#define __NR_shmctl (__NR_Linux + 30) ++#define __NR_dup (__NR_Linux + 31) ++#define __NR_dup2 (__NR_Linux + 32) ++#define __NR_pause (__NR_Linux + 33) ++#define __NR_nanosleep (__NR_Linux + 34) ++#define __NR_getitimer (__NR_Linux + 35) ++#define __NR_setitimer (__NR_Linux + 36) ++#define __NR_alarm (__NR_Linux + 37) ++#define __NR_getpid (__NR_Linux + 38) ++#define __NR_sendfile (__NR_Linux + 39) ++#define __NR_socket (__NR_Linux + 40) ++#define __NR_connect (__NR_Linux + 41) ++#define __NR_accept (__NR_Linux + 42) ++#define __NR_sendto (__NR_Linux + 43) ++#define __NR_recvfrom (__NR_Linux + 44) ++#define __NR_sendmsg (__NR_Linux + 45) ++#define __NR_recvmsg (__NR_Linux + 46) ++#define __NR_shutdown (__NR_Linux + 47) ++#define __NR_bind (__NR_Linux + 48) ++#define __NR_listen (__NR_Linux + 49) ++#define __NR_getsockname (__NR_Linux + 50) ++#define __NR_getpeername (__NR_Linux + 51) ++#define __NR_socketpair (__NR_Linux + 52) ++#define __NR_setsockopt (__NR_Linux + 53) ++#define __NR_getsockopt (__NR_Linux + 54) ++#define __NR_clone (__NR_Linux + 55) ++#define __NR_fork (__NR_Linux + 56) ++#define __NR_execve (__NR_Linux + 57) ++#define __NR_exit (__NR_Linux + 58) ++#define __NR_wait4 (__NR_Linux + 59) ++#define __NR_kill (__NR_Linux + 60) ++#define __NR_uname (__NR_Linux + 61) ++#define __NR_semget (__NR_Linux + 62) ++#define __NR_semop (__NR_Linux + 63) ++#define __NR_semctl (__NR_Linux + 64) ++#define __NR_shmdt (__NR_Linux + 65) ++#define __NR_msgget (__NR_Linux + 66) ++#define __NR_msgsnd (__NR_Linux + 67) ++#define __NR_msgrcv (__NR_Linux + 68) ++#define __NR_msgctl (__NR_Linux + 69) ++#define __NR_fcntl (__NR_Linux + 70) ++#define __NR_flock (__NR_Linux + 71) ++#define __NR_fsync (__NR_Linux + 72) ++#define __NR_fdatasync (__NR_Linux + 73) ++#define __NR_truncate (__NR_Linux + 74) ++#define __NR_ftruncate (__NR_Linux + 75) ++#define __NR_getdents (__NR_Linux + 76) ++#define __NR_getcwd (__NR_Linux + 77) ++#define __NR_chdir (__NR_Linux + 78) ++#define __NR_fchdir (__NR_Linux + 79) ++#define __NR_rename (__NR_Linux + 80) ++#define __NR_mkdir (__NR_Linux + 81) ++#define __NR_rmdir (__NR_Linux + 82) ++#define __NR_creat (__NR_Linux + 83) ++#define __NR_link (__NR_Linux + 84) ++#define __NR_unlink (__NR_Linux + 85) ++#define __NR_symlink (__NR_Linux + 86) ++#define __NR_readlink (__NR_Linux + 87) ++#define __NR_chmod (__NR_Linux + 88) ++#define __NR_fchmod (__NR_Linux + 89) ++#define __NR_chown (__NR_Linux + 90) ++#define __NR_fchown (__NR_Linux + 91) ++#define __NR_lchown (__NR_Linux + 92) ++#define __NR_umask (__NR_Linux + 93) ++#define __NR_gettimeofday (__NR_Linux + 94) ++#define __NR_getrlimit (__NR_Linux + 95) ++#define __NR_getrusage (__NR_Linux + 96) ++#define __NR_sysinfo (__NR_Linux + 97) ++#define __NR_times (__NR_Linux + 98) ++#define __NR_ptrace (__NR_Linux + 99) ++#define __NR_getuid (__NR_Linux + 100) ++#define __NR_syslog (__NR_Linux + 101) ++#define __NR_getgid (__NR_Linux + 102) ++#define __NR_setuid (__NR_Linux + 103) ++#define __NR_setgid (__NR_Linux + 104) ++#define __NR_geteuid (__NR_Linux + 105) ++#define __NR_getegid (__NR_Linux + 106) ++#define __NR_setpgid (__NR_Linux + 107) ++#define __NR_getppid (__NR_Linux + 108) ++#define __NR_getpgrp (__NR_Linux + 109) ++#define __NR_setsid (__NR_Linux + 110) ++#define __NR_setreuid (__NR_Linux + 111) ++#define __NR_setregid (__NR_Linux + 112) ++#define __NR_getgroups (__NR_Linux + 113) ++#define __NR_setgroups (__NR_Linux + 114) ++#define __NR_setresuid (__NR_Linux + 115) ++#define __NR_getresuid (__NR_Linux + 116) ++#define __NR_setresgid (__NR_Linux + 117) ++#define __NR_getresgid (__NR_Linux + 118) ++#define __NR_getpgid (__NR_Linux + 119) ++#define __NR_setfsuid (__NR_Linux + 120) ++#define __NR_setfsgid (__NR_Linux + 121) ++#define __NR_getsid (__NR_Linux + 122) ++#define __NR_capget (__NR_Linux + 123) ++#define __NR_capset (__NR_Linux + 124) ++#define __NR_rt_sigpending (__NR_Linux + 125) ++#define __NR_rt_sigtimedwait (__NR_Linux + 126) ++#define __NR_rt_sigqueueinfo (__NR_Linux + 127) ++#define __NR_rt_sigsuspend (__NR_Linux + 128) ++#define __NR_sigaltstack (__NR_Linux + 129) ++#define __NR_utime (__NR_Linux + 130) ++#define __NR_mknod (__NR_Linux + 131) ++#define __NR_personality (__NR_Linux + 132) ++#define __NR_ustat (__NR_Linux + 133) ++#define __NR_statfs (__NR_Linux + 134) ++#define __NR_fstatfs (__NR_Linux + 135) ++#define __NR_sysfs (__NR_Linux + 136) ++#define __NR_getpriority (__NR_Linux + 137) ++#define __NR_setpriority (__NR_Linux + 138) ++#define __NR_sched_setparam (__NR_Linux + 139) ++#define __NR_sched_getparam (__NR_Linux + 140) ++#define __NR_sched_setscheduler (__NR_Linux + 141) ++#define __NR_sched_getscheduler (__NR_Linux + 142) ++#define __NR_sched_get_priority_max (__NR_Linux + 143) ++#define __NR_sched_get_priority_min (__NR_Linux + 144) ++#define __NR_sched_rr_get_interval (__NR_Linux + 145) ++#define __NR_mlock (__NR_Linux + 146) ++#define __NR_munlock (__NR_Linux + 147) ++#define __NR_mlockall (__NR_Linux + 148) ++#define __NR_munlockall (__NR_Linux + 149) ++#define __NR_vhangup (__NR_Linux + 150) ++#define __NR_pivot_root (__NR_Linux + 151) ++#define __NR__sysctl (__NR_Linux + 152) ++#define __NR_prctl (__NR_Linux + 153) ++#define __NR_adjtimex (__NR_Linux + 154) ++#define __NR_setrlimit (__NR_Linux + 155) ++#define __NR_chroot (__NR_Linux + 156) ++#define __NR_sync (__NR_Linux + 157) ++#define __NR_acct (__NR_Linux + 158) ++#define __NR_settimeofday (__NR_Linux + 159) ++#define __NR_mount (__NR_Linux + 160) ++#define __NR_umount2 (__NR_Linux + 161) ++#define __NR_swapon (__NR_Linux + 162) ++#define __NR_swapoff (__NR_Linux + 163) ++#define __NR_reboot (__NR_Linux + 164) ++#define __NR_sethostname (__NR_Linux + 165) ++#define __NR_setdomainname (__NR_Linux + 166) ++#define __NR_create_module (__NR_Linux + 167) ++#define __NR_init_module (__NR_Linux + 168) ++#define __NR_delete_module (__NR_Linux + 169) ++#define __NR_get_kernel_syms (__NR_Linux + 170) ++#define __NR_query_module (__NR_Linux + 171) ++#define __NR_quotactl (__NR_Linux + 172) ++#define __NR_nfsservctl (__NR_Linux + 173) ++#define __NR_getpmsg (__NR_Linux + 174) ++#define __NR_putpmsg (__NR_Linux + 175) ++#define __NR_afs_syscall (__NR_Linux + 176) ++#define __NR_reserved177 (__NR_Linux + 177) ++#define __NR_gettid (__NR_Linux + 178) ++#define __NR_readahead (__NR_Linux + 179) ++#define __NR_setxattr (__NR_Linux + 180) ++#define __NR_lsetxattr (__NR_Linux + 181) ++#define __NR_fsetxattr (__NR_Linux + 182) ++#define __NR_getxattr (__NR_Linux + 183) ++#define __NR_lgetxattr (__NR_Linux + 184) ++#define __NR_fgetxattr (__NR_Linux + 185) ++#define __NR_listxattr (__NR_Linux + 186) ++#define __NR_llistxattr (__NR_Linux + 187) ++#define __NR_flistxattr (__NR_Linux + 188) ++#define __NR_removexattr (__NR_Linux + 189) ++#define __NR_lremovexattr (__NR_Linux + 190) ++#define __NR_fremovexattr (__NR_Linux + 191) ++#define __NR_tkill (__NR_Linux + 192) ++#define __NR_reserved193 (__NR_Linux + 193) ++#define __NR_futex (__NR_Linux + 194) ++#define __NR_sched_setaffinity (__NR_Linux + 195) ++#define __NR_sched_getaffinity (__NR_Linux + 196) ++#define __NR_cacheflush (__NR_Linux + 197) ++#define __NR_cachectl (__NR_Linux + 198) ++#define __NR_sysmips (__NR_Linux + 199) ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#define __NR_exit_group (__NR_Linux + 205) ++#define __NR_lookup_dcookie (__NR_Linux + 206) ++#define __NR_epoll_create (__NR_Linux + 207) ++#define __NR_epoll_ctl (__NR_Linux + 208) ++#define __NR_epoll_wait (__NR_Linux + 209) ++#define __NR_remap_file_pages (__NR_Linux + 210) ++#define __NR_rt_sigreturn (__NR_Linux + 211) ++#define __NR_fcntl64 (__NR_Linux + 212) ++#define __NR_set_tid_address (__NR_Linux + 213) ++#define __NR_restart_syscall (__NR_Linux + 214) ++#define __NR_semtimedop (__NR_Linux + 215) ++#define __NR_fadvise64 (__NR_Linux + 216) ++#define __NR_statfs64 (__NR_Linux + 217) ++#define __NR_fstatfs64 (__NR_Linux + 218) ++#define __NR_sendfile64 (__NR_Linux + 219) ++#define __NR_timer_create (__NR_Linux + 220) ++#define __NR_timer_settime (__NR_Linux + 221) ++#define __NR_timer_gettime (__NR_Linux + 222) ++#define __NR_timer_getoverrun (__NR_Linux + 223) ++#define __NR_timer_delete (__NR_Linux + 224) ++#define __NR_clock_settime (__NR_Linux + 225) ++#define __NR_clock_gettime (__NR_Linux + 226) ++#define __NR_clock_getres (__NR_Linux + 227) ++#define __NR_clock_nanosleep (__NR_Linux + 228) ++#define __NR_tgkill (__NR_Linux + 229) ++#define __NR_utimes (__NR_Linux + 230) ++#define __NR_mbind (__NR_Linux + 231) ++#define __NR_get_mempolicy (__NR_Linux + 232) ++#define __NR_set_mempolicy (__NR_Linux + 233) ++#define __NR_mq_open (__NR_Linux + 234) ++#define __NR_mq_unlink (__NR_Linux + 235) ++#define __NR_mq_timedsend (__NR_Linux + 236) ++#define __NR_mq_timedreceive (__NR_Linux + 237) ++#define __NR_mq_notify (__NR_Linux + 238) ++#define __NR_mq_getsetattr (__NR_Linux + 239) ++#define __NR_vserver (__NR_Linux + 240) ++#define __NR_waitid (__NR_Linux + 241) ++#define __NR_add_key (__NR_Linux + 243) ++#define __NR_request_key (__NR_Linux + 244) ++#define __NR_keyctl (__NR_Linux + 245) ++#define __NR_set_thread_area (__NR_Linux + 246) ++#define __NR_inotify_init (__NR_Linux + 247) ++#define __NR_inotify_add_watch (__NR_Linux + 248) ++#define __NR_inotify_rm_watch (__NR_Linux + 249) ++#define __NR_migrate_pages (__NR_Linux + 250) ++#define __NR_openat (__NR_Linux + 251) ++#define __NR_mkdirat (__NR_Linux + 252) ++#define __NR_mknodat (__NR_Linux + 253) ++#define __NR_fchownat (__NR_Linux + 254) ++#define __NR_futimesat (__NR_Linux + 255) ++#define __NR_newfstatat (__NR_Linux + 256) ++#define __NR_unlinkat (__NR_Linux + 257) ++#define __NR_renameat (__NR_Linux + 258) ++#define __NR_linkat (__NR_Linux + 259) ++#define __NR_symlinkat (__NR_Linux + 260) ++#define __NR_readlinkat (__NR_Linux + 261) ++#define __NR_fchmodat (__NR_Linux + 262) ++#define __NR_faccessat (__NR_Linux + 263) ++#define __NR_pselect6 (__NR_Linux + 264) ++#define __NR_ppoll (__NR_Linux + 265) ++#define __NR_unshare (__NR_Linux + 266) ++#define __NR_splice (__NR_Linux + 267) ++#define __NR_sync_file_range (__NR_Linux + 268) ++#define __NR_tee (__NR_Linux + 269) ++#define __NR_vmsplice (__NR_Linux + 270) ++#define __NR_move_pages (__NR_Linux + 271) ++#define __NR_set_robust_list (__NR_Linux + 272) ++#define __NR_get_robust_list (__NR_Linux + 273) ++#define __NR_kexec_load (__NR_Linux + 274) ++#define __NR_getcpu (__NR_Linux + 275) ++#define __NR_epoll_pwait (__NR_Linux + 276) ++#define __NR_ioprio_set (__NR_Linux + 277) ++#define __NR_ioprio_get (__NR_Linux + 278) ++#define __NR_utimensat (__NR_Linux + 279) ++#define __NR_signalfd (__NR_Linux + 280) ++#define __NR_timerfd (__NR_Linux + 281) ++#define __NR_eventfd (__NR_Linux + 282) ++#define __NR_fallocate (__NR_Linux + 283) ++#define __NR_timerfd_create (__NR_Linux + 284) ++#define __NR_timerfd_gettime (__NR_Linux + 285) ++#define __NR_timerfd_settime (__NR_Linux + 286) ++#define __NR_signalfd4 (__NR_Linux + 287) ++#define __NR_eventfd2 (__NR_Linux + 288) ++#define __NR_epoll_create1 (__NR_Linux + 289) ++#define __NR_dup3 (__NR_Linux + 290) ++#define __NR_pipe2 (__NR_Linux + 291) ++#define __NR_inotify_init1 (__NR_Linux + 292) ++#define __NR_preadv (__NR_Linux + 293) ++#define __NR_pwritev (__NR_Linux + 294) ++#define __NR_rt_tgsigqueueinfo (__NR_Linux + 295) ++#define __NR_perf_event_open (__NR_Linux + 296) ++#define __NR_accept4 (__NR_Linux + 297) ++#define __NR_recvmmsg (__NR_Linux + 298) ++#define __NR_getdents64 (__NR_Linux + 299) ++#define __NR_fanotify_init (__NR_Linux + 300) ++#define __NR_fanotify_mark (__NR_Linux + 301) ++#define __NR_prlimit64 (__NR_Linux + 302) ++#define __NR_name_to_handle_at (__NR_Linux + 303) ++#define __NR_open_by_handle_at (__NR_Linux + 304) ++#define __NR_clock_adjtime (__NR_Linux + 305) ++#define __NR_syncfs (__NR_Linux + 306) ++#define __NR_sendmmsg (__NR_Linux + 307) ++#define __NR_setns (__NR_Linux + 308) ++#define __NR_process_vm_readv (__NR_Linux + 309) ++#define __NR_process_vm_writev (__NR_Linux + 310) ++#define __NR_kcmp (__NR_Linux + 311) ++#define __NR_finit_module (__NR_Linux + 312) ++#define __NR_sched_setattr (__NR_Linux + 313) ++#define __NR_sched_getattr (__NR_Linux + 314) ++#define __NR_renameat2 (__NR_Linux + 315) ++#define __NR_seccomp (__NR_Linux + 316) ++#define __NR_getrandom (__NR_Linux + 317) ++#define __NR_memfd_create (__NR_Linux + 318) ++#define __NR_bpf (__NR_Linux + 319) ++#define __NR_execveat (__NR_Linux + 320) ++#define __NR_userfaultfd (__NR_Linux + 321) ++#define __NR_membarrier (__NR_Linux + 322) ++#define __NR_mlock2 (__NR_Linux + 323) ++#define __NR_copy_file_range (__NR_Linux + 324) ++#define __NR_preadv2 (__NR_Linux + 325) ++#define __NR_pwritev2 (__NR_Linux + 326) ++#define __NR_pkey_mprotect (__NR_Linux + 327) ++#define __NR_pkey_alloc (__NR_Linux + 328) ++#define __NR_pkey_free (__NR_Linux + 329) ++#define __NR_statx (__NR_Linux + 330) ++#define __NR_rseq (__NR_Linux + 331) ++#define __NR_io_pgetevents (__NR_Linux + 332) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n64.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n64.h +new file mode 100644 +index 0000000..e5dfd95 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_n64.h +@@ -0,0 +1,366 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_N64_H ++#define _ASM_MIPS_UNISTD_N64_H ++#define __NR_read (__NR_Linux + 0) ++#define __NR_write (__NR_Linux + 1) ++#define __NR_open (__NR_Linux + 2) ++#define __NR_close (__NR_Linux + 3) ++#define __NR_stat (__NR_Linux + 4) ++#define __NR_fstat (__NR_Linux + 5) ++#define __NR_lstat (__NR_Linux + 6) ++#define __NR_poll (__NR_Linux + 7) ++#define __NR_lseek (__NR_Linux + 8) ++#define __NR_mmap (__NR_Linux + 9) ++#define __NR_mprotect (__NR_Linux + 10) ++#define __NR_munmap (__NR_Linux + 11) ++#define __NR_brk (__NR_Linux + 12) ++#define __NR_rt_sigaction (__NR_Linux + 13) ++#define __NR_rt_sigprocmask (__NR_Linux + 14) ++#define __NR_ioctl (__NR_Linux + 15) ++#define __NR_pread64 (__NR_Linux + 16) ++#define __NR_pwrite64 (__NR_Linux + 17) ++#define __NR_readv (__NR_Linux + 18) ++#define __NR_writev (__NR_Linux + 19) ++#define __NR_access (__NR_Linux + 20) ++#define __NR_pipe (__NR_Linux + 21) ++#define __NR__newselect (__NR_Linux + 22) ++#define __NR_sched_yield (__NR_Linux + 23) ++#define __NR_mremap (__NR_Linux + 24) ++#define __NR_msync (__NR_Linux + 25) ++#define __NR_mincore (__NR_Linux + 26) ++#define __NR_madvise (__NR_Linux + 27) ++#define __NR_shmget (__NR_Linux + 28) ++#define __NR_shmat (__NR_Linux + 29) ++#define __NR_shmctl (__NR_Linux + 30) ++#define __NR_dup (__NR_Linux + 31) ++#define __NR_dup2 (__NR_Linux + 32) ++#define __NR_pause (__NR_Linux + 33) ++#define __NR_nanosleep (__NR_Linux + 34) ++#define __NR_getitimer (__NR_Linux + 35) ++#define __NR_setitimer (__NR_Linux + 36) ++#define __NR_alarm (__NR_Linux + 37) ++#define __NR_getpid (__NR_Linux + 38) ++#define __NR_sendfile (__NR_Linux + 39) ++#define __NR_socket (__NR_Linux + 40) ++#define __NR_connect (__NR_Linux + 41) ++#define __NR_accept (__NR_Linux + 42) ++#define __NR_sendto (__NR_Linux + 43) ++#define __NR_recvfrom (__NR_Linux + 44) ++#define __NR_sendmsg (__NR_Linux + 45) ++#define __NR_recvmsg (__NR_Linux + 46) ++#define __NR_shutdown (__NR_Linux + 47) ++#define __NR_bind (__NR_Linux + 48) ++#define __NR_listen (__NR_Linux + 49) ++#define __NR_getsockname (__NR_Linux + 50) ++#define __NR_getpeername (__NR_Linux + 51) ++#define __NR_socketpair (__NR_Linux + 52) ++#define __NR_setsockopt (__NR_Linux + 53) ++#define __NR_getsockopt (__NR_Linux + 54) ++#define __NR_clone (__NR_Linux + 55) ++#define __NR_fork (__NR_Linux + 56) ++#define __NR_execve (__NR_Linux + 57) ++#define __NR_exit (__NR_Linux + 58) ++#define __NR_wait4 (__NR_Linux + 59) ++#define __NR_kill (__NR_Linux + 60) ++#define __NR_uname (__NR_Linux + 61) ++#define __NR_semget (__NR_Linux + 62) ++#define __NR_semop (__NR_Linux + 63) ++#define __NR_semctl (__NR_Linux + 64) ++#define __NR_shmdt (__NR_Linux + 65) ++#define __NR_msgget (__NR_Linux + 66) ++#define __NR_msgsnd (__NR_Linux + 67) ++#define __NR_msgrcv (__NR_Linux + 68) ++#define __NR_msgctl (__NR_Linux + 69) ++#define __NR_fcntl (__NR_Linux + 70) ++#define __NR_flock (__NR_Linux + 71) ++#define __NR_fsync (__NR_Linux + 72) ++#define __NR_fdatasync (__NR_Linux + 73) ++#define __NR_truncate (__NR_Linux + 74) ++#define __NR_ftruncate (__NR_Linux + 75) ++#define __NR_getdents (__NR_Linux + 76) ++#define __NR_getcwd (__NR_Linux + 77) ++#define __NR_chdir (__NR_Linux + 78) ++#define __NR_fchdir (__NR_Linux + 79) ++#define __NR_rename (__NR_Linux + 80) ++#define __NR_mkdir (__NR_Linux + 81) ++#define __NR_rmdir (__NR_Linux + 82) ++#define __NR_creat (__NR_Linux + 83) ++#define __NR_link (__NR_Linux + 84) ++#define __NR_unlink (__NR_Linux + 85) ++#define __NR_symlink (__NR_Linux + 86) ++#define __NR_readlink (__NR_Linux + 87) ++#define __NR_chmod (__NR_Linux + 88) ++#define __NR_fchmod (__NR_Linux + 89) ++#define __NR_chown (__NR_Linux + 90) ++#define __NR_fchown (__NR_Linux + 91) ++#define __NR_lchown (__NR_Linux + 92) ++#define __NR_umask (__NR_Linux + 93) ++#define __NR_gettimeofday (__NR_Linux + 94) ++#define __NR_getrlimit (__NR_Linux + 95) ++#define __NR_getrusage (__NR_Linux + 96) ++#define __NR_sysinfo (__NR_Linux + 97) ++#define __NR_times (__NR_Linux + 98) ++#define __NR_ptrace (__NR_Linux + 99) ++#define __NR_getuid (__NR_Linux + 100) ++#define __NR_syslog (__NR_Linux + 101) ++#define __NR_getgid (__NR_Linux + 102) ++#define __NR_setuid (__NR_Linux + 103) ++#define __NR_setgid (__NR_Linux + 104) ++#define __NR_geteuid (__NR_Linux + 105) ++#define __NR_getegid (__NR_Linux + 106) ++#define __NR_setpgid (__NR_Linux + 107) ++#define __NR_getppid (__NR_Linux + 108) ++#define __NR_getpgrp (__NR_Linux + 109) ++#define __NR_setsid (__NR_Linux + 110) ++#define __NR_setreuid (__NR_Linux + 111) ++#define __NR_setregid (__NR_Linux + 112) ++#define __NR_getgroups (__NR_Linux + 113) ++#define __NR_setgroups (__NR_Linux + 114) ++#define __NR_setresuid (__NR_Linux + 115) ++#define __NR_getresuid (__NR_Linux + 116) ++#define __NR_setresgid (__NR_Linux + 117) ++#define __NR_getresgid (__NR_Linux + 118) ++#define __NR_getpgid (__NR_Linux + 119) ++#define __NR_setfsuid (__NR_Linux + 120) ++#define __NR_setfsgid (__NR_Linux + 121) ++#define __NR_getsid (__NR_Linux + 122) ++#define __NR_capget (__NR_Linux + 123) ++#define __NR_capset (__NR_Linux + 124) ++#define __NR_rt_sigpending (__NR_Linux + 125) ++#define __NR_rt_sigtimedwait (__NR_Linux + 126) ++#define __NR_rt_sigqueueinfo (__NR_Linux + 127) ++#define __NR_rt_sigsuspend (__NR_Linux + 128) ++#define __NR_sigaltstack (__NR_Linux + 129) ++#define __NR_utime (__NR_Linux + 130) ++#define __NR_mknod (__NR_Linux + 131) ++#define __NR_personality (__NR_Linux + 132) ++#define __NR_ustat (__NR_Linux + 133) ++#define __NR_statfs (__NR_Linux + 134) ++#define __NR_fstatfs (__NR_Linux + 135) ++#define __NR_sysfs (__NR_Linux + 136) ++#define __NR_getpriority (__NR_Linux + 137) ++#define __NR_setpriority (__NR_Linux + 138) ++#define __NR_sched_setparam (__NR_Linux + 139) ++#define __NR_sched_getparam (__NR_Linux + 140) ++#define __NR_sched_setscheduler (__NR_Linux + 141) ++#define __NR_sched_getscheduler (__NR_Linux + 142) ++#define __NR_sched_get_priority_max (__NR_Linux + 143) ++#define __NR_sched_get_priority_min (__NR_Linux + 144) ++#define __NR_sched_rr_get_interval (__NR_Linux + 145) ++#define __NR_mlock (__NR_Linux + 146) ++#define __NR_munlock (__NR_Linux + 147) ++#define __NR_mlockall (__NR_Linux + 148) ++#define __NR_munlockall (__NR_Linux + 149) ++#define __NR_vhangup (__NR_Linux + 150) ++#define __NR_pivot_root (__NR_Linux + 151) ++#define __NR__sysctl (__NR_Linux + 152) ++#define __NR_prctl (__NR_Linux + 153) ++#define __NR_adjtimex (__NR_Linux + 154) ++#define __NR_setrlimit (__NR_Linux + 155) ++#define __NR_chroot (__NR_Linux + 156) ++#define __NR_sync (__NR_Linux + 157) ++#define __NR_acct (__NR_Linux + 158) ++#define __NR_settimeofday (__NR_Linux + 159) ++#define __NR_mount (__NR_Linux + 160) ++#define __NR_umount2 (__NR_Linux + 161) ++#define __NR_swapon (__NR_Linux + 162) ++#define __NR_swapoff (__NR_Linux + 163) ++#define __NR_reboot (__NR_Linux + 164) ++#define __NR_sethostname (__NR_Linux + 165) ++#define __NR_setdomainname (__NR_Linux + 166) ++#define __NR_create_module (__NR_Linux + 167) ++#define __NR_init_module (__NR_Linux + 168) ++#define __NR_delete_module (__NR_Linux + 169) ++#define __NR_get_kernel_syms (__NR_Linux + 170) ++#define __NR_query_module (__NR_Linux + 171) ++#define __NR_quotactl (__NR_Linux + 172) ++#define __NR_nfsservctl (__NR_Linux + 173) ++#define __NR_getpmsg (__NR_Linux + 174) ++#define __NR_putpmsg (__NR_Linux + 175) ++#define __NR_afs_syscall (__NR_Linux + 176) ++#define __NR_reserved177 (__NR_Linux + 177) ++#define __NR_gettid (__NR_Linux + 178) ++#define __NR_readahead (__NR_Linux + 179) ++#define __NR_setxattr (__NR_Linux + 180) ++#define __NR_lsetxattr (__NR_Linux + 181) ++#define __NR_fsetxattr (__NR_Linux + 182) ++#define __NR_getxattr (__NR_Linux + 183) ++#define __NR_lgetxattr (__NR_Linux + 184) ++#define __NR_fgetxattr (__NR_Linux + 185) ++#define __NR_listxattr (__NR_Linux + 186) ++#define __NR_llistxattr (__NR_Linux + 187) ++#define __NR_flistxattr (__NR_Linux + 188) ++#define __NR_removexattr (__NR_Linux + 189) ++#define __NR_lremovexattr (__NR_Linux + 190) ++#define __NR_fremovexattr (__NR_Linux + 191) ++#define __NR_tkill (__NR_Linux + 192) ++#define __NR_reserved193 (__NR_Linux + 193) ++#define __NR_futex (__NR_Linux + 194) ++#define __NR_sched_setaffinity (__NR_Linux + 195) ++#define __NR_sched_getaffinity (__NR_Linux + 196) ++#define __NR_cacheflush (__NR_Linux + 197) ++#define __NR_cachectl (__NR_Linux + 198) ++#define __NR_sysmips (__NR_Linux + 199) ++#define __NR_io_setup (__NR_Linux + 200) ++#define __NR_io_destroy (__NR_Linux + 201) ++#define __NR_io_getevents (__NR_Linux + 202) ++#define __NR_io_submit (__NR_Linux + 203) ++#define __NR_io_cancel (__NR_Linux + 204) ++#define __NR_exit_group (__NR_Linux + 205) ++#define __NR_lookup_dcookie (__NR_Linux + 206) ++#define __NR_epoll_create (__NR_Linux + 207) ++#define __NR_epoll_ctl (__NR_Linux + 208) ++#define __NR_epoll_wait (__NR_Linux + 209) ++#define __NR_remap_file_pages (__NR_Linux + 210) ++#define __NR_rt_sigreturn (__NR_Linux + 211) ++#define __NR_set_tid_address (__NR_Linux + 212) ++#define __NR_restart_syscall (__NR_Linux + 213) ++#define __NR_semtimedop (__NR_Linux + 214) ++#define __NR_fadvise64 (__NR_Linux + 215) ++#define __NR_timer_create (__NR_Linux + 216) ++#define __NR_timer_settime (__NR_Linux + 217) ++#define __NR_timer_gettime (__NR_Linux + 218) ++#define __NR_timer_getoverrun (__NR_Linux + 219) ++#define __NR_timer_delete (__NR_Linux + 220) ++#define __NR_clock_settime (__NR_Linux + 221) ++#define __NR_clock_gettime (__NR_Linux + 222) ++#define __NR_clock_getres (__NR_Linux + 223) ++#define __NR_clock_nanosleep (__NR_Linux + 224) ++#define __NR_tgkill (__NR_Linux + 225) ++#define __NR_utimes (__NR_Linux + 226) ++#define __NR_mbind (__NR_Linux + 227) ++#define __NR_get_mempolicy (__NR_Linux + 228) ++#define __NR_set_mempolicy (__NR_Linux + 229) ++#define __NR_mq_open (__NR_Linux + 230) ++#define __NR_mq_unlink (__NR_Linux + 231) ++#define __NR_mq_timedsend (__NR_Linux + 232) ++#define __NR_mq_timedreceive (__NR_Linux + 233) ++#define __NR_mq_notify (__NR_Linux + 234) ++#define __NR_mq_getsetattr (__NR_Linux + 235) ++#define __NR_vserver (__NR_Linux + 236) ++#define __NR_waitid (__NR_Linux + 237) ++#define __NR_add_key (__NR_Linux + 239) ++#define __NR_request_key (__NR_Linux + 240) ++#define __NR_keyctl (__NR_Linux + 241) ++#define __NR_set_thread_area (__NR_Linux + 242) ++#define __NR_inotify_init (__NR_Linux + 243) ++#define __NR_inotify_add_watch (__NR_Linux + 244) ++#define __NR_inotify_rm_watch (__NR_Linux + 245) ++#define __NR_migrate_pages (__NR_Linux + 246) ++#define __NR_openat (__NR_Linux + 247) ++#define __NR_mkdirat (__NR_Linux + 248) ++#define __NR_mknodat (__NR_Linux + 249) ++#define __NR_fchownat (__NR_Linux + 250) ++#define __NR_futimesat (__NR_Linux + 251) ++#define __NR_newfstatat (__NR_Linux + 252) ++#define __NR_unlinkat (__NR_Linux + 253) ++#define __NR_renameat (__NR_Linux + 254) ++#define __NR_linkat (__NR_Linux + 255) ++#define __NR_symlinkat (__NR_Linux + 256) ++#define __NR_readlinkat (__NR_Linux + 257) ++#define __NR_fchmodat (__NR_Linux + 258) ++#define __NR_faccessat (__NR_Linux + 259) ++#define __NR_pselect6 (__NR_Linux + 260) ++#define __NR_ppoll (__NR_Linux + 261) ++#define __NR_unshare (__NR_Linux + 262) ++#define __NR_splice (__NR_Linux + 263) ++#define __NR_sync_file_range (__NR_Linux + 264) ++#define __NR_tee (__NR_Linux + 265) ++#define __NR_vmsplice (__NR_Linux + 266) ++#define __NR_move_pages (__NR_Linux + 267) ++#define __NR_set_robust_list (__NR_Linux + 268) ++#define __NR_get_robust_list (__NR_Linux + 269) ++#define __NR_kexec_load (__NR_Linux + 270) ++#define __NR_getcpu (__NR_Linux + 271) ++#define __NR_epoll_pwait (__NR_Linux + 272) ++#define __NR_ioprio_set (__NR_Linux + 273) ++#define __NR_ioprio_get (__NR_Linux + 274) ++#define __NR_utimensat (__NR_Linux + 275) ++#define __NR_signalfd (__NR_Linux + 276) ++#define __NR_timerfd (__NR_Linux + 277) ++#define __NR_eventfd (__NR_Linux + 278) ++#define __NR_fallocate (__NR_Linux + 279) ++#define __NR_timerfd_create (__NR_Linux + 280) ++#define __NR_timerfd_gettime (__NR_Linux + 281) ++#define __NR_timerfd_settime (__NR_Linux + 282) ++#define __NR_signalfd4 (__NR_Linux + 283) ++#define __NR_eventfd2 (__NR_Linux + 284) ++#define __NR_epoll_create1 (__NR_Linux + 285) ++#define __NR_dup3 (__NR_Linux + 286) ++#define __NR_pipe2 (__NR_Linux + 287) ++#define __NR_inotify_init1 (__NR_Linux + 288) ++#define __NR_preadv (__NR_Linux + 289) ++#define __NR_pwritev (__NR_Linux + 290) ++#define __NR_rt_tgsigqueueinfo (__NR_Linux + 291) ++#define __NR_perf_event_open (__NR_Linux + 292) ++#define __NR_accept4 (__NR_Linux + 293) ++#define __NR_recvmmsg (__NR_Linux + 294) ++#define __NR_fanotify_init (__NR_Linux + 295) ++#define __NR_fanotify_mark (__NR_Linux + 296) ++#define __NR_prlimit64 (__NR_Linux + 297) ++#define __NR_name_to_handle_at (__NR_Linux + 298) ++#define __NR_open_by_handle_at (__NR_Linux + 299) ++#define __NR_clock_adjtime (__NR_Linux + 300) ++#define __NR_syncfs (__NR_Linux + 301) ++#define __NR_sendmmsg (__NR_Linux + 302) ++#define __NR_setns (__NR_Linux + 303) ++#define __NR_process_vm_readv (__NR_Linux + 304) ++#define __NR_process_vm_writev (__NR_Linux + 305) ++#define __NR_kcmp (__NR_Linux + 306) ++#define __NR_finit_module (__NR_Linux + 307) ++#define __NR_getdents64 (__NR_Linux + 308) ++#define __NR_sched_setattr (__NR_Linux + 309) ++#define __NR_sched_getattr (__NR_Linux + 310) ++#define __NR_renameat2 (__NR_Linux + 311) ++#define __NR_seccomp (__NR_Linux + 312) ++#define __NR_getrandom (__NR_Linux + 313) ++#define __NR_memfd_create (__NR_Linux + 314) ++#define __NR_bpf (__NR_Linux + 315) ++#define __NR_execveat (__NR_Linux + 316) ++#define __NR_userfaultfd (__NR_Linux + 317) ++#define __NR_membarrier (__NR_Linux + 318) ++#define __NR_mlock2 (__NR_Linux + 319) ++#define __NR_copy_file_range (__NR_Linux + 320) ++#define __NR_preadv2 (__NR_Linux + 321) ++#define __NR_pwritev2 (__NR_Linux + 322) ++#define __NR_pkey_mprotect (__NR_Linux + 323) ++#define __NR_pkey_alloc (__NR_Linux + 324) ++#define __NR_pkey_free (__NR_Linux + 325) ++#define __NR_statx (__NR_Linux + 326) ++#define __NR_rseq (__NR_Linux + 327) ++#define __NR_io_pgetevents (__NR_Linux + 328) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n32.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n32.h +new file mode 100644 +index 0000000..6e34eda +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n32.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_NR_N32_H ++#define _ASM_MIPS_UNISTD_NR_N32_H ++#define __NR_N32_Linux 6000 ++#define __NR_N32_Linux_syscalls 441 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n64.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n64.h +new file mode 100644 +index 0000000..85459a9 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_n64.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_NR_N64_H ++#define _ASM_MIPS_UNISTD_NR_N64_H ++#define __NR_64_Linux 5000 ++#define __NR_64_Linux_syscalls 441 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_o32.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_o32.h +new file mode 100644 +index 0000000..fad7ce2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_nr_o32.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_NR_O32_H ++#define _ASM_MIPS_UNISTD_NR_O32_H ++#define __NR_O32_Linux 4000 ++#define __NR_O32_Linux_syscalls 441 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_o32.h b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_o32.h +new file mode 100644 +index 0000000..bcaebe6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-mips/asm/unistd_o32.h +@@ -0,0 +1,436 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_MIPS_UNISTD_O32_H ++#define _ASM_MIPS_UNISTD_O32_H ++#define __NR_syscall (__NR_Linux + 0) ++#define __NR_exit (__NR_Linux + 1) ++#define __NR_fork (__NR_Linux + 2) ++#define __NR_read (__NR_Linux + 3) ++#define __NR_write (__NR_Linux + 4) ++#define __NR_open (__NR_Linux + 5) ++#define __NR_close (__NR_Linux + 6) ++#define __NR_waitpid (__NR_Linux + 7) ++#define __NR_creat (__NR_Linux + 8) ++#define __NR_link (__NR_Linux + 9) ++#define __NR_unlink (__NR_Linux + 10) ++#define __NR_execve (__NR_Linux + 11) ++#define __NR_chdir (__NR_Linux + 12) ++#define __NR_time (__NR_Linux + 13) ++#define __NR_mknod (__NR_Linux + 14) ++#define __NR_chmod (__NR_Linux + 15) ++#define __NR_lchown (__NR_Linux + 16) ++#define __NR_break (__NR_Linux + 17) ++#define __NR_unused18 (__NR_Linux + 18) ++#define __NR_lseek (__NR_Linux + 19) ++#define __NR_getpid (__NR_Linux + 20) ++#define __NR_mount (__NR_Linux + 21) ++#define __NR_umount (__NR_Linux + 22) ++#define __NR_setuid (__NR_Linux + 23) ++#define __NR_getuid (__NR_Linux + 24) ++#define __NR_stime (__NR_Linux + 25) ++#define __NR_ptrace (__NR_Linux + 26) ++#define __NR_alarm (__NR_Linux + 27) ++#define __NR_unused28 (__NR_Linux + 28) ++#define __NR_pause (__NR_Linux + 29) ++#define __NR_utime (__NR_Linux + 30) ++#define __NR_stty (__NR_Linux + 31) ++#define __NR_gtty (__NR_Linux + 32) ++#define __NR_access (__NR_Linux + 33) ++#define __NR_nice (__NR_Linux + 34) ++#define __NR_ftime (__NR_Linux + 35) ++#define __NR_sync (__NR_Linux + 36) ++#define __NR_kill (__NR_Linux + 37) ++#define __NR_rename (__NR_Linux + 38) ++#define __NR_mkdir (__NR_Linux + 39) ++#define __NR_rmdir (__NR_Linux + 40) ++#define __NR_dup (__NR_Linux + 41) ++#define __NR_pipe (__NR_Linux + 42) ++#define __NR_times (__NR_Linux + 43) ++#define __NR_prof (__NR_Linux + 44) ++#define __NR_brk (__NR_Linux + 45) ++#define __NR_setgid (__NR_Linux + 46) ++#define __NR_getgid (__NR_Linux + 47) ++#define __NR_signal (__NR_Linux + 48) ++#define __NR_geteuid (__NR_Linux + 49) ++#define __NR_getegid (__NR_Linux + 50) ++#define __NR_acct (__NR_Linux + 51) ++#define __NR_umount2 (__NR_Linux + 52) ++#define __NR_lock (__NR_Linux + 53) ++#define __NR_ioctl (__NR_Linux + 54) ++#define __NR_fcntl (__NR_Linux + 55) ++#define __NR_mpx (__NR_Linux + 56) ++#define __NR_setpgid (__NR_Linux + 57) ++#define __NR_ulimit (__NR_Linux + 58) ++#define __NR_unused59 (__NR_Linux + 59) ++#define __NR_umask (__NR_Linux + 60) ++#define __NR_chroot (__NR_Linux + 61) ++#define __NR_ustat (__NR_Linux + 62) ++#define __NR_dup2 (__NR_Linux + 63) ++#define __NR_getppid (__NR_Linux + 64) ++#define __NR_getpgrp (__NR_Linux + 65) ++#define __NR_setsid (__NR_Linux + 66) ++#define __NR_sigaction (__NR_Linux + 67) ++#define __NR_sgetmask (__NR_Linux + 68) ++#define __NR_ssetmask (__NR_Linux + 69) ++#define __NR_setreuid (__NR_Linux + 70) ++#define __NR_setregid (__NR_Linux + 71) ++#define __NR_sigsuspend (__NR_Linux + 72) ++#define __NR_sigpending (__NR_Linux + 73) ++#define __NR_sethostname (__NR_Linux + 74) ++#define __NR_setrlimit (__NR_Linux + 75) ++#define __NR_getrlimit (__NR_Linux + 76) ++#define __NR_getrusage (__NR_Linux + 77) ++#define __NR_gettimeofday (__NR_Linux + 78) ++#define __NR_settimeofday (__NR_Linux + 79) ++#define __NR_getgroups (__NR_Linux + 80) ++#define __NR_setgroups (__NR_Linux + 81) ++#define __NR_reserved82 (__NR_Linux + 82) ++#define __NR_symlink (__NR_Linux + 83) ++#define __NR_unused84 (__NR_Linux + 84) ++#define __NR_readlink (__NR_Linux + 85) ++#define __NR_uselib (__NR_Linux + 86) ++#define __NR_swapon (__NR_Linux + 87) ++#define __NR_reboot (__NR_Linux + 88) ++#define __NR_readdir (__NR_Linux + 89) ++#define __NR_mmap (__NR_Linux + 90) ++#define __NR_munmap (__NR_Linux + 91) ++#define __NR_truncate (__NR_Linux + 92) ++#define __NR_ftruncate (__NR_Linux + 93) ++#define __NR_fchmod (__NR_Linux + 94) ++#define __NR_fchown (__NR_Linux + 95) ++#define __NR_getpriority (__NR_Linux + 96) ++#define __NR_setpriority (__NR_Linux + 97) ++#define __NR_profil (__NR_Linux + 98) ++#define __NR_statfs (__NR_Linux + 99) ++#define __NR_fstatfs (__NR_Linux + 100) ++#define __NR_ioperm (__NR_Linux + 101) ++#define __NR_socketcall (__NR_Linux + 102) ++#define __NR_syslog (__NR_Linux + 103) ++#define __NR_setitimer (__NR_Linux + 104) ++#define __NR_getitimer (__NR_Linux + 105) ++#define __NR_stat (__NR_Linux + 106) ++#define __NR_lstat (__NR_Linux + 107) ++#define __NR_fstat (__NR_Linux + 108) ++#define __NR_unused109 (__NR_Linux + 109) ++#define __NR_iopl (__NR_Linux + 110) ++#define __NR_vhangup (__NR_Linux + 111) ++#define __NR_idle (__NR_Linux + 112) ++#define __NR_vm86 (__NR_Linux + 113) ++#define __NR_wait4 (__NR_Linux + 114) ++#define __NR_swapoff (__NR_Linux + 115) ++#define __NR_sysinfo (__NR_Linux + 116) ++#define __NR_ipc (__NR_Linux + 117) ++#define __NR_fsync (__NR_Linux + 118) ++#define __NR_sigreturn (__NR_Linux + 119) ++#define __NR_clone (__NR_Linux + 120) ++#define __NR_setdomainname (__NR_Linux + 121) ++#define __NR_uname (__NR_Linux + 122) ++#define __NR_modify_ldt (__NR_Linux + 123) ++#define __NR_adjtimex (__NR_Linux + 124) ++#define __NR_mprotect (__NR_Linux + 125) ++#define __NR_sigprocmask (__NR_Linux + 126) ++#define __NR_create_module (__NR_Linux + 127) ++#define __NR_init_module (__NR_Linux + 128) ++#define __NR_delete_module (__NR_Linux + 129) ++#define __NR_get_kernel_syms (__NR_Linux + 130) ++#define __NR_quotactl (__NR_Linux + 131) ++#define __NR_getpgid (__NR_Linux + 132) ++#define __NR_fchdir (__NR_Linux + 133) ++#define __NR_bdflush (__NR_Linux + 134) ++#define __NR_sysfs (__NR_Linux + 135) ++#define __NR_personality (__NR_Linux + 136) ++#define __NR_afs_syscall (__NR_Linux + 137) ++#define __NR_setfsuid (__NR_Linux + 138) ++#define __NR_setfsgid (__NR_Linux + 139) ++#define __NR__llseek (__NR_Linux + 140) ++#define __NR_getdents (__NR_Linux + 141) ++#define __NR__newselect (__NR_Linux + 142) ++#define __NR_flock (__NR_Linux + 143) ++#define __NR_msync (__NR_Linux + 144) ++#define __NR_readv (__NR_Linux + 145) ++#define __NR_writev (__NR_Linux + 146) ++#define __NR_cacheflush (__NR_Linux + 147) ++#define __NR_cachectl (__NR_Linux + 148) ++#define __NR_sysmips (__NR_Linux + 149) ++#define __NR_unused150 (__NR_Linux + 150) ++#define __NR_getsid (__NR_Linux + 151) ++#define __NR_fdatasync (__NR_Linux + 152) ++#define __NR__sysctl (__NR_Linux + 153) ++#define __NR_mlock (__NR_Linux + 154) ++#define __NR_munlock (__NR_Linux + 155) ++#define __NR_mlockall (__NR_Linux + 156) ++#define __NR_munlockall (__NR_Linux + 157) ++#define __NR_sched_setparam (__NR_Linux + 158) ++#define __NR_sched_getparam (__NR_Linux + 159) ++#define __NR_sched_setscheduler (__NR_Linux + 160) ++#define __NR_sched_getscheduler (__NR_Linux + 161) ++#define __NR_sched_yield (__NR_Linux + 162) ++#define __NR_sched_get_priority_max (__NR_Linux + 163) ++#define __NR_sched_get_priority_min (__NR_Linux + 164) ++#define __NR_sched_rr_get_interval (__NR_Linux + 165) ++#define __NR_nanosleep (__NR_Linux + 166) ++#define __NR_mremap (__NR_Linux + 167) ++#define __NR_accept (__NR_Linux + 168) ++#define __NR_bind (__NR_Linux + 169) ++#define __NR_connect (__NR_Linux + 170) ++#define __NR_getpeername (__NR_Linux + 171) ++#define __NR_getsockname (__NR_Linux + 172) ++#define __NR_getsockopt (__NR_Linux + 173) ++#define __NR_listen (__NR_Linux + 174) ++#define __NR_recv (__NR_Linux + 175) ++#define __NR_recvfrom (__NR_Linux + 176) ++#define __NR_recvmsg (__NR_Linux + 177) ++#define __NR_send (__NR_Linux + 178) ++#define __NR_sendmsg (__NR_Linux + 179) ++#define __NR_sendto (__NR_Linux + 180) ++#define __NR_setsockopt (__NR_Linux + 181) ++#define __NR_shutdown (__NR_Linux + 182) ++#define __NR_socket (__NR_Linux + 183) ++#define __NR_socketpair (__NR_Linux + 184) ++#define __NR_setresuid (__NR_Linux + 185) ++#define __NR_getresuid (__NR_Linux + 186) ++#define __NR_query_module (__NR_Linux + 187) ++#define __NR_poll (__NR_Linux + 188) ++#define __NR_nfsservctl (__NR_Linux + 189) ++#define __NR_setresgid (__NR_Linux + 190) ++#define __NR_getresgid (__NR_Linux + 191) ++#define __NR_prctl (__NR_Linux + 192) ++#define __NR_rt_sigreturn (__NR_Linux + 193) ++#define __NR_rt_sigaction (__NR_Linux + 194) ++#define __NR_rt_sigprocmask (__NR_Linux + 195) ++#define __NR_rt_sigpending (__NR_Linux + 196) ++#define __NR_rt_sigtimedwait (__NR_Linux + 197) ++#define __NR_rt_sigqueueinfo (__NR_Linux + 198) ++#define __NR_rt_sigsuspend (__NR_Linux + 199) ++#define __NR_pread64 (__NR_Linux + 200) ++#define __NR_pwrite64 (__NR_Linux + 201) ++#define __NR_chown (__NR_Linux + 202) ++#define __NR_getcwd (__NR_Linux + 203) ++#define __NR_capget (__NR_Linux + 204) ++#define __NR_capset (__NR_Linux + 205) ++#define __NR_sigaltstack (__NR_Linux + 206) ++#define __NR_sendfile (__NR_Linux + 207) ++#define __NR_getpmsg (__NR_Linux + 208) ++#define __NR_putpmsg (__NR_Linux + 209) ++#define __NR_mmap2 (__NR_Linux + 210) ++#define __NR_truncate64 (__NR_Linux + 211) ++#define __NR_ftruncate64 (__NR_Linux + 212) ++#define __NR_stat64 (__NR_Linux + 213) ++#define __NR_lstat64 (__NR_Linux + 214) ++#define __NR_fstat64 (__NR_Linux + 215) ++#define __NR_pivot_root (__NR_Linux + 216) ++#define __NR_mincore (__NR_Linux + 217) ++#define __NR_madvise (__NR_Linux + 218) ++#define __NR_getdents64 (__NR_Linux + 219) ++#define __NR_fcntl64 (__NR_Linux + 220) ++#define __NR_reserved221 (__NR_Linux + 221) ++#define __NR_gettid (__NR_Linux + 222) ++#define __NR_readahead (__NR_Linux + 223) ++#define __NR_setxattr (__NR_Linux + 224) ++#define __NR_lsetxattr (__NR_Linux + 225) ++#define __NR_fsetxattr (__NR_Linux + 226) ++#define __NR_getxattr (__NR_Linux + 227) ++#define __NR_lgetxattr (__NR_Linux + 228) ++#define __NR_fgetxattr (__NR_Linux + 229) ++#define __NR_listxattr (__NR_Linux + 230) ++#define __NR_llistxattr (__NR_Linux + 231) ++#define __NR_flistxattr (__NR_Linux + 232) ++#define __NR_removexattr (__NR_Linux + 233) ++#define __NR_lremovexattr (__NR_Linux + 234) ++#define __NR_fremovexattr (__NR_Linux + 235) ++#define __NR_tkill (__NR_Linux + 236) ++#define __NR_sendfile64 (__NR_Linux + 237) ++#define __NR_futex (__NR_Linux + 238) ++#define __NR_sched_setaffinity (__NR_Linux + 239) ++#define __NR_sched_getaffinity (__NR_Linux + 240) ++#define __NR_io_setup (__NR_Linux + 241) ++#define __NR_io_destroy (__NR_Linux + 242) ++#define __NR_io_getevents (__NR_Linux + 243) ++#define __NR_io_submit (__NR_Linux + 244) ++#define __NR_io_cancel (__NR_Linux + 245) ++#define __NR_exit_group (__NR_Linux + 246) ++#define __NR_lookup_dcookie (__NR_Linux + 247) ++#define __NR_epoll_create (__NR_Linux + 248) ++#define __NR_epoll_ctl (__NR_Linux + 249) ++#define __NR_epoll_wait (__NR_Linux + 250) ++#define __NR_remap_file_pages (__NR_Linux + 251) ++#define __NR_set_tid_address (__NR_Linux + 252) ++#define __NR_restart_syscall (__NR_Linux + 253) ++#define __NR_fadvise64 (__NR_Linux + 254) ++#define __NR_statfs64 (__NR_Linux + 255) ++#define __NR_fstatfs64 (__NR_Linux + 256) ++#define __NR_timer_create (__NR_Linux + 257) ++#define __NR_timer_settime (__NR_Linux + 258) ++#define __NR_timer_gettime (__NR_Linux + 259) ++#define __NR_timer_getoverrun (__NR_Linux + 260) ++#define __NR_timer_delete (__NR_Linux + 261) ++#define __NR_clock_settime (__NR_Linux + 262) ++#define __NR_clock_gettime (__NR_Linux + 263) ++#define __NR_clock_getres (__NR_Linux + 264) ++#define __NR_clock_nanosleep (__NR_Linux + 265) ++#define __NR_tgkill (__NR_Linux + 266) ++#define __NR_utimes (__NR_Linux + 267) ++#define __NR_mbind (__NR_Linux + 268) ++#define __NR_get_mempolicy (__NR_Linux + 269) ++#define __NR_set_mempolicy (__NR_Linux + 270) ++#define __NR_mq_open (__NR_Linux + 271) ++#define __NR_mq_unlink (__NR_Linux + 272) ++#define __NR_mq_timedsend (__NR_Linux + 273) ++#define __NR_mq_timedreceive (__NR_Linux + 274) ++#define __NR_mq_notify (__NR_Linux + 275) ++#define __NR_mq_getsetattr (__NR_Linux + 276) ++#define __NR_vserver (__NR_Linux + 277) ++#define __NR_waitid (__NR_Linux + 278) ++#define __NR_add_key (__NR_Linux + 280) ++#define __NR_request_key (__NR_Linux + 281) ++#define __NR_keyctl (__NR_Linux + 282) ++#define __NR_set_thread_area (__NR_Linux + 283) ++#define __NR_inotify_init (__NR_Linux + 284) ++#define __NR_inotify_add_watch (__NR_Linux + 285) ++#define __NR_inotify_rm_watch (__NR_Linux + 286) ++#define __NR_migrate_pages (__NR_Linux + 287) ++#define __NR_openat (__NR_Linux + 288) ++#define __NR_mkdirat (__NR_Linux + 289) ++#define __NR_mknodat (__NR_Linux + 290) ++#define __NR_fchownat (__NR_Linux + 291) ++#define __NR_futimesat (__NR_Linux + 292) ++#define __NR_fstatat64 (__NR_Linux + 293) ++#define __NR_unlinkat (__NR_Linux + 294) ++#define __NR_renameat (__NR_Linux + 295) ++#define __NR_linkat (__NR_Linux + 296) ++#define __NR_symlinkat (__NR_Linux + 297) ++#define __NR_readlinkat (__NR_Linux + 298) ++#define __NR_fchmodat (__NR_Linux + 299) ++#define __NR_faccessat (__NR_Linux + 300) ++#define __NR_pselect6 (__NR_Linux + 301) ++#define __NR_ppoll (__NR_Linux + 302) ++#define __NR_unshare (__NR_Linux + 303) ++#define __NR_splice (__NR_Linux + 304) ++#define __NR_sync_file_range (__NR_Linux + 305) ++#define __NR_tee (__NR_Linux + 306) ++#define __NR_vmsplice (__NR_Linux + 307) ++#define __NR_move_pages (__NR_Linux + 308) ++#define __NR_set_robust_list (__NR_Linux + 309) ++#define __NR_get_robust_list (__NR_Linux + 310) ++#define __NR_kexec_load (__NR_Linux + 311) ++#define __NR_getcpu (__NR_Linux + 312) ++#define __NR_epoll_pwait (__NR_Linux + 313) ++#define __NR_ioprio_set (__NR_Linux + 314) ++#define __NR_ioprio_get (__NR_Linux + 315) ++#define __NR_utimensat (__NR_Linux + 316) ++#define __NR_signalfd (__NR_Linux + 317) ++#define __NR_timerfd (__NR_Linux + 318) ++#define __NR_eventfd (__NR_Linux + 319) ++#define __NR_fallocate (__NR_Linux + 320) ++#define __NR_timerfd_create (__NR_Linux + 321) ++#define __NR_timerfd_gettime (__NR_Linux + 322) ++#define __NR_timerfd_settime (__NR_Linux + 323) ++#define __NR_signalfd4 (__NR_Linux + 324) ++#define __NR_eventfd2 (__NR_Linux + 325) ++#define __NR_epoll_create1 (__NR_Linux + 326) ++#define __NR_dup3 (__NR_Linux + 327) ++#define __NR_pipe2 (__NR_Linux + 328) ++#define __NR_inotify_init1 (__NR_Linux + 329) ++#define __NR_preadv (__NR_Linux + 330) ++#define __NR_pwritev (__NR_Linux + 331) ++#define __NR_rt_tgsigqueueinfo (__NR_Linux + 332) ++#define __NR_perf_event_open (__NR_Linux + 333) ++#define __NR_accept4 (__NR_Linux + 334) ++#define __NR_recvmmsg (__NR_Linux + 335) ++#define __NR_fanotify_init (__NR_Linux + 336) ++#define __NR_fanotify_mark (__NR_Linux + 337) ++#define __NR_prlimit64 (__NR_Linux + 338) ++#define __NR_name_to_handle_at (__NR_Linux + 339) ++#define __NR_open_by_handle_at (__NR_Linux + 340) ++#define __NR_clock_adjtime (__NR_Linux + 341) ++#define __NR_syncfs (__NR_Linux + 342) ++#define __NR_sendmmsg (__NR_Linux + 343) ++#define __NR_setns (__NR_Linux + 344) ++#define __NR_process_vm_readv (__NR_Linux + 345) ++#define __NR_process_vm_writev (__NR_Linux + 346) ++#define __NR_kcmp (__NR_Linux + 347) ++#define __NR_finit_module (__NR_Linux + 348) ++#define __NR_sched_setattr (__NR_Linux + 349) ++#define __NR_sched_getattr (__NR_Linux + 350) ++#define __NR_renameat2 (__NR_Linux + 351) ++#define __NR_seccomp (__NR_Linux + 352) ++#define __NR_getrandom (__NR_Linux + 353) ++#define __NR_memfd_create (__NR_Linux + 354) ++#define __NR_bpf (__NR_Linux + 355) ++#define __NR_execveat (__NR_Linux + 356) ++#define __NR_userfaultfd (__NR_Linux + 357) ++#define __NR_membarrier (__NR_Linux + 358) ++#define __NR_mlock2 (__NR_Linux + 359) ++#define __NR_copy_file_range (__NR_Linux + 360) ++#define __NR_preadv2 (__NR_Linux + 361) ++#define __NR_pwritev2 (__NR_Linux + 362) ++#define __NR_pkey_mprotect (__NR_Linux + 363) ++#define __NR_pkey_alloc (__NR_Linux + 364) ++#define __NR_pkey_free (__NR_Linux + 365) ++#define __NR_statx (__NR_Linux + 366) ++#define __NR_rseq (__NR_Linux + 367) ++#define __NR_io_pgetevents (__NR_Linux + 368) ++#define __NR_semget (__NR_Linux + 393) ++#define __NR_semctl (__NR_Linux + 394) ++#define __NR_shmget (__NR_Linux + 395) ++#define __NR_shmctl (__NR_Linux + 396) ++#define __NR_shmat (__NR_Linux + 397) ++#define __NR_shmdt (__NR_Linux + 398) ++#define __NR_msgget (__NR_Linux + 399) ++#define __NR_msgsnd (__NR_Linux + 400) ++#define __NR_msgrcv (__NR_Linux + 401) ++#define __NR_msgctl (__NR_Linux + 402) ++#define __NR_clock_gettime64 (__NR_Linux + 403) ++#define __NR_clock_settime64 (__NR_Linux + 404) ++#define __NR_clock_adjtime64 (__NR_Linux + 405) ++#define __NR_clock_getres_time64 (__NR_Linux + 406) ++#define __NR_clock_nanosleep_time64 (__NR_Linux + 407) ++#define __NR_timer_gettime64 (__NR_Linux + 408) ++#define __NR_timer_settime64 (__NR_Linux + 409) ++#define __NR_timerfd_gettime64 (__NR_Linux + 410) ++#define __NR_timerfd_settime64 (__NR_Linux + 411) ++#define __NR_utimensat_time64 (__NR_Linux + 412) ++#define __NR_pselect6_time64 (__NR_Linux + 413) ++#define __NR_ppoll_time64 (__NR_Linux + 414) ++#define __NR_io_pgetevents_time64 (__NR_Linux + 416) ++#define __NR_recvmmsg_time64 (__NR_Linux + 417) ++#define __NR_mq_timedsend_time64 (__NR_Linux + 418) ++#define __NR_mq_timedreceive_time64 (__NR_Linux + 419) ++#define __NR_semtimedop_time64 (__NR_Linux + 420) ++#define __NR_rt_sigtimedwait_time64 (__NR_Linux + 421) ++#define __NR_futex_time64 (__NR_Linux + 422) ++#define __NR_sched_rr_get_interval_time64 (__NR_Linux + 423) ++#define __NR_pidfd_send_signal (__NR_Linux + 424) ++#define __NR_io_uring_setup (__NR_Linux + 425) ++#define __NR_io_uring_enter (__NR_Linux + 426) ++#define __NR_io_uring_register (__NR_Linux + 427) ++#define __NR_open_tree (__NR_Linux + 428) ++#define __NR_move_mount (__NR_Linux + 429) ++#define __NR_fsopen (__NR_Linux + 430) ++#define __NR_fsconfig (__NR_Linux + 431) ++#define __NR_fsmount (__NR_Linux + 432) ++#define __NR_fspick (__NR_Linux + 433) ++#define __NR_pidfd_open (__NR_Linux + 434) ++#define __NR_clone3 (__NR_Linux + 435) ++#define __NR_close_range (__NR_Linux + 436) ++#define __NR_openat2 (__NR_Linux + 437) ++#define __NR_pidfd_getfd (__NR_Linux + 438) ++#define __NR_faccessat2 (__NR_Linux + 439) ++#define __NR_process_madvise (__NR_Linux + 440) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/auxvec.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/auxvec.h +new file mode 100644 +index 0000000..ff5e002 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/auxvec.h +@@ -0,0 +1,29 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_AUXVEC_H ++#define _ASM_RISCV_AUXVEC_H ++#define AT_SYSINFO_EHDR 33 ++#define AT_L1I_CACHESIZE 40 ++#define AT_L1I_CACHEGEOMETRY 41 ++#define AT_L1D_CACHESIZE 42 ++#define AT_L1D_CACHEGEOMETRY 43 ++#define AT_L2_CACHESIZE 44 ++#define AT_L2_CACHEGEOMETRY 45 ++#define AT_VECTOR_SIZE_ARCH 7 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bitsperlong.h +new file mode 100644 +index 0000000..d2022e3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bitsperlong.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_BITSPERLONG_H ++#define _ASM_RISCV_BITSPERLONG_H ++#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8) ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bpf_perf_event.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bpf_perf_event.h +new file mode 100644 +index 0000000..ca87a85 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/bpf_perf_event.h +@@ -0,0 +1,23 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_BPF_PERF_EVENT_H__ ++#define __ASM_BPF_PERF_EVENT_H__ ++#include ++typedef struct user_regs_struct bpf_user_pt_regs_t; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/byteorder.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/byteorder.h +new file mode 100644 +index 0000000..7fdf96e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/byteorder.h +@@ -0,0 +1,22 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_BYTEORDER_H ++#define _ASM_RISCV_BYTEORDER_H ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/elf.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/elf.h +new file mode 100644 +index 0000000..849d583 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/elf.h +@@ -0,0 +1,89 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_ELF_H ++#define _ASM_RISCV_ELF_H ++#include ++typedef unsigned long elf_greg_t; ++typedef struct user_regs_struct elf_gregset_t; ++#define ELF_NGREG (sizeof(elf_gregset_t) / sizeof(elf_greg_t)) ++typedef __u64 elf_fpreg_t; ++typedef union __riscv_fp_state elf_fpregset_t; ++#define ELF_NFPREG (sizeof(struct __riscv_d_ext_state) / sizeof(elf_fpreg_t)) ++#if __riscv_xlen == 64 ++#define ELF_RISCV_R_SYM(r_info) ELF64_R_SYM(r_info) ++#define ELF_RISCV_R_TYPE(r_info) ELF64_R_TYPE(r_info) ++#else ++#define ELF_RISCV_R_SYM(r_info) ELF32_R_SYM(r_info) ++#define ELF_RISCV_R_TYPE(r_info) ELF32_R_TYPE(r_info) ++#endif ++#define R_RISCV_NONE 0 ++#define R_RISCV_32 1 ++#define R_RISCV_64 2 ++#define R_RISCV_RELATIVE 3 ++#define R_RISCV_COPY 4 ++#define R_RISCV_JUMP_SLOT 5 ++#define R_RISCV_TLS_DTPMOD32 6 ++#define R_RISCV_TLS_DTPMOD64 7 ++#define R_RISCV_TLS_DTPREL32 8 ++#define R_RISCV_TLS_DTPREL64 9 ++#define R_RISCV_TLS_TPREL32 10 ++#define R_RISCV_TLS_TPREL64 11 ++#define R_RISCV_BRANCH 16 ++#define R_RISCV_JAL 17 ++#define R_RISCV_CALL 18 ++#define R_RISCV_CALL_PLT 19 ++#define R_RISCV_GOT_HI20 20 ++#define R_RISCV_TLS_GOT_HI20 21 ++#define R_RISCV_TLS_GD_HI20 22 ++#define R_RISCV_PCREL_HI20 23 ++#define R_RISCV_PCREL_LO12_I 24 ++#define R_RISCV_PCREL_LO12_S 25 ++#define R_RISCV_HI20 26 ++#define R_RISCV_LO12_I 27 ++#define R_RISCV_LO12_S 28 ++#define R_RISCV_TPREL_HI20 29 ++#define R_RISCV_TPREL_LO12_I 30 ++#define R_RISCV_TPREL_LO12_S 31 ++#define R_RISCV_TPREL_ADD 32 ++#define R_RISCV_ADD8 33 ++#define R_RISCV_ADD16 34 ++#define R_RISCV_ADD32 35 ++#define R_RISCV_ADD64 36 ++#define R_RISCV_SUB8 37 ++#define R_RISCV_SUB16 38 ++#define R_RISCV_SUB32 39 ++#define R_RISCV_SUB64 40 ++#define R_RISCV_GNU_VTINHERIT 41 ++#define R_RISCV_GNU_VTENTRY 42 ++#define R_RISCV_ALIGN 43 ++#define R_RISCV_RVC_BRANCH 44 ++#define R_RISCV_RVC_JUMP 45 ++#define R_RISCV_LUI 46 ++#define R_RISCV_GPREL_I 47 ++#define R_RISCV_GPREL_S 48 ++#define R_RISCV_TPREL_I 49 ++#define R_RISCV_TPREL_S 50 ++#define R_RISCV_RELAX 51 ++#define R_RISCV_SUB6 52 ++#define R_RISCV_SET6 53 ++#define R_RISCV_SET8 54 ++#define R_RISCV_SET16 55 ++#define R_RISCV_SET32 56 ++#define R_RISCV_32_PCREL 57 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/errno.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/errno.h +new file mode 100644 +index 0000000..392cd94 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/errno.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/fcntl.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/fcntl.h +new file mode 100644 +index 0000000..518d3a7 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/fcntl.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/hwcap.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/hwcap.h +new file mode 100644 +index 0000000..8c188dd +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/hwcap.h +@@ -0,0 +1,27 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_HWCAP_H ++#define _ASM_RISCV_HWCAP_H ++#define COMPAT_HWCAP_ISA_I (1 << ('I' - 'A')) ++#define COMPAT_HWCAP_ISA_M (1 << ('M' - 'A')) ++#define COMPAT_HWCAP_ISA_A (1 << ('A' - 'A')) ++#define COMPAT_HWCAP_ISA_F (1 << ('F' - 'A')) ++#define COMPAT_HWCAP_ISA_D (1 << ('D' - 'A')) ++#define COMPAT_HWCAP_ISA_C (1 << ('C' - 'A')) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctl.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctl.h +new file mode 100644 +index 0000000..7b7bd37 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctl.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctls.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctls.h +new file mode 100644 +index 0000000..0c66935 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ioctls.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ipcbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ipcbuf.h +new file mode 100644 +index 0000000..0021f14 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ipcbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/mman.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/mman.h +new file mode 100644 +index 0000000..6c23fb6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/mman.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/msgbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/msgbuf.h +new file mode 100644 +index 0000000..7809e3c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/msgbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/param.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/param.h +new file mode 100644 +index 0000000..5ccf935 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/param.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/perf_regs.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/perf_regs.h +new file mode 100644 +index 0000000..ceb0bbe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/perf_regs.h +@@ -0,0 +1,56 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_PERF_REGS_H ++#define _ASM_RISCV_PERF_REGS_H ++enum perf_event_riscv_regs { ++ PERF_REG_RISCV_PC, ++ PERF_REG_RISCV_RA, ++ PERF_REG_RISCV_SP, ++ PERF_REG_RISCV_GP, ++ PERF_REG_RISCV_TP, ++ PERF_REG_RISCV_T0, ++ PERF_REG_RISCV_T1, ++ PERF_REG_RISCV_T2, ++ PERF_REG_RISCV_S0, ++ PERF_REG_RISCV_S1, ++ PERF_REG_RISCV_A0, ++ PERF_REG_RISCV_A1, ++ PERF_REG_RISCV_A2, ++ PERF_REG_RISCV_A3, ++ PERF_REG_RISCV_A4, ++ PERF_REG_RISCV_A5, ++ PERF_REG_RISCV_A6, ++ PERF_REG_RISCV_A7, ++ PERF_REG_RISCV_S2, ++ PERF_REG_RISCV_S3, ++ PERF_REG_RISCV_S4, ++ PERF_REG_RISCV_S5, ++ PERF_REG_RISCV_S6, ++ PERF_REG_RISCV_S7, ++ PERF_REG_RISCV_S8, ++ PERF_REG_RISCV_S9, ++ PERF_REG_RISCV_S10, ++ PERF_REG_RISCV_S11, ++ PERF_REG_RISCV_T3, ++ PERF_REG_RISCV_T4, ++ PERF_REG_RISCV_T5, ++ PERF_REG_RISCV_T6, ++ PERF_REG_RISCV_MAX, ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/poll.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/poll.h +new file mode 100644 +index 0000000..d7e8adc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/poll.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/posix_types.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/posix_types.h +new file mode 100644 +index 0000000..1b89253 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/posix_types.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ptrace.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ptrace.h +new file mode 100644 +index 0000000..0e89a5d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ptrace.h +@@ -0,0 +1,76 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_PTRACE_H ++#define _ASM_RISCV_PTRACE_H ++#ifndef __ASSEMBLY__ ++#include ++struct user_regs_struct { ++ unsigned long pc; ++ unsigned long ra; ++ unsigned long sp; ++ unsigned long gp; ++ unsigned long tp; ++ unsigned long t0; ++ unsigned long t1; ++ unsigned long t2; ++ unsigned long s0; ++ unsigned long s1; ++ unsigned long a0; ++ unsigned long a1; ++ unsigned long a2; ++ unsigned long a3; ++ unsigned long a4; ++ unsigned long a5; ++ unsigned long a6; ++ unsigned long a7; ++ unsigned long s2; ++ unsigned long s3; ++ unsigned long s4; ++ unsigned long s5; ++ unsigned long s6; ++ unsigned long s7; ++ unsigned long s8; ++ unsigned long s9; ++ unsigned long s10; ++ unsigned long s11; ++ unsigned long t3; ++ unsigned long t4; ++ unsigned long t5; ++ unsigned long t6; ++}; ++struct __riscv_f_ext_state { ++ __u32 f[32]; ++ __u32 fcsr; ++}; ++struct __riscv_d_ext_state { ++ __u64 f[32]; ++ __u32 fcsr; ++}; ++struct __riscv_q_ext_state { ++ __u64 f[64] __attribute__((aligned(16))); ++ __u32 fcsr; ++ __u32 reserved[3]; ++}; ++union __riscv_fp_state { ++ struct __riscv_f_ext_state f; ++ struct __riscv_d_ext_state d; ++ struct __riscv_q_ext_state q; ++}; ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/resource.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/resource.h +new file mode 100644 +index 0000000..371adb5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/resource.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sembuf.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sembuf.h +new file mode 100644 +index 0000000..6ce6549 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sembuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/setup.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/setup.h +new file mode 100644 +index 0000000..940c4db +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/setup.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/shmbuf.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/shmbuf.h +new file mode 100644 +index 0000000..fe8b1be +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/shmbuf.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sigcontext.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sigcontext.h +new file mode 100644 +index 0000000..7fd6f26 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sigcontext.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_SIGCONTEXT_H ++#define _ASM_RISCV_SIGCONTEXT_H ++#include ++struct sigcontext { ++ struct user_regs_struct sc_regs; ++ union __riscv_fp_state sc_fpregs; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/siginfo.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/siginfo.h +new file mode 100644 +index 0000000..a31ebb2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/siginfo.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/signal.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/signal.h +new file mode 100644 +index 0000000..64373fe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/signal.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/socket.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/socket.h +new file mode 100644 +index 0000000..50a9874 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/socket.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sockios.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sockios.h +new file mode 100644 +index 0000000..710db92 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/sockios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/stat.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/stat.h +new file mode 100644 +index 0000000..af7ebfc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/stat.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/statfs.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/statfs.h +new file mode 100644 +index 0000000..93de275 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/statfs.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/swab.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/swab.h +new file mode 100644 +index 0000000..0049f53 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/swab.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termbits.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termbits.h +new file mode 100644 +index 0000000..42af6fe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termbits.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termios.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termios.h +new file mode 100644 +index 0000000..feca4c6 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/termios.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/types.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/types.h +new file mode 100644 +index 0000000..8250f43 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/types.h +@@ -0,0 +1,19 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#include +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ucontext.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ucontext.h +new file mode 100644 +index 0000000..8570550 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/ucontext.h +@@ -0,0 +1,30 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_RISCV_UCONTEXT_H ++#define _ASM_RISCV_UCONTEXT_H ++#include ++struct ucontext { ++ unsigned long uc_flags; ++ struct ucontext * uc_link; ++ stack_t uc_stack; ++ sigset_t uc_sigmask; ++ __u8 __linux_unused[1024 / 8 - sizeof(sigset_t)]; ++ struct sigcontext uc_mcontext; ++}; ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/unistd.h b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/unistd.h +new file mode 100644 +index 0000000..31b1b1a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/asm-riscv/asm/unistd.h +@@ -0,0 +1,28 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifdef __LP64__ ++#define __ARCH_WANT_NEW_STAT ++#define __ARCH_WANT_SET_GET_RLIMIT ++#define __ARCH_WANT_SYS_CLONE3 ++#endif ++#include ++#ifndef __NR_riscv_flush_icache ++#define __NR_riscv_flush_icache (__NR_arch_specific_syscall + 15) ++#endif ++__SYSCALL(__NR_riscv_flush_icache, sys_riscv_flush_icache) +diff --git a/build/ohos/ohos-sysroot/usr/include/assert.h b/build/ohos/ohos-sysroot/usr/include/assert.h +new file mode 100644 +index 0000000..d14ec94 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/assert.h +@@ -0,0 +1,23 @@ ++#include ++ ++#undef assert ++ ++#ifdef NDEBUG ++#define assert(x) (void)0 ++#else ++#define assert(x) ((void)((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0))) ++#endif ++ ++#if __STDC_VERSION__ >= 201112L && !defined(__cplusplus) ++#define static_assert _Static_assert ++#endif ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++_Noreturn void __assert_fail (const char *, const char *, int, const char *); ++ ++#ifdef __cplusplus ++} ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/bundle/native_interface_bundle.h b/build/ohos/ohos-sysroot/usr/include/bundle/native_interface_bundle.h +new file mode 100644 +index 0000000..d318f86 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/bundle/native_interface_bundle.h +@@ -0,0 +1,58 @@ ++/* ++ * Copyright (c) 2022 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++/** ++ * @addtogroup Native_Bundle ++ * @{ ++ * ++ * @brief Describes the Native Bundle. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file native_interface_bundle.h ++ * ++ * @brief Declares the Bundle-specific function, including function for obtaining application info. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++#ifndef FOUNDATION_APPEXECFWK_STANDARD_KITS_APPKIT_NATIVE_BUNDLE_INCLUDE_NATIVE_INTERFACE_BUNDLE_H ++#define FOUNDATION_APPEXECFWK_STANDARD_KITS_APPKIT_NATIVE_BUNDLE_INCLUDE_NATIVE_INTERFACE_BUNDLE_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++struct OH_NativeBundle_ApplicationInfo { ++ char* bundleName; ++ ++ char* fingerprint; ++}; ++ ++/** ++ * @brief Obtains the application info based on the The current bundle. ++ * ++ * @return Returns the application info. ++ * @since 9 ++ * @version 1.0 ++ */ ++OH_NativeBundle_ApplicationInfo OH_NativeBundle_GetCurrentApplicationInfo(); ++ ++#ifdef __cplusplus ++}; ++#endif ++#endif // FOUNDATION_APPEXECFWK_STANDARD_KITS_APPKIT_NATIVE_BUNDLE_INCLUDE_NATIVE_INTERFACE_BUNDLE_H +diff --git a/build/ohos/ohos-sysroot/usr/include/byteswap.h b/build/ohos/ohos-sysroot/usr/include/byteswap.h +new file mode 100644 +index 0000000..00b9df3 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/byteswap.h +@@ -0,0 +1,26 @@ ++#ifndef _BYTESWAP_H ++#define _BYTESWAP_H ++ ++#include ++#include ++ ++static __inline uint16_t __bswap_16(uint16_t __x) ++{ ++ return __x<<8 | __x>>8; ++} ++ ++static __inline uint32_t __bswap_32(uint32_t __x) ++{ ++ return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ++} ++ ++static __inline uint64_t __bswap_64(uint64_t __x) ++{ ++ return __bswap_32(__x)+0ULL<<32 | __bswap_32(__x>>32); ++} ++ ++#define bswap_16(x) __bswap_16(x) ++#define bswap_32(x) __bswap_32(x) ++#define bswap_64(x) __bswap_64(x) ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/complex.h b/build/ohos/ohos-sysroot/usr/include/complex.h +new file mode 100644 +index 0000000..008b3c7 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/complex.h +@@ -0,0 +1,133 @@ ++#ifndef _COMPLEX_H ++#define _COMPLEX_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define complex _Complex ++#ifdef __GNUC__ ++#define _Complex_I (__extension__ (0.0f+1.0fi)) ++#else ++#define _Complex_I (0.0f+1.0fi) ++#endif ++#define I _Complex_I ++ ++double complex cacos(double complex); ++float complex cacosf(float complex); ++long double complex cacosl(long double complex); ++ ++double complex casin(double complex); ++float complex casinf(float complex); ++long double complex casinl(long double complex); ++ ++double complex catan(double complex); ++float complex catanf(float complex); ++long double complex catanl(long double complex); ++ ++double complex ccos(double complex); ++float complex ccosf(float complex); ++long double complex ccosl(long double complex); ++ ++double complex csin(double complex); ++float complex csinf(float complex); ++long double complex csinl(long double complex); ++ ++double complex ctan(double complex); ++float complex ctanf(float complex); ++long double complex ctanl(long double complex); ++ ++double complex cacosh(double complex); ++float complex cacoshf(float complex); ++long double complex cacoshl(long double complex); ++ ++double complex casinh(double complex); ++float complex casinhf(float complex); ++long double complex casinhl(long double complex); ++ ++double complex catanh(double complex); ++float complex catanhf(float complex); ++long double complex catanhl(long double complex); ++ ++double complex ccosh(double complex); ++float complex ccoshf(float complex); ++long double complex ccoshl(long double complex); ++ ++double complex csinh(double complex); ++float complex csinhf(float complex); ++long double complex csinhl(long double complex); ++ ++double complex ctanh(double complex); ++float complex ctanhf(float complex); ++long double complex ctanhl(long double complex); ++ ++double complex cexp(double complex); ++float complex cexpf(float complex); ++long double complex cexpl(long double complex); ++ ++double complex clog(double complex); ++float complex clogf(float complex); ++long double complex clogl(long double complex); ++ ++double cabs(double complex); ++float cabsf(float complex); ++long double cabsl(long double complex); ++ ++double complex cpow(double complex, double complex); ++float complex cpowf(float complex, float complex); ++long double complex cpowl(long double complex, long double complex); ++ ++double complex csqrt(double complex); ++float complex csqrtf(float complex); ++long double complex csqrtl(long double complex); ++ ++double carg(double complex); ++float cargf(float complex); ++long double cargl(long double complex); ++ ++double cimag(double complex); ++float cimagf(float complex); ++long double cimagl(long double complex); ++ ++double complex conj(double complex); ++float complex conjf(float complex); ++long double complex conjl(long double complex); ++ ++double complex cproj(double complex); ++float complex cprojf(float complex); ++long double complex cprojl(long double complex); ++ ++double creal(double complex); ++float crealf(float complex); ++long double creall(long double complex); ++ ++#ifndef __cplusplus ++#define __CIMAG(x, t) \ ++ (+(union { _Complex t __z; t __xy[2]; }){(_Complex t)(x)}.__xy[1]) ++ ++#define creal(x) ((double)(x)) ++#define crealf(x) ((float)(x)) ++#define creall(x) ((long double)(x)) ++ ++#define cimag(x) __CIMAG(x, double) ++#define cimagf(x) __CIMAG(x, float) ++#define cimagl(x) __CIMAG(x, long double) ++#endif ++ ++#if __STDC_VERSION__ >= 201112L ++#if defined(_Imaginary_I) ++#define __CMPLX(x, y, t) ((t)(x) + _Imaginary_I*(t)(y)) ++#elif defined(__clang__) ++#define __CMPLX(x, y, t) (+(_Complex t){ (t)(x), (t)(y) }) ++#else ++#define __CMPLX(x, y, t) (__builtin_complex((t)(x), (t)(y))) ++#endif ++#define CMPLX(x, y) __CMPLX(x, y, double) ++#define CMPLXF(x, y) __CMPLX(x, y, float) ++#define CMPLXL(x, y) __CMPLX(x, y, long double) ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/cpio.h b/build/ohos/ohos-sysroot/usr/include/cpio.h +new file mode 100644 +index 0000000..39a1f8b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/cpio.h +@@ -0,0 +1,29 @@ ++#ifndef _CPIO_H ++#define _CPIO_H ++ ++#define MAGIC "070707" ++ ++#define C_IRUSR 000400 ++#define C_IWUSR 000200 ++#define C_IXUSR 000100 ++#define C_IRGRP 000040 ++#define C_IWGRP 000020 ++#define C_IXGRP 000010 ++#define C_IROTH 000004 ++#define C_IWOTH 000002 ++#define C_IXOTH 000001 ++ ++#define C_ISUID 004000 ++#define C_ISGID 002000 ++#define C_ISVTX 001000 ++ ++#define C_ISBLK 060000 ++#define C_ISCHR 020000 ++#define C_ISDIR 040000 ++#define C_ISFIFO 010000 ++#define C_ISSOCK 0140000 ++#define C_ISLNK 0120000 ++#define C_ISCTG 0110000 ++#define C_ISREG 0100000 ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/crypt.h b/build/ohos/ohos-sysroot/usr/include/crypt.h +new file mode 100644 +index 0000000..6de4832 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/crypt.h +@@ -0,0 +1,17 @@ ++#ifndef _CRYPT_H ++#define _CRYPT_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++struct crypt_data { ++ int initialized; ++ char __buf[256]; ++}; ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/ctype.h b/build/ohos/ohos-sysroot/usr/include/ctype.h +new file mode 100644 +index 0000000..39879a2 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/ctype.h +@@ -0,0 +1,77 @@ ++#ifndef _CTYPE_H ++#define _CTYPE_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++int isalnum(int); ++int isalpha(int); ++int isblank(int); ++int iscntrl(int); ++int isdigit(int); ++int isgraph(int); ++int islower(int); ++int isprint(int); ++int ispunct(int); ++int isspace(int); ++int isupper(int); ++int isxdigit(int); ++int tolower(int); ++int toupper(int); ++ ++#ifndef __cplusplus ++static __inline int __isspace(int _c) ++{ ++ return _c == ' ' || (unsigned)_c-'\t' < 5; ++} ++ ++#define isalpha(a) (0 ? isalpha(a) : (((unsigned)(a)|32)-'a') < 26) ++#define isdigit(a) (0 ? isdigit(a) : ((unsigned)(a)-'0') < 10) ++#define islower(a) (0 ? islower(a) : ((unsigned)(a)-'a') < 26) ++#define isupper(a) (0 ? isupper(a) : ((unsigned)(a)-'A') < 26) ++#define isprint(a) (0 ? isprint(a) : ((unsigned)(a)-0x20) < 0x5f) ++#define isgraph(a) (0 ? isgraph(a) : ((unsigned)(a)-0x21) < 0x5e) ++#define isspace(a) __isspace(a) ++#endif ++ ++ ++#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ ++ || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ ++ || defined(_BSD_SOURCE) ++ ++#define __NEED_locale_t ++#include ++ ++int isalnum_l(int, locale_t); ++int isalpha_l(int, locale_t); ++int isblank_l(int, locale_t); ++int iscntrl_l(int, locale_t); ++int isdigit_l(int, locale_t); ++int isgraph_l(int, locale_t); ++int islower_l(int, locale_t); ++int isprint_l(int, locale_t); ++int ispunct_l(int, locale_t); ++int isspace_l(int, locale_t); ++int isupper_l(int, locale_t); ++int isxdigit_l(int, locale_t); ++int tolower_l(int, locale_t); ++int toupper_l(int, locale_t); ++ ++int isascii(int); ++int toascii(int); ++#define _tolower(a) ((a)|0x20) ++#define _toupper(a) ((a)&0x5f) ++#define isascii(a) (0 ? isascii(a) : (unsigned)(a) < 128) ++ ++#include ++ ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/dirent.h b/build/ohos/ohos-sysroot/usr/include/dirent.h +new file mode 100644 +index 0000000..955d133 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/dirent.h +@@ -0,0 +1,70 @@ ++#ifndef _DIRENT_H ++#define _DIRENT_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#define __NEED_ino_t ++#define __NEED_off_t ++#if defined(_BSD_SOURCE) || defined(_GNU_SOURCE) ++#define __NEED_size_t ++#endif ++ ++#include ++ ++#include ++ ++typedef struct __dirstream DIR; ++ ++#define d_fileno d_ino ++ ++int closedir(DIR *); ++DIR *fdopendir(int); ++DIR *opendir(const char *); ++struct dirent *readdir(DIR *); ++int readdir_r(DIR *__restrict, struct dirent *__restrict, struct dirent **__restrict); ++void rewinddir(DIR *); ++int dirfd(DIR *); ++ ++int alphasort(const struct dirent **, const struct dirent **); ++int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)); ++ ++#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++void seekdir(DIR *, long); ++long telldir(DIR *); ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define DT_UNKNOWN 0 ++#define DT_FIFO 1 ++#define DT_CHR 2 ++#define DT_DIR 4 ++#define DT_BLK 6 ++#define DT_REG 8 ++#define DT_LNK 10 ++#define DT_SOCK 12 ++#define DT_WHT 14 ++#define IFTODT(x) ((x)>>12 & 017) ++#define DTTOIF(x) ((x)<<12) ++int getdents(int, struct dirent *, size_t); ++#endif ++ ++#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) ++#define dirent64 dirent ++#define readdir64 readdir ++#define readdir64_r readdir_r ++#define scandir64 scandir ++#define alphasort64 alphasort ++#define off64_t off_t ++#define ino64_t ino_t ++#define getdents64 getdents ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/dlfcn.h b/build/ohos/ohos-sysroot/usr/include/dlfcn.h +new file mode 100644 +index 0000000..b62e1ad +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/dlfcn.h +@@ -0,0 +1,52 @@ ++#ifndef _DLFCN_H ++#define _DLFCN_H ++ ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define RTLD_LAZY 1 ++#define RTLD_NOW 2 ++#define RTLD_NOLOAD 4 ++#define RTLD_NODELETE 4096 ++#define RTLD_GLOBAL 256 ++#define RTLD_LOCAL 0 ++ ++#define RTLD_NEXT ((void *)-1) ++#define RTLD_DEFAULT ((void *)0) ++ ++#define RTLD_DI_LINKMAP 2 ++ ++int dlclose(void *); ++char *dlerror(void); ++void *dlopen(const char *, int); ++void *dlsym(void *__restrict, const char *__restrict); ++ ++/* namespace apis */ ++#define NS_NAME_MAX 255 ++typedef struct { ++ char name[NS_NAME_MAX+1]; ++} Dl_namespace; ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++typedef struct { ++ const char *dli_fname; ++ void *dli_fbase; ++ const char *dli_sname; ++ void *dli_saddr; ++} Dl_info; ++int dladdr(const void *, Dl_info *); ++#endif ++ ++#if _REDIR_TIME64 ++__REDIR(dlsym, __dlsym_time64); ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/amdgpu_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/amdgpu_drm.h +new file mode 100644 +index 0000000..01a11dc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/amdgpu_drm.h +@@ -0,0 +1,649 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __AMDGPU_DRM_H__ ++#define __AMDGPU_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_AMDGPU_GEM_CREATE 0x00 ++#define DRM_AMDGPU_GEM_MMAP 0x01 ++#define DRM_AMDGPU_CTX 0x02 ++#define DRM_AMDGPU_BO_LIST 0x03 ++#define DRM_AMDGPU_CS 0x04 ++#define DRM_AMDGPU_INFO 0x05 ++#define DRM_AMDGPU_GEM_METADATA 0x06 ++#define DRM_AMDGPU_GEM_WAIT_IDLE 0x07 ++#define DRM_AMDGPU_GEM_VA 0x08 ++#define DRM_AMDGPU_WAIT_CS 0x09 ++#define DRM_AMDGPU_GEM_OP 0x10 ++#define DRM_AMDGPU_GEM_USERPTR 0x11 ++#define DRM_AMDGPU_WAIT_FENCES 0x12 ++#define DRM_AMDGPU_VM 0x13 ++#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14 ++#define DRM_AMDGPU_SCHED 0x15 ++#define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) ++#define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) ++#define DRM_IOCTL_AMDGPU_CTX DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CTX, union drm_amdgpu_ctx) ++#define DRM_IOCTL_AMDGPU_BO_LIST DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_BO_LIST, union drm_amdgpu_bo_list) ++#define DRM_IOCTL_AMDGPU_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_CS, union drm_amdgpu_cs) ++#define DRM_IOCTL_AMDGPU_INFO DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_INFO, struct drm_amdgpu_info) ++#define DRM_IOCTL_AMDGPU_GEM_METADATA DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_METADATA, struct drm_amdgpu_gem_metadata) ++#define DRM_IOCTL_AMDGPU_GEM_WAIT_IDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_WAIT_IDLE, union drm_amdgpu_gem_wait_idle) ++#define DRM_IOCTL_AMDGPU_GEM_VA DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_VA, struct drm_amdgpu_gem_va) ++#define DRM_IOCTL_AMDGPU_WAIT_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_CS, union drm_amdgpu_wait_cs) ++#define DRM_IOCTL_AMDGPU_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_OP, struct drm_amdgpu_gem_op) ++#define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) ++#define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) ++#define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) ++#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) ++#define DRM_IOCTL_AMDGPU_SCHED DRM_IOW(DRM_COMMAND_BASE + DRM_AMDGPU_SCHED, union drm_amdgpu_sched) ++#define AMDGPU_GEM_DOMAIN_CPU 0x1 ++#define AMDGPU_GEM_DOMAIN_GTT 0x2 ++#define AMDGPU_GEM_DOMAIN_VRAM 0x4 ++#define AMDGPU_GEM_DOMAIN_GDS 0x8 ++#define AMDGPU_GEM_DOMAIN_GWS 0x10 ++#define AMDGPU_GEM_DOMAIN_OA 0x20 ++#define AMDGPU_GEM_DOMAIN_MASK (AMDGPU_GEM_DOMAIN_CPU | AMDGPU_GEM_DOMAIN_GTT | AMDGPU_GEM_DOMAIN_VRAM | AMDGPU_GEM_DOMAIN_GDS | AMDGPU_GEM_DOMAIN_GWS | AMDGPU_GEM_DOMAIN_OA) ++#define AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED (1 << 0) ++#define AMDGPU_GEM_CREATE_NO_CPU_ACCESS (1 << 1) ++#define AMDGPU_GEM_CREATE_CPU_GTT_USWC (1 << 2) ++#define AMDGPU_GEM_CREATE_VRAM_CLEARED (1 << 3) ++#define AMDGPU_GEM_CREATE_SHADOW (1 << 4) ++#define AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS (1 << 5) ++#define AMDGPU_GEM_CREATE_VM_ALWAYS_VALID (1 << 6) ++#define AMDGPU_GEM_CREATE_EXPLICIT_SYNC (1 << 7) ++#define AMDGPU_GEM_CREATE_CP_MQD_GFX9 (1 << 8) ++#define AMDGPU_GEM_CREATE_VRAM_WIPE_ON_RELEASE (1 << 9) ++#define AMDGPU_GEM_CREATE_ENCRYPTED (1 << 10) ++struct drm_amdgpu_gem_create_in { ++ __u64 bo_size; ++ __u64 alignment; ++ __u64 domains; ++ __u64 domain_flags; ++}; ++struct drm_amdgpu_gem_create_out { ++ __u32 handle; ++ __u32 _pad; ++}; ++union drm_amdgpu_gem_create { ++ struct drm_amdgpu_gem_create_in in; ++ struct drm_amdgpu_gem_create_out out; ++}; ++#define AMDGPU_BO_LIST_OP_CREATE 0 ++#define AMDGPU_BO_LIST_OP_DESTROY 1 ++#define AMDGPU_BO_LIST_OP_UPDATE 2 ++struct drm_amdgpu_bo_list_in { ++ __u32 operation; ++ __u32 list_handle; ++ __u32 bo_number; ++ __u32 bo_info_size; ++ __u64 bo_info_ptr; ++}; ++struct drm_amdgpu_bo_list_entry { ++ __u32 bo_handle; ++ __u32 bo_priority; ++}; ++struct drm_amdgpu_bo_list_out { ++ __u32 list_handle; ++ __u32 _pad; ++}; ++union drm_amdgpu_bo_list { ++ struct drm_amdgpu_bo_list_in in; ++ struct drm_amdgpu_bo_list_out out; ++}; ++#define AMDGPU_CTX_OP_ALLOC_CTX 1 ++#define AMDGPU_CTX_OP_FREE_CTX 2 ++#define AMDGPU_CTX_OP_QUERY_STATE 3 ++#define AMDGPU_CTX_OP_QUERY_STATE2 4 ++#define AMDGPU_CTX_NO_RESET 0 ++#define AMDGPU_CTX_GUILTY_RESET 1 ++#define AMDGPU_CTX_INNOCENT_RESET 2 ++#define AMDGPU_CTX_UNKNOWN_RESET 3 ++#define AMDGPU_CTX_QUERY2_FLAGS_RESET (1 << 0) ++#define AMDGPU_CTX_QUERY2_FLAGS_VRAMLOST (1 << 1) ++#define AMDGPU_CTX_QUERY2_FLAGS_GUILTY (1 << 2) ++#define AMDGPU_CTX_QUERY2_FLAGS_RAS_CE (1 << 3) ++#define AMDGPU_CTX_QUERY2_FLAGS_RAS_UE (1 << 4) ++#define AMDGPU_CTX_PRIORITY_UNSET - 2048 ++#define AMDGPU_CTX_PRIORITY_VERY_LOW - 1023 ++#define AMDGPU_CTX_PRIORITY_LOW - 512 ++#define AMDGPU_CTX_PRIORITY_NORMAL 0 ++#define AMDGPU_CTX_PRIORITY_HIGH 512 ++#define AMDGPU_CTX_PRIORITY_VERY_HIGH 1023 ++struct drm_amdgpu_ctx_in { ++ __u32 op; ++ __u32 flags; ++ __u32 ctx_id; ++ __s32 priority; ++}; ++union drm_amdgpu_ctx_out { ++ struct { ++ __u32 ctx_id; ++ __u32 _pad; ++ } alloc; ++ struct { ++ __u64 flags; ++ __u32 hangs; ++ __u32 reset_status; ++ } state; ++}; ++union drm_amdgpu_ctx { ++ struct drm_amdgpu_ctx_in in; ++ union drm_amdgpu_ctx_out out; ++}; ++#define AMDGPU_VM_OP_RESERVE_VMID 1 ++#define AMDGPU_VM_OP_UNRESERVE_VMID 2 ++struct drm_amdgpu_vm_in { ++ __u32 op; ++ __u32 flags; ++}; ++struct drm_amdgpu_vm_out { ++ __u64 flags; ++}; ++union drm_amdgpu_vm { ++ struct drm_amdgpu_vm_in in; ++ struct drm_amdgpu_vm_out out; ++}; ++#define AMDGPU_SCHED_OP_PROCESS_PRIORITY_OVERRIDE 1 ++#define AMDGPU_SCHED_OP_CONTEXT_PRIORITY_OVERRIDE 2 ++struct drm_amdgpu_sched_in { ++ __u32 op; ++ __u32 fd; ++ __s32 priority; ++ __u32 ctx_id; ++}; ++union drm_amdgpu_sched { ++ struct drm_amdgpu_sched_in in; ++}; ++#define AMDGPU_GEM_USERPTR_READONLY (1 << 0) ++#define AMDGPU_GEM_USERPTR_ANONONLY (1 << 1) ++#define AMDGPU_GEM_USERPTR_VALIDATE (1 << 2) ++#define AMDGPU_GEM_USERPTR_REGISTER (1 << 3) ++struct drm_amdgpu_gem_userptr { ++ __u64 addr; ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++#define AMDGPU_TILING_ARRAY_MODE_SHIFT 0 ++#define AMDGPU_TILING_ARRAY_MODE_MASK 0xf ++#define AMDGPU_TILING_PIPE_CONFIG_SHIFT 4 ++#define AMDGPU_TILING_PIPE_CONFIG_MASK 0x1f ++#define AMDGPU_TILING_TILE_SPLIT_SHIFT 9 ++#define AMDGPU_TILING_TILE_SPLIT_MASK 0x7 ++#define AMDGPU_TILING_MICRO_TILE_MODE_SHIFT 12 ++#define AMDGPU_TILING_MICRO_TILE_MODE_MASK 0x7 ++#define AMDGPU_TILING_BANK_WIDTH_SHIFT 15 ++#define AMDGPU_TILING_BANK_WIDTH_MASK 0x3 ++#define AMDGPU_TILING_BANK_HEIGHT_SHIFT 17 ++#define AMDGPU_TILING_BANK_HEIGHT_MASK 0x3 ++#define AMDGPU_TILING_MACRO_TILE_ASPECT_SHIFT 19 ++#define AMDGPU_TILING_MACRO_TILE_ASPECT_MASK 0x3 ++#define AMDGPU_TILING_NUM_BANKS_SHIFT 21 ++#define AMDGPU_TILING_NUM_BANKS_MASK 0x3 ++#define AMDGPU_TILING_SWIZZLE_MODE_SHIFT 0 ++#define AMDGPU_TILING_SWIZZLE_MODE_MASK 0x1f ++#define AMDGPU_TILING_DCC_OFFSET_256B_SHIFT 5 ++#define AMDGPU_TILING_DCC_OFFSET_256B_MASK 0xFFFFFF ++#define AMDGPU_TILING_DCC_PITCH_MAX_SHIFT 29 ++#define AMDGPU_TILING_DCC_PITCH_MAX_MASK 0x3FFF ++#define AMDGPU_TILING_DCC_INDEPENDENT_64B_SHIFT 43 ++#define AMDGPU_TILING_DCC_INDEPENDENT_64B_MASK 0x1 ++#define AMDGPU_TILING_DCC_INDEPENDENT_128B_SHIFT 44 ++#define AMDGPU_TILING_DCC_INDEPENDENT_128B_MASK 0x1 ++#define AMDGPU_TILING_SCANOUT_SHIFT 63 ++#define AMDGPU_TILING_SCANOUT_MASK 0x1 ++#define AMDGPU_TILING_SET(field,value) (((__u64) (value) & AMDGPU_TILING_ ##field ##_MASK) << AMDGPU_TILING_ ##field ##_SHIFT) ++#define AMDGPU_TILING_GET(value,field) (((__u64) (value) >> AMDGPU_TILING_ ##field ##_SHIFT) & AMDGPU_TILING_ ##field ##_MASK) ++#define AMDGPU_GEM_METADATA_OP_SET_METADATA 1 ++#define AMDGPU_GEM_METADATA_OP_GET_METADATA 2 ++struct drm_amdgpu_gem_metadata { ++ __u32 handle; ++ __u32 op; ++ struct { ++ __u64 flags; ++ __u64 tiling_info; ++ __u32 data_size_bytes; ++ __u32 data[64]; ++ } data; ++}; ++struct drm_amdgpu_gem_mmap_in { ++ __u32 handle; ++ __u32 _pad; ++}; ++struct drm_amdgpu_gem_mmap_out { ++ __u64 addr_ptr; ++}; ++union drm_amdgpu_gem_mmap { ++ struct drm_amdgpu_gem_mmap_in in; ++ struct drm_amdgpu_gem_mmap_out out; ++}; ++struct drm_amdgpu_gem_wait_idle_in { ++ __u32 handle; ++ __u32 flags; ++ __u64 timeout; ++}; ++struct drm_amdgpu_gem_wait_idle_out { ++ __u32 status; ++ __u32 domain; ++}; ++union drm_amdgpu_gem_wait_idle { ++ struct drm_amdgpu_gem_wait_idle_in in; ++ struct drm_amdgpu_gem_wait_idle_out out; ++}; ++struct drm_amdgpu_wait_cs_in { ++ __u64 handle; ++ __u64 timeout; ++ __u32 ip_type; ++ __u32 ip_instance; ++ __u32 ring; ++ __u32 ctx_id; ++}; ++struct drm_amdgpu_wait_cs_out { ++ __u64 status; ++}; ++union drm_amdgpu_wait_cs { ++ struct drm_amdgpu_wait_cs_in in; ++ struct drm_amdgpu_wait_cs_out out; ++}; ++struct drm_amdgpu_fence { ++ __u32 ctx_id; ++ __u32 ip_type; ++ __u32 ip_instance; ++ __u32 ring; ++ __u64 seq_no; ++}; ++struct drm_amdgpu_wait_fences_in { ++ __u64 fences; ++ __u32 fence_count; ++ __u32 wait_all; ++ __u64 timeout_ns; ++}; ++struct drm_amdgpu_wait_fences_out { ++ __u32 status; ++ __u32 first_signaled; ++}; ++union drm_amdgpu_wait_fences { ++ struct drm_amdgpu_wait_fences_in in; ++ struct drm_amdgpu_wait_fences_out out; ++}; ++#define AMDGPU_GEM_OP_GET_GEM_CREATE_INFO 0 ++#define AMDGPU_GEM_OP_SET_PLACEMENT 1 ++struct drm_amdgpu_gem_op { ++ __u32 handle; ++ __u32 op; ++ __u64 value; ++}; ++#define AMDGPU_VA_OP_MAP 1 ++#define AMDGPU_VA_OP_UNMAP 2 ++#define AMDGPU_VA_OP_CLEAR 3 ++#define AMDGPU_VA_OP_REPLACE 4 ++#define AMDGPU_VM_DELAY_UPDATE (1 << 0) ++#define AMDGPU_VM_PAGE_READABLE (1 << 1) ++#define AMDGPU_VM_PAGE_WRITEABLE (1 << 2) ++#define AMDGPU_VM_PAGE_EXECUTABLE (1 << 3) ++#define AMDGPU_VM_PAGE_PRT (1 << 4) ++#define AMDGPU_VM_MTYPE_MASK (0xf << 5) ++#define AMDGPU_VM_MTYPE_DEFAULT (0 << 5) ++#define AMDGPU_VM_MTYPE_NC (1 << 5) ++#define AMDGPU_VM_MTYPE_WC (2 << 5) ++#define AMDGPU_VM_MTYPE_CC (3 << 5) ++#define AMDGPU_VM_MTYPE_UC (4 << 5) ++#define AMDGPU_VM_MTYPE_RW (5 << 5) ++struct drm_amdgpu_gem_va { ++ __u32 handle; ++ __u32 _pad; ++ __u32 operation; ++ __u32 flags; ++ __u64 va_address; ++ __u64 offset_in_bo; ++ __u64 map_size; ++}; ++#define AMDGPU_HW_IP_GFX 0 ++#define AMDGPU_HW_IP_COMPUTE 1 ++#define AMDGPU_HW_IP_DMA 2 ++#define AMDGPU_HW_IP_UVD 3 ++#define AMDGPU_HW_IP_VCE 4 ++#define AMDGPU_HW_IP_UVD_ENC 5 ++#define AMDGPU_HW_IP_VCN_DEC 6 ++#define AMDGPU_HW_IP_VCN_ENC 7 ++#define AMDGPU_HW_IP_VCN_JPEG 8 ++#define AMDGPU_HW_IP_NUM 9 ++#define AMDGPU_HW_IP_INSTANCE_MAX_COUNT 1 ++#define AMDGPU_CHUNK_ID_IB 0x01 ++#define AMDGPU_CHUNK_ID_FENCE 0x02 ++#define AMDGPU_CHUNK_ID_DEPENDENCIES 0x03 ++#define AMDGPU_CHUNK_ID_SYNCOBJ_IN 0x04 ++#define AMDGPU_CHUNK_ID_SYNCOBJ_OUT 0x05 ++#define AMDGPU_CHUNK_ID_BO_HANDLES 0x06 ++#define AMDGPU_CHUNK_ID_SCHEDULED_DEPENDENCIES 0x07 ++#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_WAIT 0x08 ++#define AMDGPU_CHUNK_ID_SYNCOBJ_TIMELINE_SIGNAL 0x09 ++struct drm_amdgpu_cs_chunk { ++ __u32 chunk_id; ++ __u32 length_dw; ++ __u64 chunk_data; ++}; ++struct drm_amdgpu_cs_in { ++ __u32 ctx_id; ++ __u32 bo_list_handle; ++ __u32 num_chunks; ++ __u32 flags; ++ __u64 chunks; ++}; ++struct drm_amdgpu_cs_out { ++ __u64 handle; ++}; ++union drm_amdgpu_cs { ++ struct drm_amdgpu_cs_in in; ++ struct drm_amdgpu_cs_out out; ++}; ++#define AMDGPU_IB_FLAG_CE (1 << 0) ++#define AMDGPU_IB_FLAG_PREAMBLE (1 << 1) ++#define AMDGPU_IB_FLAG_PREEMPT (1 << 2) ++#define AMDGPU_IB_FLAG_TC_WB_NOT_INVALIDATE (1 << 3) ++#define AMDGPU_IB_FLAG_RESET_GDS_MAX_WAVE_ID (1 << 4) ++#define AMDGPU_IB_FLAGS_SECURE (1 << 5) ++#define AMDGPU_IB_FLAG_EMIT_MEM_SYNC (1 << 6) ++struct drm_amdgpu_cs_chunk_ib { ++ __u32 _pad; ++ __u32 flags; ++ __u64 va_start; ++ __u32 ib_bytes; ++ __u32 ip_type; ++ __u32 ip_instance; ++ __u32 ring; ++}; ++struct drm_amdgpu_cs_chunk_dep { ++ __u32 ip_type; ++ __u32 ip_instance; ++ __u32 ring; ++ __u32 ctx_id; ++ __u64 handle; ++}; ++struct drm_amdgpu_cs_chunk_fence { ++ __u32 handle; ++ __u32 offset; ++}; ++struct drm_amdgpu_cs_chunk_sem { ++ __u32 handle; ++}; ++struct drm_amdgpu_cs_chunk_syncobj { ++ __u32 handle; ++ __u32 flags; ++ __u64 point; ++}; ++#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 ++#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 ++#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 ++union drm_amdgpu_fence_to_handle { ++ struct { ++ struct drm_amdgpu_fence fence; ++ __u32 what; ++ __u32 pad; ++ } in; ++ struct { ++ __u32 handle; ++ } out; ++}; ++struct drm_amdgpu_cs_chunk_data { ++ union { ++ struct drm_amdgpu_cs_chunk_ib ib_data; ++ struct drm_amdgpu_cs_chunk_fence fence_data; ++ }; ++}; ++#define AMDGPU_IDS_FLAGS_FUSION 0x1 ++#define AMDGPU_IDS_FLAGS_PREEMPTION 0x2 ++#define AMDGPU_IDS_FLAGS_TMZ 0x4 ++#define AMDGPU_INFO_ACCEL_WORKING 0x00 ++#define AMDGPU_INFO_CRTC_FROM_ID 0x01 ++#define AMDGPU_INFO_HW_IP_INFO 0x02 ++#define AMDGPU_INFO_HW_IP_COUNT 0x03 ++#define AMDGPU_INFO_TIMESTAMP 0x05 ++#define AMDGPU_INFO_FW_VERSION 0x0e ++#define AMDGPU_INFO_FW_VCE 0x1 ++#define AMDGPU_INFO_FW_UVD 0x2 ++#define AMDGPU_INFO_FW_GMC 0x03 ++#define AMDGPU_INFO_FW_GFX_ME 0x04 ++#define AMDGPU_INFO_FW_GFX_PFP 0x05 ++#define AMDGPU_INFO_FW_GFX_CE 0x06 ++#define AMDGPU_INFO_FW_GFX_RLC 0x07 ++#define AMDGPU_INFO_FW_GFX_MEC 0x08 ++#define AMDGPU_INFO_FW_SMC 0x0a ++#define AMDGPU_INFO_FW_SDMA 0x0b ++#define AMDGPU_INFO_FW_SOS 0x0c ++#define AMDGPU_INFO_FW_ASD 0x0d ++#define AMDGPU_INFO_FW_VCN 0x0e ++#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_CNTL 0x0f ++#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_GPM_MEM 0x10 ++#define AMDGPU_INFO_FW_GFX_RLC_RESTORE_LIST_SRM_MEM 0x11 ++#define AMDGPU_INFO_FW_DMCU 0x12 ++#define AMDGPU_INFO_FW_TA 0x13 ++#define AMDGPU_INFO_FW_DMCUB 0x14 ++#define AMDGPU_INFO_NUM_BYTES_MOVED 0x0f ++#define AMDGPU_INFO_VRAM_USAGE 0x10 ++#define AMDGPU_INFO_GTT_USAGE 0x11 ++#define AMDGPU_INFO_GDS_CONFIG 0x13 ++#define AMDGPU_INFO_VRAM_GTT 0x14 ++#define AMDGPU_INFO_READ_MMR_REG 0x15 ++#define AMDGPU_INFO_DEV_INFO 0x16 ++#define AMDGPU_INFO_VIS_VRAM_USAGE 0x17 ++#define AMDGPU_INFO_NUM_EVICTIONS 0x18 ++#define AMDGPU_INFO_MEMORY 0x19 ++#define AMDGPU_INFO_VCE_CLOCK_TABLE 0x1A ++#define AMDGPU_INFO_VBIOS 0x1B ++#define AMDGPU_INFO_VBIOS_SIZE 0x1 ++#define AMDGPU_INFO_VBIOS_IMAGE 0x2 ++#define AMDGPU_INFO_NUM_HANDLES 0x1C ++#define AMDGPU_INFO_SENSOR 0x1D ++#define AMDGPU_INFO_SENSOR_GFX_SCLK 0x1 ++#define AMDGPU_INFO_SENSOR_GFX_MCLK 0x2 ++#define AMDGPU_INFO_SENSOR_GPU_TEMP 0x3 ++#define AMDGPU_INFO_SENSOR_GPU_LOAD 0x4 ++#define AMDGPU_INFO_SENSOR_GPU_AVG_POWER 0x5 ++#define AMDGPU_INFO_SENSOR_VDDNB 0x6 ++#define AMDGPU_INFO_SENSOR_VDDGFX 0x7 ++#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_SCLK 0x8 ++#define AMDGPU_INFO_SENSOR_STABLE_PSTATE_GFX_MCLK 0x9 ++#define AMDGPU_INFO_NUM_VRAM_CPU_PAGE_FAULTS 0x1E ++#define AMDGPU_INFO_VRAM_LOST_COUNTER 0x1F ++#define AMDGPU_INFO_RAS_ENABLED_FEATURES 0x20 ++#define AMDGPU_INFO_RAS_ENABLED_UMC (1 << 0) ++#define AMDGPU_INFO_RAS_ENABLED_SDMA (1 << 1) ++#define AMDGPU_INFO_RAS_ENABLED_GFX (1 << 2) ++#define AMDGPU_INFO_RAS_ENABLED_MMHUB (1 << 3) ++#define AMDGPU_INFO_RAS_ENABLED_ATHUB (1 << 4) ++#define AMDGPU_INFO_RAS_ENABLED_PCIE (1 << 5) ++#define AMDGPU_INFO_RAS_ENABLED_HDP (1 << 6) ++#define AMDGPU_INFO_RAS_ENABLED_XGMI (1 << 7) ++#define AMDGPU_INFO_RAS_ENABLED_DF (1 << 8) ++#define AMDGPU_INFO_RAS_ENABLED_SMN (1 << 9) ++#define AMDGPU_INFO_RAS_ENABLED_SEM (1 << 10) ++#define AMDGPU_INFO_RAS_ENABLED_MP0 (1 << 11) ++#define AMDGPU_INFO_RAS_ENABLED_MP1 (1 << 12) ++#define AMDGPU_INFO_RAS_ENABLED_FUSE (1 << 13) ++#define AMDGPU_INFO_MMR_SE_INDEX_SHIFT 0 ++#define AMDGPU_INFO_MMR_SE_INDEX_MASK 0xff ++#define AMDGPU_INFO_MMR_SH_INDEX_SHIFT 8 ++#define AMDGPU_INFO_MMR_SH_INDEX_MASK 0xff ++struct drm_amdgpu_query_fw { ++ __u32 fw_type; ++ __u32 ip_instance; ++ __u32 index; ++ __u32 _pad; ++}; ++struct drm_amdgpu_info { ++ __u64 return_pointer; ++ __u32 return_size; ++ __u32 query; ++ union { ++ struct { ++ __u32 id; ++ __u32 _pad; ++ } mode_crtc; ++ struct { ++ __u32 type; ++ __u32 ip_instance; ++ } query_hw_ip; ++ struct { ++ __u32 dword_offset; ++ __u32 count; ++ __u32 instance; ++ __u32 flags; ++ } read_mmr_reg; ++ struct drm_amdgpu_query_fw query_fw; ++ struct { ++ __u32 type; ++ __u32 offset; ++ } vbios_info; ++ struct { ++ __u32 type; ++ } sensor_info; ++ }; ++}; ++struct drm_amdgpu_info_gds { ++ __u32 gds_gfx_partition_size; ++ __u32 compute_partition_size; ++ __u32 gds_total_size; ++ __u32 gws_per_gfx_partition; ++ __u32 gws_per_compute_partition; ++ __u32 oa_per_gfx_partition; ++ __u32 oa_per_compute_partition; ++ __u32 _pad; ++}; ++struct drm_amdgpu_info_vram_gtt { ++ __u64 vram_size; ++ __u64 vram_cpu_accessible_size; ++ __u64 gtt_size; ++}; ++struct drm_amdgpu_heap_info { ++ __u64 total_heap_size; ++ __u64 usable_heap_size; ++ __u64 heap_usage; ++ __u64 max_allocation; ++}; ++struct drm_amdgpu_memory_info { ++ struct drm_amdgpu_heap_info vram; ++ struct drm_amdgpu_heap_info cpu_accessible_vram; ++ struct drm_amdgpu_heap_info gtt; ++}; ++struct drm_amdgpu_info_firmware { ++ __u32 ver; ++ __u32 feature; ++}; ++#define AMDGPU_VRAM_TYPE_UNKNOWN 0 ++#define AMDGPU_VRAM_TYPE_GDDR1 1 ++#define AMDGPU_VRAM_TYPE_DDR2 2 ++#define AMDGPU_VRAM_TYPE_GDDR3 3 ++#define AMDGPU_VRAM_TYPE_GDDR4 4 ++#define AMDGPU_VRAM_TYPE_GDDR5 5 ++#define AMDGPU_VRAM_TYPE_HBM 6 ++#define AMDGPU_VRAM_TYPE_DDR3 7 ++#define AMDGPU_VRAM_TYPE_DDR4 8 ++#define AMDGPU_VRAM_TYPE_GDDR6 9 ++struct drm_amdgpu_info_device { ++ __u32 device_id; ++ __u32 chip_rev; ++ __u32 external_rev; ++ __u32 pci_rev; ++ __u32 family; ++ __u32 num_shader_engines; ++ __u32 num_shader_arrays_per_engine; ++ __u32 gpu_counter_freq; ++ __u64 max_engine_clock; ++ __u64 max_memory_clock; ++ __u32 cu_active_number; ++ __u32 cu_ao_mask; ++ __u32 cu_bitmap[4][4]; ++ __u32 enabled_rb_pipes_mask; ++ __u32 num_rb_pipes; ++ __u32 num_hw_gfx_contexts; ++ __u32 _pad; ++ __u64 ids_flags; ++ __u64 virtual_address_offset; ++ __u64 virtual_address_max; ++ __u32 virtual_address_alignment; ++ __u32 pte_fragment_size; ++ __u32 gart_page_size; ++ __u32 ce_ram_size; ++ __u32 vram_type; ++ __u32 vram_bit_width; ++ __u32 vce_harvest_config; ++ __u32 gc_double_offchip_lds_buf; ++ __u64 prim_buf_gpu_addr; ++ __u64 pos_buf_gpu_addr; ++ __u64 cntl_sb_buf_gpu_addr; ++ __u64 param_buf_gpu_addr; ++ __u32 prim_buf_size; ++ __u32 pos_buf_size; ++ __u32 cntl_sb_buf_size; ++ __u32 param_buf_size; ++ __u32 wave_front_size; ++ __u32 num_shader_visible_vgprs; ++ __u32 num_cu_per_sh; ++ __u32 num_tcc_blocks; ++ __u32 gs_vgt_table_depth; ++ __u32 gs_prim_buffer_depth; ++ __u32 max_gs_waves_per_vgt; ++ __u32 _pad1; ++ __u32 cu_ao_bitmap[4][4]; ++ __u64 high_va_offset; ++ __u64 high_va_max; ++ __u32 pa_sc_tile_steering_override; ++ __u64 tcc_disabled_mask; ++}; ++struct drm_amdgpu_info_hw_ip { ++ __u32 hw_ip_version_major; ++ __u32 hw_ip_version_minor; ++ __u64 capabilities_flags; ++ __u32 ib_start_alignment; ++ __u32 ib_size_alignment; ++ __u32 available_rings; ++ __u32 _pad; ++}; ++struct drm_amdgpu_info_num_handles { ++ __u32 uvd_max_handles; ++ __u32 uvd_used_handles; ++}; ++#define AMDGPU_VCE_CLOCK_TABLE_ENTRIES 6 ++struct drm_amdgpu_info_vce_clock_table_entry { ++ __u32 sclk; ++ __u32 mclk; ++ __u32 eclk; ++ __u32 pad; ++}; ++struct drm_amdgpu_info_vce_clock_table { ++ struct drm_amdgpu_info_vce_clock_table_entry entries[AMDGPU_VCE_CLOCK_TABLE_ENTRIES]; ++ __u32 num_valid_entries; ++ __u32 pad; ++}; ++#define AMDGPU_FAMILY_UNKNOWN 0 ++#define AMDGPU_FAMILY_SI 110 ++#define AMDGPU_FAMILY_CI 120 ++#define AMDGPU_FAMILY_KV 125 ++#define AMDGPU_FAMILY_VI 130 ++#define AMDGPU_FAMILY_CZ 135 ++#define AMDGPU_FAMILY_AI 141 ++#define AMDGPU_FAMILY_RV 142 ++#define AMDGPU_FAMILY_NV 143 ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/armada_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/armada_drm.h +new file mode 100644 +index 0000000..aabd23b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/armada_drm.h +@@ -0,0 +1,52 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef DRM_ARMADA_IOCTL_H ++#define DRM_ARMADA_IOCTL_H ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_ARMADA_GEM_CREATE 0x00 ++#define DRM_ARMADA_GEM_MMAP 0x02 ++#define DRM_ARMADA_GEM_PWRITE 0x03 ++#define ARMADA_IOCTL(dir,name,str) DRM_ ##dir(DRM_COMMAND_BASE + DRM_ARMADA_ ##name, struct drm_armada_ ##str) ++struct drm_armada_gem_create { ++ __u32 handle; ++ __u32 size; ++}; ++#define DRM_IOCTL_ARMADA_GEM_CREATE ARMADA_IOCTL(IOWR, GEM_CREATE, gem_create) ++struct drm_armada_gem_mmap { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 addr; ++}; ++#define DRM_IOCTL_ARMADA_GEM_MMAP ARMADA_IOCTL(IOWR, GEM_MMAP, gem_mmap) ++struct drm_armada_gem_pwrite { ++ __u64 ptr; ++ __u32 handle; ++ __u32 offset; ++ __u32 size; ++}; ++#define DRM_IOCTL_ARMADA_GEM_PWRITE ARMADA_IOCTL(IOW, GEM_PWRITE, gem_pwrite) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/drm.h b/build/ohos/ohos-sysroot/usr/include/drm/drm.h +new file mode 100644 +index 0000000..878e899 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/drm.h +@@ -0,0 +1,643 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _DRM_H_ ++#define _DRM_H_ ++#ifdef __linux__ ++#include ++#include ++typedef unsigned int drm_handle_t; ++#else ++#include ++#include ++#include ++typedef int8_t __s8; ++typedef uint8_t __u8; ++typedef int16_t __s16; ++typedef uint16_t __u16; ++typedef int32_t __s32; ++typedef uint32_t __u32; ++typedef int64_t __s64; ++typedef uint64_t __u64; ++typedef size_t __kernel_size_t; ++typedef unsigned long drm_handle_t; ++#endif ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_NAME "drm" ++#define DRM_MIN_ORDER 5 ++#define DRM_MAX_ORDER 22 ++#define DRM_RAM_PERCENT 10 ++#define _DRM_LOCK_HELD 0x80000000U ++#define _DRM_LOCK_CONT 0x40000000U ++#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD) ++#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT) ++#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD | _DRM_LOCK_CONT)) ++typedef unsigned int drm_context_t; ++typedef unsigned int drm_drawable_t; ++typedef unsigned int drm_magic_t; ++struct drm_clip_rect { ++ unsigned short x1; ++ unsigned short y1; ++ unsigned short x2; ++ unsigned short y2; ++}; ++struct drm_drawable_info { ++ unsigned int num_rects; ++ struct drm_clip_rect * rects; ++}; ++struct drm_tex_region { ++ unsigned char next; ++ unsigned char prev; ++ unsigned char in_use; ++ unsigned char padding; ++ unsigned int age; ++}; ++struct drm_hw_lock { ++ __volatile__ unsigned int lock; ++ char padding[60]; ++}; ++struct drm_version { ++ int version_major; ++ int version_minor; ++ int version_patchlevel; ++ __kernel_size_t name_len; ++ char __user * name; ++ __kernel_size_t date_len; ++ char __user * date; ++ __kernel_size_t desc_len; ++ char __user * desc; ++}; ++struct drm_unique { ++ __kernel_size_t unique_len; ++ char __user * unique; ++}; ++struct drm_list { ++ int count; ++ struct drm_version __user * version; ++}; ++struct drm_block { ++ int unused; ++}; ++struct drm_control { ++ enum { ++ DRM_ADD_COMMAND, ++ DRM_RM_COMMAND, ++ DRM_INST_HANDLER, ++ DRM_UNINST_HANDLER ++ } func; ++ int irq; ++}; ++enum drm_map_type { ++ _DRM_FRAME_BUFFER = 0, ++ _DRM_REGISTERS = 1, ++ _DRM_SHM = 2, ++ _DRM_AGP = 3, ++ _DRM_SCATTER_GATHER = 4, ++ _DRM_CONSISTENT = 5 ++}; ++enum drm_map_flags { ++ _DRM_RESTRICTED = 0x01, ++ _DRM_READ_ONLY = 0x02, ++ _DRM_LOCKED = 0x04, ++ _DRM_KERNEL = 0x08, ++ _DRM_WRITE_COMBINING = 0x10, ++ _DRM_CONTAINS_LOCK = 0x20, ++ _DRM_REMOVABLE = 0x40, ++ _DRM_DRIVER = 0x80 ++}; ++struct drm_ctx_priv_map { ++ unsigned int ctx_id; ++ void * handle; ++}; ++struct drm_map { ++ unsigned long offset; ++ unsigned long size; ++ enum drm_map_type type; ++ enum drm_map_flags flags; ++ void * handle; ++ int mtrr; ++}; ++struct drm_client { ++ int idx; ++ int auth; ++ unsigned long pid; ++ unsigned long uid; ++ unsigned long magic; ++ unsigned long iocs; ++}; ++enum drm_stat_type { ++ _DRM_STAT_LOCK, ++ _DRM_STAT_OPENS, ++ _DRM_STAT_CLOSES, ++ _DRM_STAT_IOCTLS, ++ _DRM_STAT_LOCKS, ++ _DRM_STAT_UNLOCKS, ++ _DRM_STAT_VALUE, ++ _DRM_STAT_BYTE, ++ _DRM_STAT_COUNT, ++ _DRM_STAT_IRQ, ++ _DRM_STAT_PRIMARY, ++ _DRM_STAT_SECONDARY, ++ _DRM_STAT_DMA, ++ _DRM_STAT_SPECIAL, ++ _DRM_STAT_MISSED ++}; ++struct drm_stats { ++ unsigned long count; ++ struct { ++ unsigned long value; ++ enum drm_stat_type type; ++ } data[15]; ++}; ++enum drm_lock_flags { ++ _DRM_LOCK_READY = 0x01, ++ _DRM_LOCK_QUIESCENT = 0x02, ++ _DRM_LOCK_FLUSH = 0x04, ++ _DRM_LOCK_FLUSH_ALL = 0x08, ++ _DRM_HALT_ALL_QUEUES = 0x10, ++ _DRM_HALT_CUR_QUEUES = 0x20 ++}; ++struct drm_lock { ++ int context; ++ enum drm_lock_flags flags; ++}; ++enum drm_dma_flags { ++ _DRM_DMA_BLOCK = 0x01, ++ _DRM_DMA_WHILE_LOCKED = 0x02, ++ _DRM_DMA_PRIORITY = 0x04, ++ _DRM_DMA_WAIT = 0x10, ++ _DRM_DMA_SMALLER_OK = 0x20, ++ _DRM_DMA_LARGER_OK = 0x40 ++}; ++struct drm_buf_desc { ++ int count; ++ int size; ++ int low_mark; ++ int high_mark; ++ enum { ++ _DRM_PAGE_ALIGN = 0x01, ++ _DRM_AGP_BUFFER = 0x02, ++ _DRM_SG_BUFFER = 0x04, ++ _DRM_FB_BUFFER = 0x08, ++ _DRM_PCI_BUFFER_RO = 0x10 ++ } flags; ++ unsigned long agp_start; ++}; ++struct drm_buf_info { ++ int count; ++ struct drm_buf_desc __user * list; ++}; ++struct drm_buf_free { ++ int count; ++ int __user * list; ++}; ++struct drm_buf_pub { ++ int idx; ++ int total; ++ int used; ++ void __user * address; ++}; ++struct drm_buf_map { ++ int count; ++#ifdef __cplusplus ++ void __user * virt; ++#else ++ void __user * __linux_virtual; ++#endif ++ struct drm_buf_pub __user * list; ++}; ++struct drm_dma { ++ int context; ++ int send_count; ++ int __user * send_indices; ++ int __user * send_sizes; ++ enum drm_dma_flags flags; ++ int request_count; ++ int request_size; ++ int __user * request_indices; ++ int __user * request_sizes; ++ int granted_count; ++}; ++enum drm_ctx_flags { ++ _DRM_CONTEXT_PRESERVED = 0x01, ++ _DRM_CONTEXT_2DONLY = 0x02 ++}; ++struct drm_ctx { ++ drm_context_t handle; ++ enum drm_ctx_flags flags; ++}; ++struct drm_ctx_res { ++ int count; ++ struct drm_ctx __user * contexts; ++}; ++struct drm_draw { ++ drm_drawable_t handle; ++}; ++typedef enum { ++ DRM_DRAWABLE_CLIPRECTS ++} drm_drawable_info_type_t; ++struct drm_update_draw { ++ drm_drawable_t handle; ++ unsigned int type; ++ unsigned int num; ++ unsigned long long data; ++}; ++struct drm_auth { ++ drm_magic_t magic; ++}; ++struct drm_irq_busid { ++ int irq; ++ int busnum; ++ int devnum; ++ int funcnum; ++}; ++enum drm_vblank_seq_type { ++ _DRM_VBLANK_ABSOLUTE = 0x0, ++ _DRM_VBLANK_RELATIVE = 0x1, ++ _DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e, ++ _DRM_VBLANK_EVENT = 0x4000000, ++ _DRM_VBLANK_FLIP = 0x8000000, ++ _DRM_VBLANK_NEXTONMISS = 0x10000000, ++ _DRM_VBLANK_SECONDARY = 0x20000000, ++ _DRM_VBLANK_SIGNAL = 0x40000000 ++}; ++#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1 ++#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE) ++#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | _DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS) ++struct drm_wait_vblank_request { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ unsigned long signal; ++}; ++struct drm_wait_vblank_reply { ++ enum drm_vblank_seq_type type; ++ unsigned int sequence; ++ long tval_sec; ++ long tval_usec; ++}; ++union drm_wait_vblank { ++ struct drm_wait_vblank_request request; ++ struct drm_wait_vblank_reply reply; ++}; ++#define _DRM_PRE_MODESET 1 ++#define _DRM_POST_MODESET 2 ++struct drm_modeset_ctl { ++ __u32 crtc; ++ __u32 cmd; ++}; ++struct drm_agp_mode { ++ unsigned long mode; ++}; ++struct drm_agp_buffer { ++ unsigned long size; ++ unsigned long handle; ++ unsigned long type; ++ unsigned long physical; ++}; ++struct drm_agp_binding { ++ unsigned long handle; ++ unsigned long offset; ++}; ++struct drm_agp_info { ++ int agp_version_major; ++ int agp_version_minor; ++ unsigned long mode; ++ unsigned long aperture_base; ++ unsigned long aperture_size; ++ unsigned long memory_allowed; ++ unsigned long memory_used; ++ unsigned short id_vendor; ++ unsigned short id_device; ++}; ++struct drm_scatter_gather { ++ unsigned long size; ++ unsigned long handle; ++}; ++struct drm_set_version { ++ int drm_di_major; ++ int drm_di_minor; ++ int drm_dd_major; ++ int drm_dd_minor; ++}; ++struct drm_gem_close { ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_gem_flink { ++ __u32 handle; ++ __u32 name; ++}; ++struct drm_gem_open { ++ __u32 name; ++ __u32 handle; ++ __u64 size; ++}; ++#define DRM_CAP_DUMB_BUFFER 0x1 ++#define DRM_CAP_VBLANK_HIGH_CRTC 0x2 ++#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3 ++#define DRM_CAP_DUMB_PREFER_SHADOW 0x4 ++#define DRM_CAP_PRIME 0x5 ++#define DRM_PRIME_CAP_IMPORT 0x1 ++#define DRM_PRIME_CAP_EXPORT 0x2 ++#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 ++#define DRM_CAP_ASYNC_PAGE_FLIP 0x7 ++#define DRM_CAP_CURSOR_WIDTH 0x8 ++#define DRM_CAP_CURSOR_HEIGHT 0x9 ++#define DRM_CAP_ADDFB2_MODIFIERS 0x10 ++#define DRM_CAP_PAGE_FLIP_TARGET 0x11 ++#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12 ++#define DRM_CAP_SYNCOBJ 0x13 ++#define DRM_CAP_SYNCOBJ_TIMELINE 0x14 ++struct drm_get_cap { ++ __u64 capability; ++ __u64 value; ++}; ++#define DRM_CLIENT_CAP_STEREO_3D 1 ++#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2 ++#define DRM_CLIENT_CAP_ATOMIC 3 ++#define DRM_CLIENT_CAP_ASPECT_RATIO 4 ++#define DRM_CLIENT_CAP_WRITEBACK_CONNECTORS 5 ++struct drm_set_client_cap { ++ __u64 capability; ++ __u64 value; ++}; ++#define DRM_RDWR O_RDWR ++#define DRM_CLOEXEC O_CLOEXEC ++struct drm_prime_handle { ++ __u32 handle; ++ __u32 flags; ++ __s32 fd; ++}; ++struct drm_syncobj_create { ++ __u32 handle; ++#define DRM_SYNCOBJ_CREATE_SIGNALED (1 << 0) ++ __u32 flags; ++}; ++struct drm_syncobj_destroy { ++ __u32 handle; ++ __u32 pad; ++}; ++#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0) ++#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0) ++struct drm_syncobj_handle { ++ __u32 handle; ++ __u32 flags; ++ __s32 fd; ++ __u32 pad; ++}; ++struct drm_syncobj_transfer { ++ __u32 src_handle; ++ __u32 dst_handle; ++ __u64 src_point; ++ __u64 dst_point; ++ __u32 flags; ++ __u32 pad; ++}; ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_ALL (1 << 0) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT (1 << 1) ++#define DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE (1 << 2) ++struct drm_syncobj_wait { ++ __u64 handles; ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; ++ __u32 pad; ++}; ++struct drm_syncobj_timeline_wait { ++ __u64 handles; ++ __u64 points; ++ __s64 timeout_nsec; ++ __u32 count_handles; ++ __u32 flags; ++ __u32 first_signaled; ++ __u32 pad; ++}; ++struct drm_syncobj_array { ++ __u64 handles; ++ __u32 count_handles; ++ __u32 pad; ++}; ++#define DRM_SYNCOBJ_QUERY_FLAGS_LAST_SUBMITTED (1 << 0) ++struct drm_syncobj_timeline_array { ++ __u64 handles; ++ __u64 points; ++ __u32 count_handles; ++ __u32 flags; ++}; ++struct drm_crtc_get_sequence { ++ __u32 crtc_id; ++ __u32 active; ++ __u64 sequence; ++ __s64 sequence_ns; ++}; ++#define DRM_CRTC_SEQUENCE_RELATIVE 0x00000001 ++#define DRM_CRTC_SEQUENCE_NEXT_ON_MISS 0x00000002 ++struct drm_crtc_queue_sequence { ++ __u32 crtc_id; ++ __u32 flags; ++ __u64 sequence; ++ __u64 user_data; ++}; ++#ifdef __cplusplus ++} ++#endif ++#include "drm_mode.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_IOCTL_BASE 'd' ++#define DRM_IO(nr) _IO(DRM_IOCTL_BASE, nr) ++#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE, nr, type) ++#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE, nr, type) ++#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE, nr, type) ++#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version) ++#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique) ++#define DRM_IOCTL_GET_MAGIC DRM_IOR(0x02, struct drm_auth) ++#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid) ++#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map) ++#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client) ++#define DRM_IOCTL_GET_STATS DRM_IOR(0x06, struct drm_stats) ++#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version) ++#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl) ++#define DRM_IOCTL_GEM_CLOSE DRM_IOW(0x09, struct drm_gem_close) ++#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink) ++#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open) ++#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap) ++#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW(0x0d, struct drm_set_client_cap) ++#define DRM_IOCTL_SET_UNIQUE DRM_IOW(0x10, struct drm_unique) ++#define DRM_IOCTL_AUTH_MAGIC DRM_IOW(0x11, struct drm_auth) ++#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block) ++#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block) ++#define DRM_IOCTL_CONTROL DRM_IOW(0x14, struct drm_control) ++#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map) ++#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc) ++#define DRM_IOCTL_MARK_BUFS DRM_IOW(0x17, struct drm_buf_desc) ++#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info) ++#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map) ++#define DRM_IOCTL_FREE_BUFS DRM_IOW(0x1a, struct drm_buf_free) ++#define DRM_IOCTL_RM_MAP DRM_IOW(0x1b, struct drm_map) ++#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW(0x1c, struct drm_ctx_priv_map) ++#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map) ++#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e) ++#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f) ++#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx) ++#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx) ++#define DRM_IOCTL_MOD_CTX DRM_IOW(0x22, struct drm_ctx) ++#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx) ++#define DRM_IOCTL_SWITCH_CTX DRM_IOW(0x24, struct drm_ctx) ++#define DRM_IOCTL_NEW_CTX DRM_IOW(0x25, struct drm_ctx) ++#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res) ++#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw) ++#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw) ++#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma) ++#define DRM_IOCTL_LOCK DRM_IOW(0x2a, struct drm_lock) ++#define DRM_IOCTL_UNLOCK DRM_IOW(0x2b, struct drm_lock) ++#define DRM_IOCTL_FINISH DRM_IOW(0x2c, struct drm_lock) ++#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle) ++#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle) ++#define DRM_IOCTL_AGP_ACQUIRE DRM_IO(0x30) ++#define DRM_IOCTL_AGP_RELEASE DRM_IO(0x31) ++#define DRM_IOCTL_AGP_ENABLE DRM_IOW(0x32, struct drm_agp_mode) ++#define DRM_IOCTL_AGP_INFO DRM_IOR(0x33, struct drm_agp_info) ++#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_FREE DRM_IOW(0x35, struct drm_agp_buffer) ++#define DRM_IOCTL_AGP_BIND DRM_IOW(0x36, struct drm_agp_binding) ++#define DRM_IOCTL_AGP_UNBIND DRM_IOW(0x37, struct drm_agp_binding) ++#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather) ++#define DRM_IOCTL_SG_FREE DRM_IOW(0x39, struct drm_scatter_gather) ++#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank) ++#define DRM_IOCTL_CRTC_GET_SEQUENCE DRM_IOWR(0x3b, struct drm_crtc_get_sequence) ++#define DRM_IOCTL_CRTC_QUEUE_SEQUENCE DRM_IOWR(0x3c, struct drm_crtc_queue_sequence) ++#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw) ++#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res) ++#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc) ++#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor) ++#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut) ++#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder) ++#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector) ++#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) ++#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) ++#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property) ++#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property) ++#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob) ++#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd) ++#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd) ++#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int) ++#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip) ++#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd) ++#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb) ++#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb) ++#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb) ++#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res) ++#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) ++#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) ++#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) ++#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) ++#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) ++#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2) ++#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic) ++#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob) ++#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob) ++#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create) ++#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy) ++#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle) ++#define DRM_IOCTL_SYNCOBJ_WAIT DRM_IOWR(0xC3, struct drm_syncobj_wait) ++#define DRM_IOCTL_SYNCOBJ_RESET DRM_IOWR(0xC4, struct drm_syncobj_array) ++#define DRM_IOCTL_SYNCOBJ_SIGNAL DRM_IOWR(0xC5, struct drm_syncobj_array) ++#define DRM_IOCTL_MODE_CREATE_LEASE DRM_IOWR(0xC6, struct drm_mode_create_lease) ++#define DRM_IOCTL_MODE_LIST_LESSEES DRM_IOWR(0xC7, struct drm_mode_list_lessees) ++#define DRM_IOCTL_MODE_GET_LEASE DRM_IOWR(0xC8, struct drm_mode_get_lease) ++#define DRM_IOCTL_MODE_REVOKE_LEASE DRM_IOWR(0xC9, struct drm_mode_revoke_lease) ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT DRM_IOWR(0xCA, struct drm_syncobj_timeline_wait) ++#define DRM_IOCTL_SYNCOBJ_QUERY DRM_IOWR(0xCB, struct drm_syncobj_timeline_array) ++#define DRM_IOCTL_SYNCOBJ_TRANSFER DRM_IOWR(0xCC, struct drm_syncobj_transfer) ++#define DRM_IOCTL_SYNCOBJ_TIMELINE_SIGNAL DRM_IOWR(0xCD, struct drm_syncobj_timeline_array) ++#define DRM_IOCTL_MODE_GETFB2 DRM_IOWR(0xCE, struct drm_mode_fb_cmd2) ++#define DRM_COMMAND_BASE 0x40 ++#define DRM_COMMAND_END 0xA0 ++struct drm_event { ++ __u32 type; ++ __u32 length; ++}; ++#define DRM_EVENT_VBLANK 0x01 ++#define DRM_EVENT_FLIP_COMPLETE 0x02 ++#define DRM_EVENT_CRTC_SEQUENCE 0x03 ++struct drm_event_vblank { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++ __u32 sequence; ++ __u32 crtc_id; ++}; ++struct drm_event_crtc_sequence { ++ struct drm_event base; ++ __u64 user_data; ++ __s64 time_ns; ++ __u64 sequence; ++}; ++typedef struct drm_clip_rect drm_clip_rect_t; ++typedef struct drm_drawable_info drm_drawable_info_t; ++typedef struct drm_tex_region drm_tex_region_t; ++typedef struct drm_hw_lock drm_hw_lock_t; ++typedef struct drm_version drm_version_t; ++typedef struct drm_unique drm_unique_t; ++typedef struct drm_list drm_list_t; ++typedef struct drm_block drm_block_t; ++typedef struct drm_control drm_control_t; ++typedef enum drm_map_type drm_map_type_t; ++typedef enum drm_map_flags drm_map_flags_t; ++typedef struct drm_ctx_priv_map drm_ctx_priv_map_t; ++typedef struct drm_map drm_map_t; ++typedef struct drm_client drm_client_t; ++typedef enum drm_stat_type drm_stat_type_t; ++typedef struct drm_stats drm_stats_t; ++typedef enum drm_lock_flags drm_lock_flags_t; ++typedef struct drm_lock drm_lock_t; ++typedef enum drm_dma_flags drm_dma_flags_t; ++typedef struct drm_buf_desc drm_buf_desc_t; ++typedef struct drm_buf_info drm_buf_info_t; ++typedef struct drm_buf_free drm_buf_free_t; ++typedef struct drm_buf_pub drm_buf_pub_t; ++typedef struct drm_buf_map drm_buf_map_t; ++typedef struct drm_dma drm_dma_t; ++typedef union drm_wait_vblank drm_wait_vblank_t; ++typedef struct drm_agp_mode drm_agp_mode_t; ++typedef enum drm_ctx_flags drm_ctx_flags_t; ++typedef struct drm_ctx drm_ctx_t; ++typedef struct drm_ctx_res drm_ctx_res_t; ++typedef struct drm_draw drm_draw_t; ++typedef struct drm_update_draw drm_update_draw_t; ++typedef struct drm_auth drm_auth_t; ++typedef struct drm_irq_busid drm_irq_busid_t; ++typedef enum drm_vblank_seq_type drm_vblank_seq_type_t; ++typedef struct drm_agp_buffer drm_agp_buffer_t; ++typedef struct drm_agp_binding drm_agp_binding_t; ++typedef struct drm_agp_info drm_agp_info_t; ++typedef struct drm_scatter_gather drm_scatter_gather_t; ++typedef struct drm_set_version drm_set_version_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/drm_fourcc.h b/build/ohos/ohos-sysroot/usr/include/drm/drm_fourcc.h +new file mode 100644 +index 0000000..794a9e9 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/drm_fourcc.h +@@ -0,0 +1,216 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef DRM_FOURCC_H ++#define DRM_FOURCC_H ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define fourcc_code(a,b,c,d) ((__u32) (a) | ((__u32) (b) << 8) | ((__u32) (c) << 16) | ((__u32) (d) << 24)) ++#define DRM_FORMAT_BIG_ENDIAN (1U << 31) ++#define DRM_FORMAT_INVALID 0 ++#define DRM_FORMAT_C8 fourcc_code('C', '8', ' ', ' ') ++#define DRM_FORMAT_R8 fourcc_code('R', '8', ' ', ' ') ++#define DRM_FORMAT_R16 fourcc_code('R', '1', '6', ' ') ++#define DRM_FORMAT_RG88 fourcc_code('R', 'G', '8', '8') ++#define DRM_FORMAT_GR88 fourcc_code('G', 'R', '8', '8') ++#define DRM_FORMAT_RG1616 fourcc_code('R', 'G', '3', '2') ++#define DRM_FORMAT_GR1616 fourcc_code('G', 'R', '3', '2') ++#define DRM_FORMAT_RGB332 fourcc_code('R', 'G', 'B', '8') ++#define DRM_FORMAT_BGR233 fourcc_code('B', 'G', 'R', '8') ++#define DRM_FORMAT_XRGB4444 fourcc_code('X', 'R', '1', '2') ++#define DRM_FORMAT_XBGR4444 fourcc_code('X', 'B', '1', '2') ++#define DRM_FORMAT_RGBX4444 fourcc_code('R', 'X', '1', '2') ++#define DRM_FORMAT_BGRX4444 fourcc_code('B', 'X', '1', '2') ++#define DRM_FORMAT_ARGB4444 fourcc_code('A', 'R', '1', '2') ++#define DRM_FORMAT_ABGR4444 fourcc_code('A', 'B', '1', '2') ++#define DRM_FORMAT_RGBA4444 fourcc_code('R', 'A', '1', '2') ++#define DRM_FORMAT_BGRA4444 fourcc_code('B', 'A', '1', '2') ++#define DRM_FORMAT_XRGB1555 fourcc_code('X', 'R', '1', '5') ++#define DRM_FORMAT_XBGR1555 fourcc_code('X', 'B', '1', '5') ++#define DRM_FORMAT_RGBX5551 fourcc_code('R', 'X', '1', '5') ++#define DRM_FORMAT_BGRX5551 fourcc_code('B', 'X', '1', '5') ++#define DRM_FORMAT_ARGB1555 fourcc_code('A', 'R', '1', '5') ++#define DRM_FORMAT_ABGR1555 fourcc_code('A', 'B', '1', '5') ++#define DRM_FORMAT_RGBA5551 fourcc_code('R', 'A', '1', '5') ++#define DRM_FORMAT_BGRA5551 fourcc_code('B', 'A', '1', '5') ++#define DRM_FORMAT_RGB565 fourcc_code('R', 'G', '1', '6') ++#define DRM_FORMAT_BGR565 fourcc_code('B', 'G', '1', '6') ++#define DRM_FORMAT_RGB888 fourcc_code('R', 'G', '2', '4') ++#define DRM_FORMAT_BGR888 fourcc_code('B', 'G', '2', '4') ++#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') ++#define DRM_FORMAT_XBGR8888 fourcc_code('X', 'B', '2', '4') ++#define DRM_FORMAT_RGBX8888 fourcc_code('R', 'X', '2', '4') ++#define DRM_FORMAT_BGRX8888 fourcc_code('B', 'X', '2', '4') ++#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') ++#define DRM_FORMAT_ABGR8888 fourcc_code('A', 'B', '2', '4') ++#define DRM_FORMAT_RGBA8888 fourcc_code('R', 'A', '2', '4') ++#define DRM_FORMAT_BGRA8888 fourcc_code('B', 'A', '2', '4') ++#define DRM_FORMAT_XRGB2101010 fourcc_code('X', 'R', '3', '0') ++#define DRM_FORMAT_XBGR2101010 fourcc_code('X', 'B', '3', '0') ++#define DRM_FORMAT_RGBX1010102 fourcc_code('R', 'X', '3', '0') ++#define DRM_FORMAT_BGRX1010102 fourcc_code('B', 'X', '3', '0') ++#define DRM_FORMAT_ARGB2101010 fourcc_code('A', 'R', '3', '0') ++#define DRM_FORMAT_ABGR2101010 fourcc_code('A', 'B', '3', '0') ++#define DRM_FORMAT_RGBA1010102 fourcc_code('R', 'A', '3', '0') ++#define DRM_FORMAT_BGRA1010102 fourcc_code('B', 'A', '3', '0') ++#define DRM_FORMAT_XRGB16161616F fourcc_code('X', 'R', '4', 'H') ++#define DRM_FORMAT_XBGR16161616F fourcc_code('X', 'B', '4', 'H') ++#define DRM_FORMAT_ARGB16161616F fourcc_code('A', 'R', '4', 'H') ++#define DRM_FORMAT_ABGR16161616F fourcc_code('A', 'B', '4', 'H') ++#define DRM_FORMAT_YUYV fourcc_code('Y', 'U', 'Y', 'V') ++#define DRM_FORMAT_YVYU fourcc_code('Y', 'V', 'Y', 'U') ++#define DRM_FORMAT_UYVY fourcc_code('U', 'Y', 'V', 'Y') ++#define DRM_FORMAT_VYUY fourcc_code('V', 'Y', 'U', 'Y') ++#define DRM_FORMAT_AYUV fourcc_code('A', 'Y', 'U', 'V') ++#define DRM_FORMAT_XYUV8888 fourcc_code('X', 'Y', 'U', 'V') ++#define DRM_FORMAT_VUY888 fourcc_code('V', 'U', '2', '4') ++#define DRM_FORMAT_VUY101010 fourcc_code('V', 'U', '3', '0') ++#define DRM_FORMAT_Y210 fourcc_code('Y', '2', '1', '0') ++#define DRM_FORMAT_Y212 fourcc_code('Y', '2', '1', '2') ++#define DRM_FORMAT_Y216 fourcc_code('Y', '2', '1', '6') ++#define DRM_FORMAT_Y410 fourcc_code('Y', '4', '1', '0') ++#define DRM_FORMAT_Y412 fourcc_code('Y', '4', '1', '2') ++#define DRM_FORMAT_Y416 fourcc_code('Y', '4', '1', '6') ++#define DRM_FORMAT_XVYU2101010 fourcc_code('X', 'V', '3', '0') ++#define DRM_FORMAT_XVYU12_16161616 fourcc_code('X', 'V', '3', '6') ++#define DRM_FORMAT_XVYU16161616 fourcc_code('X', 'V', '4', '8') ++#define DRM_FORMAT_Y0L0 fourcc_code('Y', '0', 'L', '0') ++#define DRM_FORMAT_X0L0 fourcc_code('X', '0', 'L', '0') ++#define DRM_FORMAT_Y0L2 fourcc_code('Y', '0', 'L', '2') ++#define DRM_FORMAT_X0L2 fourcc_code('X', '0', 'L', '2') ++#define DRM_FORMAT_YUV420_8BIT fourcc_code('Y', 'U', '0', '8') ++#define DRM_FORMAT_YUV420_10BIT fourcc_code('Y', 'U', '1', '0') ++#define DRM_FORMAT_XRGB8888_A8 fourcc_code('X', 'R', 'A', '8') ++#define DRM_FORMAT_XBGR8888_A8 fourcc_code('X', 'B', 'A', '8') ++#define DRM_FORMAT_RGBX8888_A8 fourcc_code('R', 'X', 'A', '8') ++#define DRM_FORMAT_BGRX8888_A8 fourcc_code('B', 'X', 'A', '8') ++#define DRM_FORMAT_RGB888_A8 fourcc_code('R', '8', 'A', '8') ++#define DRM_FORMAT_BGR888_A8 fourcc_code('B', '8', 'A', '8') ++#define DRM_FORMAT_RGB565_A8 fourcc_code('R', '5', 'A', '8') ++#define DRM_FORMAT_BGR565_A8 fourcc_code('B', '5', 'A', '8') ++#define DRM_FORMAT_NV12 fourcc_code('N', 'V', '1', '2') ++#define DRM_FORMAT_NV21 fourcc_code('N', 'V', '2', '1') ++#define DRM_FORMAT_NV16 fourcc_code('N', 'V', '1', '6') ++#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') ++#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') ++#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') ++#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') ++#define DRM_FORMAT_P210 fourcc_code('P', '2', '1', '0') ++#define DRM_FORMAT_P010 fourcc_code('P', '0', '1', '0') ++#define DRM_FORMAT_P012 fourcc_code('P', '0', '1', '2') ++#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') ++#define DRM_FORMAT_Q410 fourcc_code('Q', '4', '1', '0') ++#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1') ++#define DRM_FORMAT_YUV410 fourcc_code('Y', 'U', 'V', '9') ++#define DRM_FORMAT_YVU410 fourcc_code('Y', 'V', 'U', '9') ++#define DRM_FORMAT_YUV411 fourcc_code('Y', 'U', '1', '1') ++#define DRM_FORMAT_YVU411 fourcc_code('Y', 'V', '1', '1') ++#define DRM_FORMAT_YUV420 fourcc_code('Y', 'U', '1', '2') ++#define DRM_FORMAT_YVU420 fourcc_code('Y', 'V', '1', '2') ++#define DRM_FORMAT_YUV422 fourcc_code('Y', 'U', '1', '6') ++#define DRM_FORMAT_YVU422 fourcc_code('Y', 'V', '1', '6') ++#define DRM_FORMAT_YUV444 fourcc_code('Y', 'U', '2', '4') ++#define DRM_FORMAT_YVU444 fourcc_code('Y', 'V', '2', '4') ++#define DRM_FORMAT_MOD_NONE 0 ++#define DRM_FORMAT_MOD_VENDOR_NONE 0 ++#define DRM_FORMAT_MOD_VENDOR_INTEL 0x01 ++#define DRM_FORMAT_MOD_VENDOR_AMD 0x02 ++#define DRM_FORMAT_MOD_VENDOR_NVIDIA 0x03 ++#define DRM_FORMAT_MOD_VENDOR_SAMSUNG 0x04 ++#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05 ++#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06 ++#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07 ++#define DRM_FORMAT_MOD_VENDOR_ARM 0x08 ++#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 ++#define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a ++#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1) ++#define fourcc_mod_code(vendor,val) ((((__u64) DRM_FORMAT_MOD_VENDOR_ ##vendor) << 56) | ((val) & 0x00ffffffffffffffULL)) ++#define DRM_FORMAT_MOD_GENERIC_16_16_TILE DRM_FORMAT_MOD_SAMSUNG_16_16_TILE ++#define DRM_FORMAT_MOD_INVALID fourcc_mod_code(NONE, DRM_FORMAT_RESERVED) ++#define DRM_FORMAT_MOD_LINEAR fourcc_mod_code(NONE, 0) ++#define I915_FORMAT_MOD_X_TILED fourcc_mod_code(INTEL, 1) ++#define I915_FORMAT_MOD_Y_TILED fourcc_mod_code(INTEL, 2) ++#define I915_FORMAT_MOD_Yf_TILED fourcc_mod_code(INTEL, 3) ++#define I915_FORMAT_MOD_Y_TILED_CCS fourcc_mod_code(INTEL, 4) ++#define I915_FORMAT_MOD_Yf_TILED_CCS fourcc_mod_code(INTEL, 5) ++#define I915_FORMAT_MOD_Y_TILED_GEN12_RC_CCS fourcc_mod_code(INTEL, 6) ++#define I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS fourcc_mod_code(INTEL, 7) ++#define DRM_FORMAT_MOD_SAMSUNG_64_32_TILE fourcc_mod_code(SAMSUNG, 1) ++#define DRM_FORMAT_MOD_SAMSUNG_16_16_TILE fourcc_mod_code(SAMSUNG, 2) ++#define DRM_FORMAT_MOD_QCOM_COMPRESSED fourcc_mod_code(QCOM, 1) ++#define DRM_FORMAT_MOD_VIVANTE_TILED fourcc_mod_code(VIVANTE, 1) ++#define DRM_FORMAT_MOD_VIVANTE_SUPER_TILED fourcc_mod_code(VIVANTE, 2) ++#define DRM_FORMAT_MOD_VIVANTE_SPLIT_TILED fourcc_mod_code(VIVANTE, 3) ++#define DRM_FORMAT_MOD_VIVANTE_SPLIT_SUPER_TILED fourcc_mod_code(VIVANTE, 4) ++#define DRM_FORMAT_MOD_NVIDIA_TEGRA_TILED fourcc_mod_code(NVIDIA, 1) ++#define DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(c,s,g,k,h) fourcc_mod_code(NVIDIA, (0x10 | ((h) & 0xf) | (((k) & 0xff) << 12) | (((g) & 0x3) << 20) | (((s) & 0x1) << 22) | (((c) & 0x7) << 23))) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(v) DRM_FORMAT_MOD_NVIDIA_BLOCK_LINEAR_2D(0, 0, 0, 0, (v)) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_ONE_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(0) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_TWO_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(1) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_FOUR_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(2) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_EIGHT_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(3) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_SIXTEEN_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(4) ++#define DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK_THIRTYTWO_GOB DRM_FORMAT_MOD_NVIDIA_16BX2_BLOCK(5) ++#define __fourcc_mod_broadcom_param_shift 8 ++#define __fourcc_mod_broadcom_param_bits 48 ++#define fourcc_mod_broadcom_code(val,params) fourcc_mod_code(BROADCOM, ((((__u64) params) << __fourcc_mod_broadcom_param_shift) | val)) ++#define fourcc_mod_broadcom_param(m) ((int) (((m) >> __fourcc_mod_broadcom_param_shift) & ((1ULL << __fourcc_mod_broadcom_param_bits) - 1))) ++#define fourcc_mod_broadcom_mod(m) ((m) & ~(((1ULL << __fourcc_mod_broadcom_param_bits) - 1) << __fourcc_mod_broadcom_param_shift)) ++#define DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED fourcc_mod_code(BROADCOM, 1) ++#define DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(v) fourcc_mod_broadcom_code(2, v) ++#define DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(v) fourcc_mod_broadcom_code(3, v) ++#define DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(v) fourcc_mod_broadcom_code(4, v) ++#define DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(v) fourcc_mod_broadcom_code(5, v) ++#define DRM_FORMAT_MOD_BROADCOM_SAND32 DRM_FORMAT_MOD_BROADCOM_SAND32_COL_HEIGHT(0) ++#define DRM_FORMAT_MOD_BROADCOM_SAND64 DRM_FORMAT_MOD_BROADCOM_SAND64_COL_HEIGHT(0) ++#define DRM_FORMAT_MOD_BROADCOM_SAND128 DRM_FORMAT_MOD_BROADCOM_SAND128_COL_HEIGHT(0) ++#define DRM_FORMAT_MOD_BROADCOM_SAND256 DRM_FORMAT_MOD_BROADCOM_SAND256_COL_HEIGHT(0) ++#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6) ++#define DRM_FORMAT_MOD_ARM_CODE(__type,__val) fourcc_mod_code(ARM, ((__u64) (__type) << 52) | ((__val) & 0x000fffffffffffffULL)) ++#define DRM_FORMAT_MOD_ARM_TYPE_AFBC 0x00 ++#define DRM_FORMAT_MOD_ARM_TYPE_MISC 0x01 ++#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_AFBC, __afbc_mode) ++#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf ++#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL) ++#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL) ++#define AFBC_FORMAT_MOD_BLOCK_SIZE_64x4 (3ULL) ++#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8_64x4 (4ULL) ++#define AFBC_FORMAT_MOD_YTR (1ULL << 4) ++#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5) ++#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6) ++#define AFBC_FORMAT_MOD_CBR (1ULL << 7) ++#define AFBC_FORMAT_MOD_TILED (1ULL << 8) ++#define AFBC_FORMAT_MOD_SC (1ULL << 9) ++#define AFBC_FORMAT_MOD_DB (1ULL << 10) ++#define AFBC_FORMAT_MOD_BCH (1ULL << 11) ++#define AFBC_FORMAT_MOD_USM (1ULL << 12) ++#define DRM_FORMAT_MOD_ARM_16X16_BLOCK_U_INTERLEAVED DRM_FORMAT_MOD_ARM_CODE(DRM_FORMAT_MOD_ARM_TYPE_MISC, 1ULL) ++#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1) ++#define __fourcc_mod_amlogic_layout_mask 0xf ++#define __fourcc_mod_amlogic_options_shift 8 ++#define __fourcc_mod_amlogic_options_mask 0xf ++#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout,__options) fourcc_mod_code(AMLOGIC, ((__layout) & __fourcc_mod_amlogic_layout_mask) | (((__options) & __fourcc_mod_amlogic_options_mask) << __fourcc_mod_amlogic_options_shift)) ++#define AMLOGIC_FBC_LAYOUT_BASIC (1ULL) ++#define AMLOGIC_FBC_LAYOUT_SCATTER (2ULL) ++#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/drm_mode.h b/build/ohos/ohos-sysroot/usr/include/drm/drm_mode.h +new file mode 100644 +index 0000000..643ae98 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/drm_mode.h +@@ -0,0 +1,500 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _DRM_MODE_H ++#define _DRM_MODE_H ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_CONNECTOR_NAME_LEN 32 ++#define DRM_DISPLAY_MODE_LEN 32 ++#define DRM_PROP_NAME_LEN 32 ++#define DRM_MODE_TYPE_BUILTIN (1 << 0) ++#define DRM_MODE_TYPE_CLOCK_C ((1 << 1) | DRM_MODE_TYPE_BUILTIN) ++#define DRM_MODE_TYPE_CRTC_C ((1 << 2) | DRM_MODE_TYPE_BUILTIN) ++#define DRM_MODE_TYPE_PREFERRED (1 << 3) ++#define DRM_MODE_TYPE_DEFAULT (1 << 4) ++#define DRM_MODE_TYPE_USERDEF (1 << 5) ++#define DRM_MODE_TYPE_DRIVER (1 << 6) ++#define DRM_MODE_TYPE_ALL (DRM_MODE_TYPE_PREFERRED | DRM_MODE_TYPE_USERDEF | DRM_MODE_TYPE_DRIVER) ++#define DRM_MODE_FLAG_PHSYNC (1 << 0) ++#define DRM_MODE_FLAG_NHSYNC (1 << 1) ++#define DRM_MODE_FLAG_PVSYNC (1 << 2) ++#define DRM_MODE_FLAG_NVSYNC (1 << 3) ++#define DRM_MODE_FLAG_INTERLACE (1 << 4) ++#define DRM_MODE_FLAG_DBLSCAN (1 << 5) ++#define DRM_MODE_FLAG_CSYNC (1 << 6) ++#define DRM_MODE_FLAG_PCSYNC (1 << 7) ++#define DRM_MODE_FLAG_NCSYNC (1 << 8) ++#define DRM_MODE_FLAG_HSKEW (1 << 9) ++#define DRM_MODE_FLAG_BCAST (1 << 10) ++#define DRM_MODE_FLAG_PIXMUX (1 << 11) ++#define DRM_MODE_FLAG_DBLCLK (1 << 12) ++#define DRM_MODE_FLAG_CLKDIV2 (1 << 13) ++#define DRM_MODE_FLAG_3D_MASK (0x1f << 14) ++#define DRM_MODE_FLAG_3D_NONE (0 << 14) ++#define DRM_MODE_FLAG_3D_FRAME_PACKING (1 << 14) ++#define DRM_MODE_FLAG_3D_FIELD_ALTERNATIVE (2 << 14) ++#define DRM_MODE_FLAG_3D_LINE_ALTERNATIVE (3 << 14) ++#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_FULL (4 << 14) ++#define DRM_MODE_FLAG_3D_L_DEPTH (5 << 14) ++#define DRM_MODE_FLAG_3D_L_DEPTH_GFX_GFX_DEPTH (6 << 14) ++#define DRM_MODE_FLAG_3D_TOP_AND_BOTTOM (7 << 14) ++#define DRM_MODE_FLAG_3D_SIDE_BY_SIDE_HALF (8 << 14) ++#define DRM_MODE_PICTURE_ASPECT_NONE 0 ++#define DRM_MODE_PICTURE_ASPECT_4_3 1 ++#define DRM_MODE_PICTURE_ASPECT_16_9 2 ++#define DRM_MODE_PICTURE_ASPECT_64_27 3 ++#define DRM_MODE_PICTURE_ASPECT_256_135 4 ++#define DRM_MODE_CONTENT_TYPE_NO_DATA 0 ++#define DRM_MODE_CONTENT_TYPE_GRAPHICS 1 ++#define DRM_MODE_CONTENT_TYPE_PHOTO 2 ++#define DRM_MODE_CONTENT_TYPE_CINEMA 3 ++#define DRM_MODE_CONTENT_TYPE_GAME 4 ++#define DRM_MODE_FLAG_PIC_AR_MASK (0x0F << 19) ++#define DRM_MODE_FLAG_PIC_AR_NONE (DRM_MODE_PICTURE_ASPECT_NONE << 19) ++#define DRM_MODE_FLAG_PIC_AR_4_3 (DRM_MODE_PICTURE_ASPECT_4_3 << 19) ++#define DRM_MODE_FLAG_PIC_AR_16_9 (DRM_MODE_PICTURE_ASPECT_16_9 << 19) ++#define DRM_MODE_FLAG_PIC_AR_64_27 (DRM_MODE_PICTURE_ASPECT_64_27 << 19) ++#define DRM_MODE_FLAG_PIC_AR_256_135 (DRM_MODE_PICTURE_ASPECT_256_135 << 19) ++#define DRM_MODE_FLAG_ALL (DRM_MODE_FLAG_PHSYNC | DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_PVSYNC | DRM_MODE_FLAG_NVSYNC | DRM_MODE_FLAG_INTERLACE | DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_CSYNC | DRM_MODE_FLAG_PCSYNC | DRM_MODE_FLAG_NCSYNC | DRM_MODE_FLAG_HSKEW | DRM_MODE_FLAG_DBLCLK | DRM_MODE_FLAG_CLKDIV2 | DRM_MODE_FLAG_3D_MASK) ++#define DRM_MODE_DPMS_ON 0 ++#define DRM_MODE_DPMS_STANDBY 1 ++#define DRM_MODE_DPMS_SUSPEND 2 ++#define DRM_MODE_DPMS_OFF 3 ++#define DRM_MODE_SCALE_NONE 0 ++#define DRM_MODE_SCALE_FULLSCREEN 1 ++#define DRM_MODE_SCALE_CENTER 2 ++#define DRM_MODE_SCALE_ASPECT 3 ++#define DRM_MODE_DITHERING_OFF 0 ++#define DRM_MODE_DITHERING_ON 1 ++#define DRM_MODE_DITHERING_AUTO 2 ++#define DRM_MODE_DIRTY_OFF 0 ++#define DRM_MODE_DIRTY_ON 1 ++#define DRM_MODE_DIRTY_ANNOTATE 2 ++#define DRM_MODE_LINK_STATUS_GOOD 0 ++#define DRM_MODE_LINK_STATUS_BAD 1 ++#define DRM_MODE_ROTATE_0 (1 << 0) ++#define DRM_MODE_ROTATE_90 (1 << 1) ++#define DRM_MODE_ROTATE_180 (1 << 2) ++#define DRM_MODE_ROTATE_270 (1 << 3) ++#define DRM_MODE_ROTATE_MASK (DRM_MODE_ROTATE_0 | DRM_MODE_ROTATE_90 | DRM_MODE_ROTATE_180 | DRM_MODE_ROTATE_270) ++#define DRM_MODE_REFLECT_X (1 << 4) ++#define DRM_MODE_REFLECT_Y (1 << 5) ++#define DRM_MODE_REFLECT_MASK (DRM_MODE_REFLECT_X | DRM_MODE_REFLECT_Y) ++#define DRM_MODE_CONTENT_PROTECTION_UNDESIRED 0 ++#define DRM_MODE_CONTENT_PROTECTION_DESIRED 1 ++#define DRM_MODE_CONTENT_PROTECTION_ENABLED 2 ++struct drm_mode_modeinfo { ++ __u32 clock; ++ __u16 hdisplay; ++ __u16 hsync_start; ++ __u16 hsync_end; ++ __u16 htotal; ++ __u16 hskew; ++ __u16 vdisplay; ++ __u16 vsync_start; ++ __u16 vsync_end; ++ __u16 vtotal; ++ __u16 vscan; ++ __u32 vrefresh; ++ __u32 flags; ++ __u32 type; ++ char name[DRM_DISPLAY_MODE_LEN]; ++}; ++struct drm_mode_card_res { ++ __u64 fb_id_ptr; ++ __u64 crtc_id_ptr; ++ __u64 connector_id_ptr; ++ __u64 encoder_id_ptr; ++ __u32 count_fbs; ++ __u32 count_crtcs; ++ __u32 count_connectors; ++ __u32 count_encoders; ++ __u32 min_width; ++ __u32 max_width; ++ __u32 min_height; ++ __u32 max_height; ++}; ++struct drm_mode_crtc { ++ __u64 set_connectors_ptr; ++ __u32 count_connectors; ++ __u32 crtc_id; ++ __u32 fb_id; ++ __u32 x; ++ __u32 y; ++ __u32 gamma_size; ++ __u32 mode_valid; ++ struct drm_mode_modeinfo mode; ++}; ++#define DRM_MODE_PRESENT_TOP_FIELD (1 << 0) ++#define DRM_MODE_PRESENT_BOTTOM_FIELD (1 << 1) ++struct drm_mode_set_plane { ++ __u32 plane_id; ++ __u32 crtc_id; ++ __u32 fb_id; ++ __u32 flags; ++ __s32 crtc_x; ++ __s32 crtc_y; ++ __u32 crtc_w; ++ __u32 crtc_h; ++ __u32 src_x; ++ __u32 src_y; ++ __u32 src_h; ++ __u32 src_w; ++}; ++struct drm_mode_get_plane { ++ __u32 plane_id; ++ __u32 crtc_id; ++ __u32 fb_id; ++ __u32 possible_crtcs; ++ __u32 gamma_size; ++ __u32 count_format_types; ++ __u64 format_type_ptr; ++}; ++struct drm_mode_get_plane_res { ++ __u64 plane_id_ptr; ++ __u32 count_planes; ++}; ++#define DRM_MODE_ENCODER_NONE 0 ++#define DRM_MODE_ENCODER_DAC 1 ++#define DRM_MODE_ENCODER_TMDS 2 ++#define DRM_MODE_ENCODER_LVDS 3 ++#define DRM_MODE_ENCODER_TVDAC 4 ++#define DRM_MODE_ENCODER_VIRTUAL 5 ++#define DRM_MODE_ENCODER_DSI 6 ++#define DRM_MODE_ENCODER_DPMST 7 ++#define DRM_MODE_ENCODER_DPI 8 ++struct drm_mode_get_encoder { ++ __u32 encoder_id; ++ __u32 encoder_type; ++ __u32 crtc_id; ++ __u32 possible_crtcs; ++ __u32 possible_clones; ++}; ++enum drm_mode_subconnector { ++ DRM_MODE_SUBCONNECTOR_Automatic = 0, ++ DRM_MODE_SUBCONNECTOR_Unknown = 0, ++ DRM_MODE_SUBCONNECTOR_VGA = 1, ++ DRM_MODE_SUBCONNECTOR_DVID = 3, ++ DRM_MODE_SUBCONNECTOR_DVIA = 4, ++ DRM_MODE_SUBCONNECTOR_Composite = 5, ++ DRM_MODE_SUBCONNECTOR_SVIDEO = 6, ++ DRM_MODE_SUBCONNECTOR_Component = 8, ++ DRM_MODE_SUBCONNECTOR_SCART = 9, ++ DRM_MODE_SUBCONNECTOR_DisplayPort = 10, ++ DRM_MODE_SUBCONNECTOR_HDMIA = 11, ++ DRM_MODE_SUBCONNECTOR_Native = 15, ++ DRM_MODE_SUBCONNECTOR_Wireless = 18, ++}; ++#define DRM_MODE_CONNECTOR_Unknown 0 ++#define DRM_MODE_CONNECTOR_VGA 1 ++#define DRM_MODE_CONNECTOR_DVII 2 ++#define DRM_MODE_CONNECTOR_DVID 3 ++#define DRM_MODE_CONNECTOR_DVIA 4 ++#define DRM_MODE_CONNECTOR_Composite 5 ++#define DRM_MODE_CONNECTOR_SVIDEO 6 ++#define DRM_MODE_CONNECTOR_LVDS 7 ++#define DRM_MODE_CONNECTOR_Component 8 ++#define DRM_MODE_CONNECTOR_9PinDIN 9 ++#define DRM_MODE_CONNECTOR_DisplayPort 10 ++#define DRM_MODE_CONNECTOR_HDMIA 11 ++#define DRM_MODE_CONNECTOR_HDMIB 12 ++#define DRM_MODE_CONNECTOR_TV 13 ++#define DRM_MODE_CONNECTOR_eDP 14 ++#define DRM_MODE_CONNECTOR_VIRTUAL 15 ++#define DRM_MODE_CONNECTOR_DSI 16 ++#define DRM_MODE_CONNECTOR_DPI 17 ++#define DRM_MODE_CONNECTOR_WRITEBACK 18 ++#define DRM_MODE_CONNECTOR_SPI 19 ++struct drm_mode_get_connector { ++ __u64 encoders_ptr; ++ __u64 modes_ptr; ++ __u64 props_ptr; ++ __u64 prop_values_ptr; ++ __u32 count_modes; ++ __u32 count_props; ++ __u32 count_encoders; ++ __u32 encoder_id; ++ __u32 connector_id; ++ __u32 connector_type; ++ __u32 connector_type_id; ++ __u32 connection; ++ __u32 mm_width; ++ __u32 mm_height; ++ __u32 subpixel; ++ __u32 pad; ++}; ++#define DRM_MODE_PROP_PENDING (1 << 0) ++#define DRM_MODE_PROP_RANGE (1 << 1) ++#define DRM_MODE_PROP_IMMUTABLE (1 << 2) ++#define DRM_MODE_PROP_ENUM (1 << 3) ++#define DRM_MODE_PROP_BLOB (1 << 4) ++#define DRM_MODE_PROP_BITMASK (1 << 5) ++#define DRM_MODE_PROP_LEGACY_TYPE (DRM_MODE_PROP_RANGE | DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BLOB | DRM_MODE_PROP_BITMASK) ++#define DRM_MODE_PROP_EXTENDED_TYPE 0x0000ffc0 ++#define DRM_MODE_PROP_TYPE(n) ((n) << 6) ++#define DRM_MODE_PROP_OBJECT DRM_MODE_PROP_TYPE(1) ++#define DRM_MODE_PROP_SIGNED_RANGE DRM_MODE_PROP_TYPE(2) ++#define DRM_MODE_PROP_ATOMIC 0x80000000 ++struct drm_mode_property_enum { ++ __u64 value; ++ char name[DRM_PROP_NAME_LEN]; ++}; ++struct drm_mode_get_property { ++ __u64 values_ptr; ++ __u64 enum_blob_ptr; ++ __u32 prop_id; ++ __u32 flags; ++ char name[DRM_PROP_NAME_LEN]; ++ __u32 count_values; ++ __u32 count_enum_blobs; ++}; ++struct drm_mode_connector_set_property { ++ __u64 value; ++ __u32 prop_id; ++ __u32 connector_id; ++}; ++#define DRM_MODE_OBJECT_CRTC 0xcccccccc ++#define DRM_MODE_OBJECT_CONNECTOR 0xc0c0c0c0 ++#define DRM_MODE_OBJECT_ENCODER 0xe0e0e0e0 ++#define DRM_MODE_OBJECT_MODE 0xdededede ++#define DRM_MODE_OBJECT_PROPERTY 0xb0b0b0b0 ++#define DRM_MODE_OBJECT_FB 0xfbfbfbfb ++#define DRM_MODE_OBJECT_BLOB 0xbbbbbbbb ++#define DRM_MODE_OBJECT_PLANE 0xeeeeeeee ++#define DRM_MODE_OBJECT_ANY 0 ++struct drm_mode_obj_get_properties { ++ __u64 props_ptr; ++ __u64 prop_values_ptr; ++ __u32 count_props; ++ __u32 obj_id; ++ __u32 obj_type; ++}; ++struct drm_mode_obj_set_property { ++ __u64 value; ++ __u32 prop_id; ++ __u32 obj_id; ++ __u32 obj_type; ++}; ++struct drm_mode_get_blob { ++ __u32 blob_id; ++ __u32 length; ++ __u64 data; ++}; ++struct drm_mode_fb_cmd { ++ __u32 fb_id; ++ __u32 width; ++ __u32 height; ++ __u32 pitch; ++ __u32 bpp; ++ __u32 depth; ++ __u32 handle; ++}; ++#define DRM_MODE_FB_INTERLACED (1 << 0) ++#define DRM_MODE_FB_MODIFIERS (1 << 1) ++struct drm_mode_fb_cmd2 { ++ __u32 fb_id; ++ __u32 width; ++ __u32 height; ++ __u32 pixel_format; ++ __u32 flags; ++ __u32 handles[4]; ++ __u32 pitches[4]; ++ __u32 offsets[4]; ++ __u64 modifier[4]; ++}; ++#define DRM_MODE_FB_DIRTY_ANNOTATE_COPY 0x01 ++#define DRM_MODE_FB_DIRTY_ANNOTATE_FILL 0x02 ++#define DRM_MODE_FB_DIRTY_FLAGS 0x03 ++#define DRM_MODE_FB_DIRTY_MAX_CLIPS 256 ++struct drm_mode_fb_dirty_cmd { ++ __u32 fb_id; ++ __u32 flags; ++ __u32 color; ++ __u32 num_clips; ++ __u64 clips_ptr; ++}; ++struct drm_mode_mode_cmd { ++ __u32 connector_id; ++ struct drm_mode_modeinfo mode; ++}; ++#define DRM_MODE_CURSOR_BO 0x01 ++#define DRM_MODE_CURSOR_MOVE 0x02 ++#define DRM_MODE_CURSOR_FLAGS 0x03 ++struct drm_mode_cursor { ++ __u32 flags; ++ __u32 crtc_id; ++ __s32 x; ++ __s32 y; ++ __u32 width; ++ __u32 height; ++ __u32 handle; ++}; ++struct drm_mode_cursor2 { ++ __u32 flags; ++ __u32 crtc_id; ++ __s32 x; ++ __s32 y; ++ __u32 width; ++ __u32 height; ++ __u32 handle; ++ __s32 hot_x; ++ __s32 hot_y; ++}; ++struct drm_mode_crtc_lut { ++ __u32 crtc_id; ++ __u32 gamma_size; ++ __u64 red; ++ __u64 green; ++ __u64 blue; ++}; ++struct drm_color_ctm { ++ __u64 matrix[9]; ++}; ++struct drm_color_lut { ++ __u16 red; ++ __u16 green; ++ __u16 blue; ++ __u16 reserved; ++}; ++struct hdr_metadata_infoframe { ++ __u8 eotf; ++ __u8 metadata_type; ++ struct { ++ __u16 x, y; ++ } display_primaries[3]; ++ struct { ++ __u16 x, y; ++ } white_point; ++ __u16 max_display_mastering_luminance; ++ __u16 min_display_mastering_luminance; ++ __u16 max_cll; ++ __u16 max_fall; ++}; ++struct hdr_output_metadata { ++ __u32 metadata_type; ++ union { ++ struct hdr_metadata_infoframe hdmi_metadata_type1; ++ }; ++}; ++#define DRM_MODE_PAGE_FLIP_EVENT 0x01 ++#define DRM_MODE_PAGE_FLIP_ASYNC 0x02 ++#define DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE 0x4 ++#define DRM_MODE_PAGE_FLIP_TARGET_RELATIVE 0x8 ++#define DRM_MODE_PAGE_FLIP_TARGET (DRM_MODE_PAGE_FLIP_TARGET_ABSOLUTE | DRM_MODE_PAGE_FLIP_TARGET_RELATIVE) ++#define DRM_MODE_PAGE_FLIP_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_PAGE_FLIP_TARGET) ++struct drm_mode_crtc_page_flip { ++ __u32 crtc_id; ++ __u32 fb_id; ++ __u32 flags; ++ __u32 reserved; ++ __u64 user_data; ++}; ++struct drm_mode_crtc_page_flip_target { ++ __u32 crtc_id; ++ __u32 fb_id; ++ __u32 flags; ++ __u32 sequence; ++ __u64 user_data; ++}; ++struct drm_mode_create_dumb { ++ __u32 height; ++ __u32 width; ++ __u32 bpp; ++ __u32 flags; ++ __u32 handle; ++ __u32 pitch; ++ __u64 size; ++}; ++struct drm_mode_map_dumb { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++struct drm_mode_destroy_dumb { ++ __u32 handle; ++}; ++#define DRM_MODE_ATOMIC_TEST_ONLY 0x0100 ++#define DRM_MODE_ATOMIC_NONBLOCK 0x0200 ++#define DRM_MODE_ATOMIC_ALLOW_MODESET 0x0400 ++#define DRM_MODE_ATOMIC_FLAGS (DRM_MODE_PAGE_FLIP_EVENT | DRM_MODE_PAGE_FLIP_ASYNC | DRM_MODE_ATOMIC_TEST_ONLY | DRM_MODE_ATOMIC_NONBLOCK | DRM_MODE_ATOMIC_ALLOW_MODESET) ++struct drm_mode_atomic { ++ __u32 flags; ++ __u32 count_objs; ++ __u64 objs_ptr; ++ __u64 count_props_ptr; ++ __u64 props_ptr; ++ __u64 prop_values_ptr; ++ __u64 reserved; ++ __u64 user_data; ++}; ++struct drm_format_modifier_blob { ++#define FORMAT_BLOB_CURRENT 1 ++ __u32 version; ++ __u32 flags; ++ __u32 count_formats; ++ __u32 formats_offset; ++ __u32 count_modifiers; ++ __u32 modifiers_offset; ++}; ++struct drm_format_modifier { ++ __u64 formats; ++ __u32 offset; ++ __u32 pad; ++ __u64 modifier; ++}; ++struct drm_mode_create_blob { ++ __u64 data; ++ __u32 length; ++ __u32 blob_id; ++}; ++struct drm_mode_destroy_blob { ++ __u32 blob_id; ++}; ++struct drm_mode_create_lease { ++ __u64 object_ids; ++ __u32 object_count; ++ __u32 flags; ++ __u32 lessee_id; ++ __u32 fd; ++}; ++struct drm_mode_list_lessees { ++ __u32 count_lessees; ++ __u32 pad; ++ __u64 lessees_ptr; ++}; ++struct drm_mode_get_lease { ++ __u32 count_objects; ++ __u32 pad; ++ __u64 objects_ptr; ++}; ++struct drm_mode_revoke_lease { ++ __u32 lessee_id; ++}; ++struct drm_mode_rect { ++ __s32 x1; ++ __s32 y1; ++ __s32 x2; ++ __s32 y2; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/drm_sarea.h b/build/ohos/ohos-sysroot/usr/include/drm/drm_sarea.h +new file mode 100644 +index 0000000..a0c7f3a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/drm_sarea.h +@@ -0,0 +1,60 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _DRM_SAREA_H_ ++#define _DRM_SAREA_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifdef __alpha__ ++#define SAREA_MAX 0x2000U ++#elif defined(__mips__) ++#define SAREA_MAX 0x4000U ++#elif defined(__ia64__) ++#define SAREA_MAX 0x10000U ++#else ++#define SAREA_MAX 0x2000U ++#endif ++#define SAREA_MAX_DRAWABLES 256 ++#define SAREA_DRAWABLE_CLAIMED_ENTRY 0x80000000 ++struct drm_sarea_drawable { ++ unsigned int stamp; ++ unsigned int flags; ++}; ++struct drm_sarea_frame { ++ unsigned int x; ++ unsigned int y; ++ unsigned int width; ++ unsigned int height; ++ unsigned int fullscreen; ++}; ++struct drm_sarea { ++ struct drm_hw_lock lock; ++ struct drm_hw_lock drawable_lock; ++ struct drm_sarea_drawable drawableTable[SAREA_MAX_DRAWABLES]; ++ struct drm_sarea_frame frame; ++ drm_context_t dummy_context; ++}; ++typedef struct drm_sarea_drawable drm_sarea_drawable_t; ++typedef struct drm_sarea_frame drm_sarea_frame_t; ++typedef struct drm_sarea drm_sarea_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/etnaviv_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/etnaviv_drm.h +new file mode 100644 +index 0000000..c92d110 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/etnaviv_drm.h +@@ -0,0 +1,201 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ETNAVIV_DRM_H__ ++#define __ETNAVIV_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++struct drm_etnaviv_timespec { ++ __s64 tv_sec; ++ __s64 tv_nsec; ++}; ++#define ETNAVIV_PARAM_GPU_MODEL 0x01 ++#define ETNAVIV_PARAM_GPU_REVISION 0x02 ++#define ETNAVIV_PARAM_GPU_FEATURES_0 0x03 ++#define ETNAVIV_PARAM_GPU_FEATURES_1 0x04 ++#define ETNAVIV_PARAM_GPU_FEATURES_2 0x05 ++#define ETNAVIV_PARAM_GPU_FEATURES_3 0x06 ++#define ETNAVIV_PARAM_GPU_FEATURES_4 0x07 ++#define ETNAVIV_PARAM_GPU_FEATURES_5 0x08 ++#define ETNAVIV_PARAM_GPU_FEATURES_6 0x09 ++#define ETNAVIV_PARAM_GPU_FEATURES_7 0x0a ++#define ETNAVIV_PARAM_GPU_FEATURES_8 0x0b ++#define ETNAVIV_PARAM_GPU_FEATURES_9 0x0c ++#define ETNAVIV_PARAM_GPU_FEATURES_10 0x0d ++#define ETNAVIV_PARAM_GPU_FEATURES_11 0x0e ++#define ETNAVIV_PARAM_GPU_FEATURES_12 0x0f ++#define ETNAVIV_PARAM_GPU_STREAM_COUNT 0x10 ++#define ETNAVIV_PARAM_GPU_REGISTER_MAX 0x11 ++#define ETNAVIV_PARAM_GPU_THREAD_COUNT 0x12 ++#define ETNAVIV_PARAM_GPU_VERTEX_CACHE_SIZE 0x13 ++#define ETNAVIV_PARAM_GPU_SHADER_CORE_COUNT 0x14 ++#define ETNAVIV_PARAM_GPU_PIXEL_PIPES 0x15 ++#define ETNAVIV_PARAM_GPU_VERTEX_OUTPUT_BUFFER_SIZE 0x16 ++#define ETNAVIV_PARAM_GPU_BUFFER_SIZE 0x17 ++#define ETNAVIV_PARAM_GPU_INSTRUCTION_COUNT 0x18 ++#define ETNAVIV_PARAM_GPU_NUM_CONSTANTS 0x19 ++#define ETNAVIV_PARAM_GPU_NUM_VARYINGS 0x1a ++#define ETNAVIV_PARAM_SOFTPIN_START_ADDR 0x1b ++#define ETNA_MAX_PIPES 4 ++struct drm_etnaviv_param { ++ __u32 pipe; ++ __u32 param; ++ __u64 value; ++}; ++#define ETNA_BO_CACHE_MASK 0x000f0000 ++#define ETNA_BO_CACHED 0x00010000 ++#define ETNA_BO_WC 0x00020000 ++#define ETNA_BO_UNCACHED 0x00040000 ++#define ETNA_BO_FORCE_MMU 0x00100000 ++struct drm_etnaviv_gem_new { ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++struct drm_etnaviv_gem_info { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++#define ETNA_PREP_READ 0x01 ++#define ETNA_PREP_WRITE 0x02 ++#define ETNA_PREP_NOSYNC 0x04 ++struct drm_etnaviv_gem_cpu_prep { ++ __u32 handle; ++ __u32 op; ++ struct drm_etnaviv_timespec timeout; ++}; ++struct drm_etnaviv_gem_cpu_fini { ++ __u32 handle; ++ __u32 flags; ++}; ++struct drm_etnaviv_gem_submit_reloc { ++ __u32 submit_offset; ++ __u32 reloc_idx; ++ __u64 reloc_offset; ++ __u32 flags; ++}; ++#define ETNA_SUBMIT_BO_READ 0x0001 ++#define ETNA_SUBMIT_BO_WRITE 0x0002 ++struct drm_etnaviv_gem_submit_bo { ++ __u32 flags; ++ __u32 handle; ++ __u64 presumed; ++}; ++#define ETNA_PM_PROCESS_PRE 0x0001 ++#define ETNA_PM_PROCESS_POST 0x0002 ++struct drm_etnaviv_gem_submit_pmr { ++ __u32 flags; ++ __u8 domain; ++ __u8 pad; ++ __u16 signal; ++ __u32 sequence; ++ __u32 read_offset; ++ __u32 read_idx; ++}; ++#define ETNA_SUBMIT_NO_IMPLICIT 0x0001 ++#define ETNA_SUBMIT_FENCE_FD_IN 0x0002 ++#define ETNA_SUBMIT_FENCE_FD_OUT 0x0004 ++#define ETNA_SUBMIT_SOFTPIN 0x0008 ++#define ETNA_SUBMIT_FLAGS (ETNA_SUBMIT_NO_IMPLICIT | ETNA_SUBMIT_FENCE_FD_IN | ETNA_SUBMIT_FENCE_FD_OUT | ETNA_SUBMIT_SOFTPIN) ++#define ETNA_PIPE_3D 0x00 ++#define ETNA_PIPE_2D 0x01 ++#define ETNA_PIPE_VG 0x02 ++struct drm_etnaviv_gem_submit { ++ __u32 fence; ++ __u32 pipe; ++ __u32 exec_state; ++ __u32 nr_bos; ++ __u32 nr_relocs; ++ __u32 stream_size; ++ __u64 bos; ++ __u64 relocs; ++ __u64 stream; ++ __u32 flags; ++ __s32 fence_fd; ++ __u64 pmrs; ++ __u32 nr_pmrs; ++ __u32 pad; ++}; ++#define ETNA_WAIT_NONBLOCK 0x01 ++struct drm_etnaviv_wait_fence { ++ __u32 pipe; ++ __u32 fence; ++ __u32 flags; ++ __u32 pad; ++ struct drm_etnaviv_timespec timeout; ++}; ++#define ETNA_USERPTR_READ 0x01 ++#define ETNA_USERPTR_WRITE 0x02 ++struct drm_etnaviv_gem_userptr { ++ __u64 user_ptr; ++ __u64 user_size; ++ __u32 flags; ++ __u32 handle; ++}; ++struct drm_etnaviv_gem_wait { ++ __u32 pipe; ++ __u32 handle; ++ __u32 flags; ++ __u32 pad; ++ struct drm_etnaviv_timespec timeout; ++}; ++struct drm_etnaviv_pm_domain { ++ __u32 pipe; ++ __u8 iter; ++ __u8 id; ++ __u16 nr_signals; ++ char name[64]; ++}; ++struct drm_etnaviv_pm_signal { ++ __u32 pipe; ++ __u8 domain; ++ __u8 pad; ++ __u16 iter; ++ __u16 id; ++ char name[64]; ++}; ++#define DRM_ETNAVIV_GET_PARAM 0x00 ++#define DRM_ETNAVIV_GEM_NEW 0x02 ++#define DRM_ETNAVIV_GEM_INFO 0x03 ++#define DRM_ETNAVIV_GEM_CPU_PREP 0x04 ++#define DRM_ETNAVIV_GEM_CPU_FINI 0x05 ++#define DRM_ETNAVIV_GEM_SUBMIT 0x06 ++#define DRM_ETNAVIV_WAIT_FENCE 0x07 ++#define DRM_ETNAVIV_GEM_USERPTR 0x08 ++#define DRM_ETNAVIV_GEM_WAIT 0x09 ++#define DRM_ETNAVIV_PM_QUERY_DOM 0x0a ++#define DRM_ETNAVIV_PM_QUERY_SIG 0x0b ++#define DRM_ETNAVIV_NUM_IOCTLS 0x0c ++#define DRM_IOCTL_ETNAVIV_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GET_PARAM, struct drm_etnaviv_param) ++#define DRM_IOCTL_ETNAVIV_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_NEW, struct drm_etnaviv_gem_new) ++#define DRM_IOCTL_ETNAVIV_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_INFO, struct drm_etnaviv_gem_info) ++#define DRM_IOCTL_ETNAVIV_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_PREP, struct drm_etnaviv_gem_cpu_prep) ++#define DRM_IOCTL_ETNAVIV_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_CPU_FINI, struct drm_etnaviv_gem_cpu_fini) ++#define DRM_IOCTL_ETNAVIV_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_SUBMIT, struct drm_etnaviv_gem_submit) ++#define DRM_IOCTL_ETNAVIV_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_WAIT_FENCE, struct drm_etnaviv_wait_fence) ++#define DRM_IOCTL_ETNAVIV_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_USERPTR, struct drm_etnaviv_gem_userptr) ++#define DRM_IOCTL_ETNAVIV_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_ETNAVIV_GEM_WAIT, struct drm_etnaviv_gem_wait) ++#define DRM_IOCTL_ETNAVIV_PM_QUERY_DOM DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_DOM, struct drm_etnaviv_pm_domain) ++#define DRM_IOCTL_ETNAVIV_PM_QUERY_SIG DRM_IOWR(DRM_COMMAND_BASE + DRM_ETNAVIV_PM_QUERY_SIG, struct drm_etnaviv_pm_signal) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/exynos_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/exynos_drm.h +new file mode 100644 +index 0000000..4918035 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/exynos_drm.h +@@ -0,0 +1,231 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_EXYNOS_DRM_H_ ++#define _UAPI_EXYNOS_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++struct drm_exynos_gem_create { ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++struct drm_exynos_gem_map { ++ __u32 handle; ++ __u32 reserved; ++ __u64 offset; ++}; ++struct drm_exynos_gem_info { ++ __u32 handle; ++ __u32 flags; ++ __u64 size; ++}; ++struct drm_exynos_vidi_connection { ++ __u32 connection; ++ __u32 extensions; ++ __u64 edid; ++}; ++enum e_drm_exynos_gem_mem_type { ++ EXYNOS_BO_CONTIG = 0 << 0, ++ EXYNOS_BO_NONCONTIG = 1 << 0, ++ EXYNOS_BO_NONCACHABLE = 0 << 1, ++ EXYNOS_BO_CACHABLE = 1 << 1, ++ EXYNOS_BO_WC = 1 << 2, ++ EXYNOS_BO_MASK = EXYNOS_BO_NONCONTIG | EXYNOS_BO_CACHABLE | EXYNOS_BO_WC ++}; ++struct drm_exynos_g2d_get_ver { ++ __u32 major; ++ __u32 minor; ++}; ++struct drm_exynos_g2d_cmd { ++ __u32 offset; ++ __u32 data; ++}; ++enum drm_exynos_g2d_buf_type { ++ G2D_BUF_USERPTR = 1 << 31, ++}; ++enum drm_exynos_g2d_event_type { ++ G2D_EVENT_NOT, ++ G2D_EVENT_NONSTOP, ++ G2D_EVENT_STOP, ++}; ++struct drm_exynos_g2d_userptr { ++ unsigned long userptr; ++ unsigned long size; ++}; ++struct drm_exynos_g2d_set_cmdlist { ++ __u64 cmd; ++ __u64 cmd_buf; ++ __u32 cmd_nr; ++ __u32 cmd_buf_nr; ++ __u64 event_type; ++ __u64 user_data; ++}; ++struct drm_exynos_g2d_exec { ++ __u64 async; ++}; ++struct drm_exynos_ioctl_ipp_get_res { ++ __u32 count_ipps; ++ __u32 reserved; ++ __u64 ipp_id_ptr; ++}; ++enum drm_exynos_ipp_format_type { ++ DRM_EXYNOS_IPP_FORMAT_SOURCE = 0x01, ++ DRM_EXYNOS_IPP_FORMAT_DESTINATION = 0x02, ++}; ++struct drm_exynos_ipp_format { ++ __u32 fourcc; ++ __u32 type; ++ __u64 modifier; ++}; ++enum drm_exynos_ipp_capability { ++ DRM_EXYNOS_IPP_CAP_CROP = 0x01, ++ DRM_EXYNOS_IPP_CAP_ROTATE = 0x02, ++ DRM_EXYNOS_IPP_CAP_SCALE = 0x04, ++ DRM_EXYNOS_IPP_CAP_CONVERT = 0x08, ++}; ++struct drm_exynos_ioctl_ipp_get_caps { ++ __u32 ipp_id; ++ __u32 capabilities; ++ __u32 reserved; ++ __u32 formats_count; ++ __u64 formats_ptr; ++}; ++enum drm_exynos_ipp_limit_type { ++ DRM_EXYNOS_IPP_LIMIT_TYPE_SIZE = 0x0001, ++ DRM_EXYNOS_IPP_LIMIT_TYPE_SCALE = 0x0002, ++ DRM_EXYNOS_IPP_LIMIT_SIZE_BUFFER = 0x0001 << 16, ++ DRM_EXYNOS_IPP_LIMIT_SIZE_AREA = 0x0002 << 16, ++ DRM_EXYNOS_IPP_LIMIT_SIZE_ROTATED = 0x0003 << 16, ++ DRM_EXYNOS_IPP_LIMIT_TYPE_MASK = 0x000f, ++ DRM_EXYNOS_IPP_LIMIT_SIZE_MASK = 0x000f << 16, ++}; ++struct drm_exynos_ipp_limit_val { ++ __u32 min; ++ __u32 max; ++ __u32 align; ++ __u32 reserved; ++}; ++struct drm_exynos_ipp_limit { ++ __u32 type; ++ __u32 reserved; ++ struct drm_exynos_ipp_limit_val h; ++ struct drm_exynos_ipp_limit_val v; ++}; ++struct drm_exynos_ioctl_ipp_get_limits { ++ __u32 ipp_id; ++ __u32 fourcc; ++ __u64 modifier; ++ __u32 type; ++ __u32 limits_count; ++ __u64 limits_ptr; ++}; ++enum drm_exynos_ipp_task_id { ++ DRM_EXYNOS_IPP_TASK_BUFFER = 0x0001, ++ DRM_EXYNOS_IPP_TASK_RECTANGLE = 0x0002, ++ DRM_EXYNOS_IPP_TASK_TRANSFORM = 0x0003, ++ DRM_EXYNOS_IPP_TASK_ALPHA = 0x0004, ++ DRM_EXYNOS_IPP_TASK_TYPE_SOURCE = 0x0001 << 16, ++ DRM_EXYNOS_IPP_TASK_TYPE_DESTINATION = 0x0002 << 16, ++}; ++struct drm_exynos_ipp_task_buffer { ++ __u32 id; ++ __u32 fourcc; ++ __u32 width, height; ++ __u32 gem_id[4]; ++ __u32 offset[4]; ++ __u32 pitch[4]; ++ __u64 modifier; ++}; ++struct drm_exynos_ipp_task_rect { ++ __u32 id; ++ __u32 reserved; ++ __u32 x; ++ __u32 y; ++ __u32 w; ++ __u32 h; ++}; ++struct drm_exynos_ipp_task_transform { ++ __u32 id; ++ __u32 rotation; ++}; ++struct drm_exynos_ipp_task_alpha { ++ __u32 id; ++ __u32 value; ++}; ++enum drm_exynos_ipp_flag { ++ DRM_EXYNOS_IPP_FLAG_EVENT = 0x01, ++ DRM_EXYNOS_IPP_FLAG_TEST_ONLY = 0x02, ++ DRM_EXYNOS_IPP_FLAG_NONBLOCK = 0x04, ++}; ++#define DRM_EXYNOS_IPP_FLAGS (DRM_EXYNOS_IPP_FLAG_EVENT | DRM_EXYNOS_IPP_FLAG_TEST_ONLY | DRM_EXYNOS_IPP_FLAG_NONBLOCK) ++struct drm_exynos_ioctl_ipp_commit { ++ __u32 ipp_id; ++ __u32 flags; ++ __u32 reserved; ++ __u32 params_size; ++ __u64 params_ptr; ++ __u64 user_data; ++}; ++#define DRM_EXYNOS_GEM_CREATE 0x00 ++#define DRM_EXYNOS_GEM_MAP 0x01 ++#define DRM_EXYNOS_GEM_GET 0x04 ++#define DRM_EXYNOS_VIDI_CONNECTION 0x07 ++#define DRM_EXYNOS_G2D_GET_VER 0x20 ++#define DRM_EXYNOS_G2D_SET_CMDLIST 0x21 ++#define DRM_EXYNOS_G2D_EXEC 0x22 ++#define DRM_EXYNOS_IPP_GET_RESOURCES 0x40 ++#define DRM_EXYNOS_IPP_GET_CAPS 0x41 ++#define DRM_EXYNOS_IPP_GET_LIMITS 0x42 ++#define DRM_EXYNOS_IPP_COMMIT 0x43 ++#define DRM_IOCTL_EXYNOS_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_CREATE, struct drm_exynos_gem_create) ++#define DRM_IOCTL_EXYNOS_GEM_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_MAP, struct drm_exynos_gem_map) ++#define DRM_IOCTL_EXYNOS_GEM_GET DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_GEM_GET, struct drm_exynos_gem_info) ++#define DRM_IOCTL_EXYNOS_VIDI_CONNECTION DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_VIDI_CONNECTION, struct drm_exynos_vidi_connection) ++#define DRM_IOCTL_EXYNOS_G2D_GET_VER DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_GET_VER, struct drm_exynos_g2d_get_ver) ++#define DRM_IOCTL_EXYNOS_G2D_SET_CMDLIST DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_SET_CMDLIST, struct drm_exynos_g2d_set_cmdlist) ++#define DRM_IOCTL_EXYNOS_G2D_EXEC DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_G2D_EXEC, struct drm_exynos_g2d_exec) ++#define DRM_IOCTL_EXYNOS_IPP_GET_RESOURCES DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_RESOURCES, struct drm_exynos_ioctl_ipp_get_res) ++#define DRM_IOCTL_EXYNOS_IPP_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_CAPS, struct drm_exynos_ioctl_ipp_get_caps) ++#define DRM_IOCTL_EXYNOS_IPP_GET_LIMITS DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_GET_LIMITS, struct drm_exynos_ioctl_ipp_get_limits) ++#define DRM_IOCTL_EXYNOS_IPP_COMMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_EXYNOS_IPP_COMMIT, struct drm_exynos_ioctl_ipp_commit) ++#define DRM_EXYNOS_G2D_EVENT 0x80000000 ++#define DRM_EXYNOS_IPP_EVENT 0x80000002 ++struct drm_exynos_g2d_event { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++ __u32 cmdlist_no; ++ __u32 reserved; ++}; ++struct drm_exynos_ipp_event { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++ __u32 ipp_id; ++ __u32 sequence; ++ __u64 reserved; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/i810_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/i810_drm.h +new file mode 100644 +index 0000000..e33387d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/i810_drm.h +@@ -0,0 +1,220 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _I810_DRM_H_ ++#define _I810_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef _I810_DEFINES_ ++#define _I810_DEFINES_ ++#define I810_DMA_BUF_ORDER 12 ++#define I810_DMA_BUF_SZ (1 << I810_DMA_BUF_ORDER) ++#define I810_DMA_BUF_NR 256 ++#define I810_NR_SAREA_CLIPRECTS 8 ++#define I810_NR_TEX_REGIONS 64 ++#define I810_LOG_MIN_TEX_REGION_SIZE 16 ++#endif ++#define I810_UPLOAD_TEX0IMAGE 0x1 ++#define I810_UPLOAD_TEX1IMAGE 0x2 ++#define I810_UPLOAD_CTX 0x4 ++#define I810_UPLOAD_BUFFERS 0x8 ++#define I810_UPLOAD_TEX0 0x10 ++#define I810_UPLOAD_TEX1 0x20 ++#define I810_UPLOAD_CLIPRECTS 0x40 ++#define I810_DESTREG_DI0 0 ++#define I810_DESTREG_DI1 1 ++#define I810_DESTREG_DV0 2 ++#define I810_DESTREG_DV1 3 ++#define I810_DESTREG_DR0 4 ++#define I810_DESTREG_DR1 5 ++#define I810_DESTREG_DR2 6 ++#define I810_DESTREG_DR3 7 ++#define I810_DESTREG_DR4 8 ++#define I810_DEST_SETUP_SIZE 10 ++#define I810_CTXREG_CF0 0 ++#define I810_CTXREG_CF1 1 ++#define I810_CTXREG_ST0 2 ++#define I810_CTXREG_ST1 3 ++#define I810_CTXREG_VF 4 ++#define I810_CTXREG_MT 5 ++#define I810_CTXREG_MC0 6 ++#define I810_CTXREG_MC1 7 ++#define I810_CTXREG_MC2 8 ++#define I810_CTXREG_MA0 9 ++#define I810_CTXREG_MA1 10 ++#define I810_CTXREG_MA2 11 ++#define I810_CTXREG_SDM 12 ++#define I810_CTXREG_FOG 13 ++#define I810_CTXREG_B1 14 ++#define I810_CTXREG_B2 15 ++#define I810_CTXREG_LCS 16 ++#define I810_CTXREG_PV 17 ++#define I810_CTXREG_ZA 18 ++#define I810_CTXREG_AA 19 ++#define I810_CTX_SETUP_SIZE 20 ++#define I810_TEXREG_MI0 0 ++#define I810_TEXREG_MI1 1 ++#define I810_TEXREG_MI2 2 ++#define I810_TEXREG_MI3 3 ++#define I810_TEXREG_MF 4 ++#define I810_TEXREG_MLC 5 ++#define I810_TEXREG_MLL 6 ++#define I810_TEXREG_MCS 7 ++#define I810_TEX_SETUP_SIZE 8 ++#define I810_FRONT 0x1 ++#define I810_BACK 0x2 ++#define I810_DEPTH 0x4 ++typedef enum _drm_i810_init_func { ++ I810_INIT_DMA = 0x01, ++ I810_CLEANUP_DMA = 0x02, ++ I810_INIT_DMA_1_4 = 0x03 ++} drm_i810_init_func_t; ++typedef struct _drm_i810_init { ++ drm_i810_init_func_t func; ++ unsigned int mmio_offset; ++ unsigned int buffers_offset; ++ int sarea_priv_offset; ++ unsigned int ring_start; ++ unsigned int ring_end; ++ unsigned int ring_size; ++ unsigned int front_offset; ++ unsigned int back_offset; ++ unsigned int depth_offset; ++ unsigned int overlay_offset; ++ unsigned int overlay_physical; ++ unsigned int w; ++ unsigned int h; ++ unsigned int pitch; ++ unsigned int pitch_bits; ++} drm_i810_init_t; ++typedef struct _drm_i810_pre12_init { ++ drm_i810_init_func_t func; ++ unsigned int mmio_offset; ++ unsigned int buffers_offset; ++ int sarea_priv_offset; ++ unsigned int ring_start; ++ unsigned int ring_end; ++ unsigned int ring_size; ++ unsigned int front_offset; ++ unsigned int back_offset; ++ unsigned int depth_offset; ++ unsigned int w; ++ unsigned int h; ++ unsigned int pitch; ++ unsigned int pitch_bits; ++} drm_i810_pre12_init_t; ++typedef struct _drm_i810_tex_region { ++ unsigned char next, prev; ++ unsigned char in_use; ++ int age; ++} drm_i810_tex_region_t; ++typedef struct _drm_i810_sarea { ++ unsigned int ContextState[I810_CTX_SETUP_SIZE]; ++ unsigned int BufferState[I810_DEST_SETUP_SIZE]; ++ unsigned int TexState[2][I810_TEX_SETUP_SIZE]; ++ unsigned int dirty; ++ unsigned int nbox; ++ struct drm_clip_rect boxes[I810_NR_SAREA_CLIPRECTS]; ++ drm_i810_tex_region_t texList[I810_NR_TEX_REGIONS + 1]; ++ int texAge; ++ int last_enqueue; ++ int last_dispatch; ++ int last_quiescent; ++ int ctxOwner; ++ int vertex_prim; ++ int pf_enabled; ++ int pf_active; ++ int pf_current_page; ++} drm_i810_sarea_t; ++#define DRM_I810_INIT 0x00 ++#define DRM_I810_VERTEX 0x01 ++#define DRM_I810_CLEAR 0x02 ++#define DRM_I810_FLUSH 0x03 ++#define DRM_I810_GETAGE 0x04 ++#define DRM_I810_GETBUF 0x05 ++#define DRM_I810_SWAP 0x06 ++#define DRM_I810_COPY 0x07 ++#define DRM_I810_DOCOPY 0x08 ++#define DRM_I810_OV0INFO 0x09 ++#define DRM_I810_FSTATUS 0x0a ++#define DRM_I810_OV0FLIP 0x0b ++#define DRM_I810_MC 0x0c ++#define DRM_I810_RSTATUS 0x0d ++#define DRM_I810_FLIP 0x0e ++#define DRM_IOCTL_I810_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I810_INIT, drm_i810_init_t) ++#define DRM_IOCTL_I810_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_I810_VERTEX, drm_i810_vertex_t) ++#define DRM_IOCTL_I810_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_I810_CLEAR, drm_i810_clear_t) ++#define DRM_IOCTL_I810_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLUSH) ++#define DRM_IOCTL_I810_GETAGE DRM_IO(DRM_COMMAND_BASE + DRM_I810_GETAGE) ++#define DRM_IOCTL_I810_GETBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_I810_GETBUF, drm_i810_dma_t) ++#define DRM_IOCTL_I810_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_I810_SWAP) ++#define DRM_IOCTL_I810_COPY DRM_IOW(DRM_COMMAND_BASE + DRM_I810_COPY, drm_i810_copy_t) ++#define DRM_IOCTL_I810_DOCOPY DRM_IO(DRM_COMMAND_BASE + DRM_I810_DOCOPY) ++#define DRM_IOCTL_I810_OV0INFO DRM_IOR(DRM_COMMAND_BASE + DRM_I810_OV0INFO, drm_i810_overlay_t) ++#define DRM_IOCTL_I810_FSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_FSTATUS) ++#define DRM_IOCTL_I810_OV0FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_OV0FLIP) ++#define DRM_IOCTL_I810_MC DRM_IOW(DRM_COMMAND_BASE + DRM_I810_MC, drm_i810_mc_t) ++#define DRM_IOCTL_I810_RSTATUS DRM_IO(DRM_COMMAND_BASE + DRM_I810_RSTATUS) ++#define DRM_IOCTL_I810_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I810_FLIP) ++typedef struct _drm_i810_clear { ++ int clear_color; ++ int clear_depth; ++ int flags; ++} drm_i810_clear_t; ++typedef struct _drm_i810_vertex { ++ int idx; ++ int used; ++ int discard; ++} drm_i810_vertex_t; ++typedef struct _drm_i810_copy_t { ++ int idx; ++ int used; ++ void * address; ++} drm_i810_copy_t; ++#define PR_TRIANGLES (0x0 << 18) ++#define PR_TRISTRIP_0 (0x1 << 18) ++#define PR_TRISTRIP_1 (0x2 << 18) ++#define PR_TRIFAN (0x3 << 18) ++#define PR_POLYGON (0x4 << 18) ++#define PR_LINES (0x5 << 18) ++#define PR_LINESTRIP (0x6 << 18) ++#define PR_RECTS (0x7 << 18) ++#define PR_MASK (0x7 << 18) ++typedef struct drm_i810_dma { ++ void * __linux_virtual; ++ int request_idx; ++ int request_size; ++ int granted; ++} drm_i810_dma_t; ++typedef struct _drm_i810_overlay_t { ++ unsigned int offset; ++ unsigned int physical; ++} drm_i810_overlay_t; ++typedef struct _drm_i810_mc { ++ int idx; ++ int used; ++ int num_blocks; ++ int * length; ++ unsigned int last_render; ++} drm_i810_mc_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/i915_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/i915_drm.h +new file mode 100644 +index 0000000..c634925 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/i915_drm.h +@@ -0,0 +1,937 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_I915_DRM_H_ ++#define _UAPI_I915_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define I915_L3_PARITY_UEVENT "L3_PARITY_ERROR" ++#define I915_ERROR_UEVENT "ERROR" ++#define I915_RESET_UEVENT "RESET" ++struct i915_user_extension { ++ __u64 next_extension; ++ __u32 name; ++ __u32 flags; ++ __u32 rsvd[4]; ++}; ++enum i915_mocs_table_index { ++ I915_MOCS_UNCACHED, ++ I915_MOCS_PTE, ++ I915_MOCS_CACHED, ++}; ++enum drm_i915_gem_engine_class { ++ I915_ENGINE_CLASS_RENDER = 0, ++ I915_ENGINE_CLASS_COPY = 1, ++ I915_ENGINE_CLASS_VIDEO = 2, ++ I915_ENGINE_CLASS_VIDEO_ENHANCE = 3, ++ I915_ENGINE_CLASS_INVALID = - 1 ++}; ++struct i915_engine_class_instance { ++ __u16 engine_class; ++ __u16 engine_instance; ++#define I915_ENGINE_CLASS_INVALID_NONE - 1 ++#define I915_ENGINE_CLASS_INVALID_VIRTUAL - 2 ++}; ++enum drm_i915_pmu_engine_sample { ++ I915_SAMPLE_BUSY = 0, ++ I915_SAMPLE_WAIT = 1, ++ I915_SAMPLE_SEMA = 2 ++}; ++#define I915_PMU_SAMPLE_BITS (4) ++#define I915_PMU_SAMPLE_MASK (0xf) ++#define I915_PMU_SAMPLE_INSTANCE_BITS (8) ++#define I915_PMU_CLASS_SHIFT (I915_PMU_SAMPLE_BITS + I915_PMU_SAMPLE_INSTANCE_BITS) ++#define __I915_PMU_ENGINE(class,instance,sample) ((class) << I915_PMU_CLASS_SHIFT | (instance) << I915_PMU_SAMPLE_BITS | (sample)) ++#define I915_PMU_ENGINE_BUSY(class,instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_BUSY) ++#define I915_PMU_ENGINE_WAIT(class,instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_WAIT) ++#define I915_PMU_ENGINE_SEMA(class,instance) __I915_PMU_ENGINE(class, instance, I915_SAMPLE_SEMA) ++#define __I915_PMU_OTHER(x) (__I915_PMU_ENGINE(0xff, 0xff, 0xf) + 1 + (x)) ++#define I915_PMU_ACTUAL_FREQUENCY __I915_PMU_OTHER(0) ++#define I915_PMU_REQUESTED_FREQUENCY __I915_PMU_OTHER(1) ++#define I915_PMU_INTERRUPTS __I915_PMU_OTHER(2) ++#define I915_PMU_RC6_RESIDENCY __I915_PMU_OTHER(3) ++#define I915_PMU_LAST I915_PMU_RC6_RESIDENCY ++#define I915_NR_TEX_REGIONS 255 ++#define I915_LOG_MIN_TEX_REGION_SIZE 14 ++typedef struct _drm_i915_init { ++ enum { ++ I915_INIT_DMA = 0x01, ++ I915_CLEANUP_DMA = 0x02, ++ I915_RESUME_DMA = 0x03 ++ } func; ++ unsigned int mmio_offset; ++ int sarea_priv_offset; ++ unsigned int ring_start; ++ unsigned int ring_end; ++ unsigned int ring_size; ++ unsigned int front_offset; ++ unsigned int back_offset; ++ unsigned int depth_offset; ++ unsigned int w; ++ unsigned int h; ++ unsigned int pitch; ++ unsigned int pitch_bits; ++ unsigned int back_pitch; ++ unsigned int depth_pitch; ++ unsigned int cpp; ++ unsigned int chipset; ++} drm_i915_init_t; ++typedef struct _drm_i915_sarea { ++ struct drm_tex_region texList[I915_NR_TEX_REGIONS + 1]; ++ int last_upload; ++ int last_enqueue; ++ int last_dispatch; ++ int ctxOwner; ++ int texAge; ++ int pf_enabled; ++ int pf_active; ++ int pf_current_page; ++ int perf_boxes; ++ int width, height; ++ drm_handle_t front_handle; ++ int front_offset; ++ int front_size; ++ drm_handle_t back_handle; ++ int back_offset; ++ int back_size; ++ drm_handle_t depth_handle; ++ int depth_offset; ++ int depth_size; ++ drm_handle_t tex_handle; ++ int tex_offset; ++ int tex_size; ++ int log_tex_granularity; ++ int pitch; ++ int rotation; ++ int rotated_offset; ++ int rotated_size; ++ int rotated_pitch; ++ int virtualX, virtualY; ++ unsigned int front_tiled; ++ unsigned int back_tiled; ++ unsigned int depth_tiled; ++ unsigned int rotated_tiled; ++ unsigned int rotated2_tiled; ++ int pipeA_x; ++ int pipeA_y; ++ int pipeA_w; ++ int pipeA_h; ++ int pipeB_x; ++ int pipeB_y; ++ int pipeB_w; ++ int pipeB_h; ++ drm_handle_t unused_handle; ++ __u32 unused1, unused2, unused3; ++ __u32 front_bo_handle; ++ __u32 back_bo_handle; ++ __u32 unused_bo_handle; ++ __u32 depth_bo_handle; ++} drm_i915_sarea_t; ++#define planeA_x pipeA_x ++#define planeA_y pipeA_y ++#define planeA_w pipeA_w ++#define planeA_h pipeA_h ++#define planeB_x pipeB_x ++#define planeB_y pipeB_y ++#define planeB_w pipeB_w ++#define planeB_h pipeB_h ++#define I915_BOX_RING_EMPTY 0x1 ++#define I915_BOX_FLIP 0x2 ++#define I915_BOX_WAIT 0x4 ++#define I915_BOX_TEXTURE_LOAD 0x8 ++#define I915_BOX_LOST_CONTEXT 0x10 ++#define DRM_I915_INIT 0x00 ++#define DRM_I915_FLUSH 0x01 ++#define DRM_I915_FLIP 0x02 ++#define DRM_I915_BATCHBUFFER 0x03 ++#define DRM_I915_IRQ_EMIT 0x04 ++#define DRM_I915_IRQ_WAIT 0x05 ++#define DRM_I915_GETPARAM 0x06 ++#define DRM_I915_SETPARAM 0x07 ++#define DRM_I915_ALLOC 0x08 ++#define DRM_I915_FREE 0x09 ++#define DRM_I915_INIT_HEAP 0x0a ++#define DRM_I915_CMDBUFFER 0x0b ++#define DRM_I915_DESTROY_HEAP 0x0c ++#define DRM_I915_SET_VBLANK_PIPE 0x0d ++#define DRM_I915_GET_VBLANK_PIPE 0x0e ++#define DRM_I915_VBLANK_SWAP 0x0f ++#define DRM_I915_HWS_ADDR 0x11 ++#define DRM_I915_GEM_INIT 0x13 ++#define DRM_I915_GEM_EXECBUFFER 0x14 ++#define DRM_I915_GEM_PIN 0x15 ++#define DRM_I915_GEM_UNPIN 0x16 ++#define DRM_I915_GEM_BUSY 0x17 ++#define DRM_I915_GEM_THROTTLE 0x18 ++#define DRM_I915_GEM_ENTERVT 0x19 ++#define DRM_I915_GEM_LEAVEVT 0x1a ++#define DRM_I915_GEM_CREATE 0x1b ++#define DRM_I915_GEM_PREAD 0x1c ++#define DRM_I915_GEM_PWRITE 0x1d ++#define DRM_I915_GEM_MMAP 0x1e ++#define DRM_I915_GEM_SET_DOMAIN 0x1f ++#define DRM_I915_GEM_SW_FINISH 0x20 ++#define DRM_I915_GEM_SET_TILING 0x21 ++#define DRM_I915_GEM_GET_TILING 0x22 ++#define DRM_I915_GEM_GET_APERTURE 0x23 ++#define DRM_I915_GEM_MMAP_GTT 0x24 ++#define DRM_I915_GET_PIPE_FROM_CRTC_ID 0x25 ++#define DRM_I915_GEM_MADVISE 0x26 ++#define DRM_I915_OVERLAY_PUT_IMAGE 0x27 ++#define DRM_I915_OVERLAY_ATTRS 0x28 ++#define DRM_I915_GEM_EXECBUFFER2 0x29 ++#define DRM_I915_GEM_EXECBUFFER2_WR DRM_I915_GEM_EXECBUFFER2 ++#define DRM_I915_GET_SPRITE_COLORKEY 0x2a ++#define DRM_I915_SET_SPRITE_COLORKEY 0x2b ++#define DRM_I915_GEM_WAIT 0x2c ++#define DRM_I915_GEM_CONTEXT_CREATE 0x2d ++#define DRM_I915_GEM_CONTEXT_DESTROY 0x2e ++#define DRM_I915_GEM_SET_CACHING 0x2f ++#define DRM_I915_GEM_GET_CACHING 0x30 ++#define DRM_I915_REG_READ 0x31 ++#define DRM_I915_GET_RESET_STATS 0x32 ++#define DRM_I915_GEM_USERPTR 0x33 ++#define DRM_I915_GEM_CONTEXT_GETPARAM 0x34 ++#define DRM_I915_GEM_CONTEXT_SETPARAM 0x35 ++#define DRM_I915_PERF_OPEN 0x36 ++#define DRM_I915_PERF_ADD_CONFIG 0x37 ++#define DRM_I915_PERF_REMOVE_CONFIG 0x38 ++#define DRM_I915_QUERY 0x39 ++#define DRM_I915_GEM_VM_CREATE 0x3a ++#define DRM_I915_GEM_VM_DESTROY 0x3b ++#define DRM_IOCTL_I915_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t) ++#define DRM_IOCTL_I915_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLUSH) ++#define DRM_IOCTL_I915_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_I915_FLIP) ++#define DRM_IOCTL_I915_BATCHBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_BATCHBUFFER, drm_i915_batchbuffer_t) ++#define DRM_IOCTL_I915_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_IRQ_EMIT, drm_i915_irq_emit_t) ++#define DRM_IOCTL_I915_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_IRQ_WAIT, drm_i915_irq_wait_t) ++#define DRM_IOCTL_I915_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GETPARAM, drm_i915_getparam_t) ++#define DRM_IOCTL_I915_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SETPARAM, drm_i915_setparam_t) ++#define DRM_IOCTL_I915_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_ALLOC, drm_i915_mem_alloc_t) ++#define DRM_IOCTL_I915_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_FREE, drm_i915_mem_free_t) ++#define DRM_IOCTL_I915_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_INIT_HEAP, drm_i915_mem_init_heap_t) ++#define DRM_IOCTL_I915_CMDBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_CMDBUFFER, drm_i915_cmdbuffer_t) ++#define DRM_IOCTL_I915_DESTROY_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_I915_DESTROY_HEAP, drm_i915_mem_destroy_heap_t) ++#define DRM_IOCTL_I915_SET_VBLANK_PIPE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_SET_VBLANK_PIPE, drm_i915_vblank_pipe_t) ++#define DRM_IOCTL_I915_GET_VBLANK_PIPE DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GET_VBLANK_PIPE, drm_i915_vblank_pipe_t) ++#define DRM_IOCTL_I915_VBLANK_SWAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_VBLANK_SWAP, drm_i915_vblank_swap_t) ++#define DRM_IOCTL_I915_HWS_ADDR DRM_IOW(DRM_COMMAND_BASE + DRM_I915_HWS_ADDR, struct drm_i915_gem_init) ++#define DRM_IOCTL_I915_GEM_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_INIT, struct drm_i915_gem_init) ++#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer) ++#define DRM_IOCTL_I915_GEM_EXECBUFFER2 DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2, struct drm_i915_gem_execbuffer2) ++#define DRM_IOCTL_I915_GEM_EXECBUFFER2_WR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER2_WR, struct drm_i915_gem_execbuffer2) ++#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin) ++#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin) ++#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy) ++#define DRM_IOCTL_I915_GEM_SET_CACHING DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_CACHING, struct drm_i915_gem_caching) ++#define DRM_IOCTL_I915_GEM_GET_CACHING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_CACHING, struct drm_i915_gem_caching) ++#define DRM_IOCTL_I915_GEM_THROTTLE DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_THROTTLE) ++#define DRM_IOCTL_I915_GEM_ENTERVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_ENTERVT) ++#define DRM_IOCTL_I915_GEM_LEAVEVT DRM_IO(DRM_COMMAND_BASE + DRM_I915_GEM_LEAVEVT) ++#define DRM_IOCTL_I915_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CREATE, struct drm_i915_gem_create) ++#define DRM_IOCTL_I915_GEM_PREAD DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PREAD, struct drm_i915_gem_pread) ++#define DRM_IOCTL_I915_GEM_PWRITE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_PWRITE, struct drm_i915_gem_pwrite) ++#define DRM_IOCTL_I915_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP, struct drm_i915_gem_mmap) ++#define DRM_IOCTL_I915_GEM_MMAP_GTT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_gtt) ++#define DRM_IOCTL_I915_GEM_MMAP_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MMAP_GTT, struct drm_i915_gem_mmap_offset) ++#define DRM_IOCTL_I915_GEM_SET_DOMAIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SET_DOMAIN, struct drm_i915_gem_set_domain) ++#define DRM_IOCTL_I915_GEM_SW_FINISH DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_SW_FINISH, struct drm_i915_gem_sw_finish) ++#define DRM_IOCTL_I915_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_SET_TILING, struct drm_i915_gem_set_tiling) ++#define DRM_IOCTL_I915_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_TILING, struct drm_i915_gem_get_tiling) ++#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR(DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture) ++#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id) ++#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) ++#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image) ++#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs) ++#define DRM_IOCTL_I915_SET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_SET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) ++#define DRM_IOCTL_I915_GET_SPRITE_COLORKEY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_SPRITE_COLORKEY, struct drm_intel_sprite_colorkey) ++#define DRM_IOCTL_I915_GEM_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_WAIT, struct drm_i915_gem_wait) ++#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create) ++#define DRM_IOCTL_I915_GEM_CONTEXT_CREATE_EXT DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_CREATE, struct drm_i915_gem_context_create_ext) ++#define DRM_IOCTL_I915_GEM_CONTEXT_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_DESTROY, struct drm_i915_gem_context_destroy) ++#define DRM_IOCTL_I915_REG_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_REG_READ, struct drm_i915_reg_read) ++#define DRM_IOCTL_I915_GET_RESET_STATS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_RESET_STATS, struct drm_i915_reset_stats) ++#define DRM_IOCTL_I915_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_USERPTR, struct drm_i915_gem_userptr) ++#define DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_GETPARAM, struct drm_i915_gem_context_param) ++#define DRM_IOCTL_I915_GEM_CONTEXT_SETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_CONTEXT_SETPARAM, struct drm_i915_gem_context_param) ++#define DRM_IOCTL_I915_PERF_OPEN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_OPEN, struct drm_i915_perf_open_param) ++#define DRM_IOCTL_I915_PERF_ADD_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_ADD_CONFIG, struct drm_i915_perf_oa_config) ++#define DRM_IOCTL_I915_PERF_REMOVE_CONFIG DRM_IOW(DRM_COMMAND_BASE + DRM_I915_PERF_REMOVE_CONFIG, __u64) ++#define DRM_IOCTL_I915_QUERY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_QUERY, struct drm_i915_query) ++#define DRM_IOCTL_I915_GEM_VM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_VM_CREATE, struct drm_i915_gem_vm_control) ++#define DRM_IOCTL_I915_GEM_VM_DESTROY DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_VM_DESTROY, struct drm_i915_gem_vm_control) ++typedef struct drm_i915_batchbuffer { ++ int start; ++ int used; ++ int DR1; ++ int DR4; ++ int num_cliprects; ++ struct drm_clip_rect __user * cliprects; ++} drm_i915_batchbuffer_t; ++typedef struct _drm_i915_cmdbuffer { ++ char __user * buf; ++ int sz; ++ int DR1; ++ int DR4; ++ int num_cliprects; ++ struct drm_clip_rect __user * cliprects; ++} drm_i915_cmdbuffer_t; ++typedef struct drm_i915_irq_emit { ++ int __user * irq_seq; ++} drm_i915_irq_emit_t; ++typedef struct drm_i915_irq_wait { ++ int irq_seq; ++} drm_i915_irq_wait_t; ++#define I915_GEM_PPGTT_NONE 0 ++#define I915_GEM_PPGTT_ALIASING 1 ++#define I915_GEM_PPGTT_FULL 2 ++#define I915_PARAM_IRQ_ACTIVE 1 ++#define I915_PARAM_ALLOW_BATCHBUFFER 2 ++#define I915_PARAM_LAST_DISPATCH 3 ++#define I915_PARAM_CHIPSET_ID 4 ++#define I915_PARAM_HAS_GEM 5 ++#define I915_PARAM_NUM_FENCES_AVAIL 6 ++#define I915_PARAM_HAS_OVERLAY 7 ++#define I915_PARAM_HAS_PAGEFLIPPING 8 ++#define I915_PARAM_HAS_EXECBUF2 9 ++#define I915_PARAM_HAS_BSD 10 ++#define I915_PARAM_HAS_BLT 11 ++#define I915_PARAM_HAS_RELAXED_FENCING 12 ++#define I915_PARAM_HAS_COHERENT_RINGS 13 ++#define I915_PARAM_HAS_EXEC_CONSTANTS 14 ++#define I915_PARAM_HAS_RELAXED_DELTA 15 ++#define I915_PARAM_HAS_GEN7_SOL_RESET 16 ++#define I915_PARAM_HAS_LLC 17 ++#define I915_PARAM_HAS_ALIASING_PPGTT 18 ++#define I915_PARAM_HAS_WAIT_TIMEOUT 19 ++#define I915_PARAM_HAS_SEMAPHORES 20 ++#define I915_PARAM_HAS_PRIME_VMAP_FLUSH 21 ++#define I915_PARAM_HAS_VEBOX 22 ++#define I915_PARAM_HAS_SECURE_BATCHES 23 ++#define I915_PARAM_HAS_PINNED_BATCHES 24 ++#define I915_PARAM_HAS_EXEC_NO_RELOC 25 ++#define I915_PARAM_HAS_EXEC_HANDLE_LUT 26 ++#define I915_PARAM_HAS_WT 27 ++#define I915_PARAM_CMD_PARSER_VERSION 28 ++#define I915_PARAM_HAS_COHERENT_PHYS_GTT 29 ++#define I915_PARAM_MMAP_VERSION 30 ++#define I915_PARAM_HAS_BSD2 31 ++#define I915_PARAM_REVISION 32 ++#define I915_PARAM_SUBSLICE_TOTAL 33 ++#define I915_PARAM_EU_TOTAL 34 ++#define I915_PARAM_HAS_GPU_RESET 35 ++#define I915_PARAM_HAS_RESOURCE_STREAMER 36 ++#define I915_PARAM_HAS_EXEC_SOFTPIN 37 ++#define I915_PARAM_HAS_POOLED_EU 38 ++#define I915_PARAM_MIN_EU_IN_POOL 39 ++#define I915_PARAM_MMAP_GTT_VERSION 40 ++#define I915_PARAM_HAS_SCHEDULER 41 ++#define I915_SCHEDULER_CAP_ENABLED (1ul << 0) ++#define I915_SCHEDULER_CAP_PRIORITY (1ul << 1) ++#define I915_SCHEDULER_CAP_PREEMPTION (1ul << 2) ++#define I915_SCHEDULER_CAP_SEMAPHORES (1ul << 3) ++#define I915_SCHEDULER_CAP_ENGINE_BUSY_STATS (1ul << 4) ++#define I915_PARAM_HUC_STATUS 42 ++#define I915_PARAM_HAS_EXEC_ASYNC 43 ++#define I915_PARAM_HAS_EXEC_FENCE 44 ++#define I915_PARAM_HAS_EXEC_CAPTURE 45 ++#define I915_PARAM_SLICE_MASK 46 ++#define I915_PARAM_SUBSLICE_MASK 47 ++#define I915_PARAM_HAS_EXEC_BATCH_FIRST 48 ++#define I915_PARAM_HAS_EXEC_FENCE_ARRAY 49 ++#define I915_PARAM_HAS_CONTEXT_ISOLATION 50 ++#define I915_PARAM_CS_TIMESTAMP_FREQUENCY 51 ++#define I915_PARAM_MMAP_GTT_COHERENT 52 ++#define I915_PARAM_HAS_EXEC_SUBMIT_FENCE 53 ++#define I915_PARAM_PERF_REVISION 54 ++#define I915_PARAM_HAS_EXEC_TIMELINE_FENCES 55 ++typedef struct drm_i915_getparam { ++ __s32 param; ++ int __user * value; ++} drm_i915_getparam_t; ++#define I915_SETPARAM_USE_MI_BATCHBUFFER_START 1 ++#define I915_SETPARAM_TEX_LRU_LOG_GRANULARITY 2 ++#define I915_SETPARAM_ALLOW_BATCHBUFFER 3 ++#define I915_SETPARAM_NUM_USED_FENCES 4 ++typedef struct drm_i915_setparam { ++ int param; ++ int value; ++} drm_i915_setparam_t; ++#define I915_MEM_REGION_AGP 1 ++typedef struct drm_i915_mem_alloc { ++ int region; ++ int alignment; ++ int size; ++ int __user * region_offset; ++} drm_i915_mem_alloc_t; ++typedef struct drm_i915_mem_free { ++ int region; ++ int region_offset; ++} drm_i915_mem_free_t; ++typedef struct drm_i915_mem_init_heap { ++ int region; ++ int size; ++ int start; ++} drm_i915_mem_init_heap_t; ++typedef struct drm_i915_mem_destroy_heap { ++ int region; ++} drm_i915_mem_destroy_heap_t; ++#define DRM_I915_VBLANK_PIPE_A 1 ++#define DRM_I915_VBLANK_PIPE_B 2 ++typedef struct drm_i915_vblank_pipe { ++ int pipe; ++} drm_i915_vblank_pipe_t; ++typedef struct drm_i915_vblank_swap { ++ drm_drawable_t drawable; ++ enum drm_vblank_seq_type seqtype; ++ unsigned int sequence; ++} drm_i915_vblank_swap_t; ++typedef struct drm_i915_hws_addr { ++ __u64 addr; ++} drm_i915_hws_addr_t; ++struct drm_i915_gem_init { ++ __u64 gtt_start; ++ __u64 gtt_end; ++}; ++struct drm_i915_gem_create { ++ __u64 size; ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_i915_gem_pread { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 data_ptr; ++}; ++struct drm_i915_gem_pwrite { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 data_ptr; ++}; ++struct drm_i915_gem_mmap { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 addr_ptr; ++ __u64 flags; ++#define I915_MMAP_WC 0x1 ++}; ++struct drm_i915_gem_mmap_gtt { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++struct drm_i915_gem_mmap_offset { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 flags; ++#define I915_MMAP_OFFSET_GTT 0 ++#define I915_MMAP_OFFSET_WC 1 ++#define I915_MMAP_OFFSET_WB 2 ++#define I915_MMAP_OFFSET_UC 3 ++ __u64 extensions; ++}; ++struct drm_i915_gem_set_domain { ++ __u32 handle; ++ __u32 read_domains; ++ __u32 write_domain; ++}; ++struct drm_i915_gem_sw_finish { ++ __u32 handle; ++}; ++struct drm_i915_gem_relocation_entry { ++ __u32 target_handle; ++ __u32 delta; ++ __u64 offset; ++ __u64 presumed_offset; ++ __u32 read_domains; ++ __u32 write_domain; ++}; ++#define I915_GEM_DOMAIN_CPU 0x00000001 ++#define I915_GEM_DOMAIN_RENDER 0x00000002 ++#define I915_GEM_DOMAIN_SAMPLER 0x00000004 ++#define I915_GEM_DOMAIN_COMMAND 0x00000008 ++#define I915_GEM_DOMAIN_INSTRUCTION 0x00000010 ++#define I915_GEM_DOMAIN_VERTEX 0x00000020 ++#define I915_GEM_DOMAIN_GTT 0x00000040 ++#define I915_GEM_DOMAIN_WC 0x00000080 ++struct drm_i915_gem_exec_object { ++ __u32 handle; ++ __u32 relocation_count; ++ __u64 relocs_ptr; ++ __u64 alignment; ++ __u64 offset; ++}; ++struct drm_i915_gem_execbuffer { ++ __u64 buffers_ptr; ++ __u32 buffer_count; ++ __u32 batch_start_offset; ++ __u32 batch_len; ++ __u32 DR1; ++ __u32 DR4; ++ __u32 num_cliprects; ++ __u64 cliprects_ptr; ++}; ++struct drm_i915_gem_exec_object2 { ++ __u32 handle; ++ __u32 relocation_count; ++ __u64 relocs_ptr; ++ __u64 alignment; ++ __u64 offset; ++#define EXEC_OBJECT_NEEDS_FENCE (1 << 0) ++#define EXEC_OBJECT_NEEDS_GTT (1 << 1) ++#define EXEC_OBJECT_WRITE (1 << 2) ++#define EXEC_OBJECT_SUPPORTS_48B_ADDRESS (1 << 3) ++#define EXEC_OBJECT_PINNED (1 << 4) ++#define EXEC_OBJECT_PAD_TO_SIZE (1 << 5) ++#define EXEC_OBJECT_ASYNC (1 << 6) ++#define EXEC_OBJECT_CAPTURE (1 << 7) ++#define __EXEC_OBJECT_UNKNOWN_FLAGS - (EXEC_OBJECT_CAPTURE << 1) ++ __u64 flags; ++ union { ++ __u64 rsvd1; ++ __u64 pad_to_size; ++ }; ++ __u64 rsvd2; ++}; ++struct drm_i915_gem_exec_fence { ++ __u32 handle; ++#define I915_EXEC_FENCE_WAIT (1 << 0) ++#define I915_EXEC_FENCE_SIGNAL (1 << 1) ++#define __I915_EXEC_FENCE_UNKNOWN_FLAGS (- (I915_EXEC_FENCE_SIGNAL << 1)) ++ __u32 flags; ++}; ++#define DRM_I915_GEM_EXECBUFFER_EXT_TIMELINE_FENCES 0 ++struct drm_i915_gem_execbuffer_ext_timeline_fences { ++ struct i915_user_extension base; ++ __u64 fence_count; ++ __u64 handles_ptr; ++ __u64 values_ptr; ++}; ++struct drm_i915_gem_execbuffer2 { ++ __u64 buffers_ptr; ++ __u32 buffer_count; ++ __u32 batch_start_offset; ++ __u32 batch_len; ++ __u32 DR1; ++ __u32 DR4; ++ __u32 num_cliprects; ++ __u64 cliprects_ptr; ++#define I915_EXEC_RING_MASK (0x3f) ++#define I915_EXEC_DEFAULT (0 << 0) ++#define I915_EXEC_RENDER (1 << 0) ++#define I915_EXEC_BSD (2 << 0) ++#define I915_EXEC_BLT (3 << 0) ++#define I915_EXEC_VEBOX (4 << 0) ++#define I915_EXEC_CONSTANTS_MASK (3 << 6) ++#define I915_EXEC_CONSTANTS_REL_GENERAL (0 << 6) ++#define I915_EXEC_CONSTANTS_ABSOLUTE (1 << 6) ++#define I915_EXEC_CONSTANTS_REL_SURFACE (2 << 6) ++ __u64 flags; ++ __u64 rsvd1; ++ __u64 rsvd2; ++}; ++#define I915_EXEC_GEN7_SOL_RESET (1 << 8) ++#define I915_EXEC_SECURE (1 << 9) ++#define I915_EXEC_IS_PINNED (1 << 10) ++#define I915_EXEC_NO_RELOC (1 << 11) ++#define I915_EXEC_HANDLE_LUT (1 << 12) ++#define I915_EXEC_BSD_SHIFT (13) ++#define I915_EXEC_BSD_MASK (3 << I915_EXEC_BSD_SHIFT) ++#define I915_EXEC_BSD_DEFAULT (0 << I915_EXEC_BSD_SHIFT) ++#define I915_EXEC_BSD_RING1 (1 << I915_EXEC_BSD_SHIFT) ++#define I915_EXEC_BSD_RING2 (2 << I915_EXEC_BSD_SHIFT) ++#define I915_EXEC_RESOURCE_STREAMER (1 << 15) ++#define I915_EXEC_FENCE_IN (1 << 16) ++#define I915_EXEC_FENCE_OUT (1 << 17) ++#define I915_EXEC_BATCH_FIRST (1 << 18) ++#define I915_EXEC_FENCE_ARRAY (1 << 19) ++#define I915_EXEC_FENCE_SUBMIT (1 << 20) ++#define I915_EXEC_USE_EXTENSIONS (1 << 21) ++#define __I915_EXEC_UNKNOWN_FLAGS (- (I915_EXEC_USE_EXTENSIONS << 1)) ++#define I915_EXEC_CONTEXT_ID_MASK (0xffffffff) ++#define i915_execbuffer2_set_context_id(eb2,context) (eb2).rsvd1 = context & I915_EXEC_CONTEXT_ID_MASK ++#define i915_execbuffer2_get_context_id(eb2) ((eb2).rsvd1 & I915_EXEC_CONTEXT_ID_MASK) ++struct drm_i915_gem_pin { ++ __u32 handle; ++ __u32 pad; ++ __u64 alignment; ++ __u64 offset; ++}; ++struct drm_i915_gem_unpin { ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_i915_gem_busy { ++ __u32 handle; ++ __u32 busy; ++}; ++#define I915_CACHING_NONE 0 ++#define I915_CACHING_CACHED 1 ++#define I915_CACHING_DISPLAY 2 ++struct drm_i915_gem_caching { ++ __u32 handle; ++ __u32 caching; ++}; ++#define I915_TILING_NONE 0 ++#define I915_TILING_X 1 ++#define I915_TILING_Y 2 ++#define I915_TILING_LAST I915_TILING_Y ++#define I915_BIT_6_SWIZZLE_NONE 0 ++#define I915_BIT_6_SWIZZLE_9 1 ++#define I915_BIT_6_SWIZZLE_9_10 2 ++#define I915_BIT_6_SWIZZLE_9_11 3 ++#define I915_BIT_6_SWIZZLE_9_10_11 4 ++#define I915_BIT_6_SWIZZLE_UNKNOWN 5 ++#define I915_BIT_6_SWIZZLE_9_17 6 ++#define I915_BIT_6_SWIZZLE_9_10_17 7 ++struct drm_i915_gem_set_tiling { ++ __u32 handle; ++ __u32 tiling_mode; ++ __u32 stride; ++ __u32 swizzle_mode; ++}; ++struct drm_i915_gem_get_tiling { ++ __u32 handle; ++ __u32 tiling_mode; ++ __u32 swizzle_mode; ++ __u32 phys_swizzle_mode; ++}; ++struct drm_i915_gem_get_aperture { ++ __u64 aper_size; ++ __u64 aper_available_size; ++}; ++struct drm_i915_get_pipe_from_crtc_id { ++ __u32 crtc_id; ++ __u32 pipe; ++}; ++#define I915_MADV_WILLNEED 0 ++#define I915_MADV_DONTNEED 1 ++#define __I915_MADV_PURGED 2 ++struct drm_i915_gem_madvise { ++ __u32 handle; ++ __u32 madv; ++ __u32 retained; ++}; ++#define I915_OVERLAY_TYPE_MASK 0xff ++#define I915_OVERLAY_YUV_PLANAR 0x01 ++#define I915_OVERLAY_YUV_PACKED 0x02 ++#define I915_OVERLAY_RGB 0x03 ++#define I915_OVERLAY_DEPTH_MASK 0xff00 ++#define I915_OVERLAY_RGB24 0x1000 ++#define I915_OVERLAY_RGB16 0x2000 ++#define I915_OVERLAY_RGB15 0x3000 ++#define I915_OVERLAY_YUV422 0x0100 ++#define I915_OVERLAY_YUV411 0x0200 ++#define I915_OVERLAY_YUV420 0x0300 ++#define I915_OVERLAY_YUV410 0x0400 ++#define I915_OVERLAY_SWAP_MASK 0xff0000 ++#define I915_OVERLAY_NO_SWAP 0x000000 ++#define I915_OVERLAY_UV_SWAP 0x010000 ++#define I915_OVERLAY_Y_SWAP 0x020000 ++#define I915_OVERLAY_Y_AND_UV_SWAP 0x030000 ++#define I915_OVERLAY_FLAGS_MASK 0xff000000 ++#define I915_OVERLAY_ENABLE 0x01000000 ++struct drm_intel_overlay_put_image { ++ __u32 flags; ++ __u32 bo_handle; ++ __u16 stride_Y; ++ __u16 stride_UV; ++ __u32 offset_Y; ++ __u32 offset_U; ++ __u32 offset_V; ++ __u16 src_width; ++ __u16 src_height; ++ __u16 src_scan_width; ++ __u16 src_scan_height; ++ __u32 crtc_id; ++ __u16 dst_x; ++ __u16 dst_y; ++ __u16 dst_width; ++ __u16 dst_height; ++}; ++#define I915_OVERLAY_UPDATE_ATTRS (1 << 0) ++#define I915_OVERLAY_UPDATE_GAMMA (1 << 1) ++#define I915_OVERLAY_DISABLE_DEST_COLORKEY (1 << 2) ++struct drm_intel_overlay_attrs { ++ __u32 flags; ++ __u32 color_key; ++ __s32 brightness; ++ __u32 contrast; ++ __u32 saturation; ++ __u32 gamma0; ++ __u32 gamma1; ++ __u32 gamma2; ++ __u32 gamma3; ++ __u32 gamma4; ++ __u32 gamma5; ++}; ++#define I915_SET_COLORKEY_NONE (1 << 0) ++#define I915_SET_COLORKEY_DESTINATION (1 << 1) ++#define I915_SET_COLORKEY_SOURCE (1 << 2) ++struct drm_intel_sprite_colorkey { ++ __u32 plane_id; ++ __u32 min_value; ++ __u32 channel_mask; ++ __u32 max_value; ++ __u32 flags; ++}; ++struct drm_i915_gem_wait { ++ __u32 bo_handle; ++ __u32 flags; ++ __s64 timeout_ns; ++}; ++struct drm_i915_gem_context_create { ++ __u32 ctx_id; ++ __u32 pad; ++}; ++struct drm_i915_gem_context_create_ext { ++ __u32 ctx_id; ++ __u32 flags; ++#define I915_CONTEXT_CREATE_FLAGS_USE_EXTENSIONS (1u << 0) ++#define I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE (1u << 1) ++#define I915_CONTEXT_CREATE_FLAGS_UNKNOWN (- (I915_CONTEXT_CREATE_FLAGS_SINGLE_TIMELINE << 1)) ++ __u64 extensions; ++}; ++struct drm_i915_gem_context_param { ++ __u32 ctx_id; ++ __u32 size; ++ __u64 param; ++#define I915_CONTEXT_PARAM_BAN_PERIOD 0x1 ++#define I915_CONTEXT_PARAM_NO_ZEROMAP 0x2 ++#define I915_CONTEXT_PARAM_GTT_SIZE 0x3 ++#define I915_CONTEXT_PARAM_NO_ERROR_CAPTURE 0x4 ++#define I915_CONTEXT_PARAM_BANNABLE 0x5 ++#define I915_CONTEXT_PARAM_PRIORITY 0x6 ++#define I915_CONTEXT_MAX_USER_PRIORITY 1023 ++#define I915_CONTEXT_DEFAULT_PRIORITY 0 ++#define I915_CONTEXT_MIN_USER_PRIORITY - 1023 ++#define I915_CONTEXT_PARAM_SSEU 0x7 ++#define I915_CONTEXT_PARAM_RECOVERABLE 0x8 ++#define I915_CONTEXT_PARAM_VM 0x9 ++#define I915_CONTEXT_PARAM_ENGINES 0xa ++#define I915_CONTEXT_PARAM_PERSISTENCE 0xb ++#define I915_CONTEXT_PARAM_RINGSIZE 0xc ++ __u64 value; ++}; ++struct drm_i915_gem_context_param_sseu { ++ struct i915_engine_class_instance engine; ++ __u32 flags; ++#define I915_CONTEXT_SSEU_FLAG_ENGINE_INDEX (1u << 0) ++ __u64 slice_mask; ++ __u64 subslice_mask; ++ __u16 min_eus_per_subslice; ++ __u16 max_eus_per_subslice; ++ __u32 rsvd; ++}; ++struct i915_context_engines_load_balance { ++ struct i915_user_extension base; ++ __u16 engine_index; ++ __u16 num_siblings; ++ __u32 flags; ++ __u64 mbz64; ++ struct i915_engine_class_instance engines[0]; ++} __attribute__((packed)); ++#define I915_DEFINE_CONTEXT_ENGINES_LOAD_BALANCE(name__,N__) struct { struct i915_user_extension base; __u16 engine_index; __u16 num_siblings; __u32 flags; __u64 mbz64; struct i915_engine_class_instance engines[N__]; \ ++} __attribute__((packed)) name__ ++struct i915_context_engines_bond { ++ struct i915_user_extension base; ++ struct i915_engine_class_instance master; ++ __u16 virtual_index; ++ __u16 num_bonds; ++ __u64 flags; ++ __u64 mbz64[4]; ++ struct i915_engine_class_instance engines[0]; ++} __attribute__((packed)); ++#define I915_DEFINE_CONTEXT_ENGINES_BOND(name__,N__) struct { struct i915_user_extension base; struct i915_engine_class_instance master; __u16 virtual_index; __u16 num_bonds; __u64 flags; __u64 mbz64[4]; struct i915_engine_class_instance engines[N__]; \ ++} __attribute__((packed)) name__ ++struct i915_context_param_engines { ++ __u64 extensions; ++#define I915_CONTEXT_ENGINES_EXT_LOAD_BALANCE 0 ++#define I915_CONTEXT_ENGINES_EXT_BOND 1 ++ struct i915_engine_class_instance engines[0]; ++} __attribute__((packed)); ++#define I915_DEFINE_CONTEXT_PARAM_ENGINES(name__,N__) struct { __u64 extensions; struct i915_engine_class_instance engines[N__]; \ ++} __attribute__((packed)) name__ ++struct drm_i915_gem_context_create_ext_setparam { ++#define I915_CONTEXT_CREATE_EXT_SETPARAM 0 ++ struct i915_user_extension base; ++ struct drm_i915_gem_context_param param; ++}; ++struct drm_i915_gem_context_create_ext_clone { ++#define I915_CONTEXT_CREATE_EXT_CLONE 1 ++ struct i915_user_extension base; ++ __u32 clone_id; ++ __u32 flags; ++#define I915_CONTEXT_CLONE_ENGINES (1u << 0) ++#define I915_CONTEXT_CLONE_FLAGS (1u << 1) ++#define I915_CONTEXT_CLONE_SCHEDATTR (1u << 2) ++#define I915_CONTEXT_CLONE_SSEU (1u << 3) ++#define I915_CONTEXT_CLONE_TIMELINE (1u << 4) ++#define I915_CONTEXT_CLONE_VM (1u << 5) ++#define I915_CONTEXT_CLONE_UNKNOWN - (I915_CONTEXT_CLONE_VM << 1) ++ __u64 rsvd; ++}; ++struct drm_i915_gem_context_destroy { ++ __u32 ctx_id; ++ __u32 pad; ++}; ++struct drm_i915_gem_vm_control { ++ __u64 extensions; ++ __u32 flags; ++ __u32 vm_id; ++}; ++struct drm_i915_reg_read { ++ __u64 offset; ++#define I915_REG_READ_8B_WA (1ul << 0) ++ __u64 val; ++}; ++struct drm_i915_reset_stats { ++ __u32 ctx_id; ++ __u32 flags; ++ __u32 reset_count; ++ __u32 batch_active; ++ __u32 batch_pending; ++ __u32 pad; ++}; ++struct drm_i915_gem_userptr { ++ __u64 user_ptr; ++ __u64 user_size; ++ __u32 flags; ++#define I915_USERPTR_READ_ONLY 0x1 ++#define I915_USERPTR_UNSYNCHRONIZED 0x80000000 ++ __u32 handle; ++}; ++enum drm_i915_oa_format { ++ I915_OA_FORMAT_A13 = 1, ++ I915_OA_FORMAT_A29, ++ I915_OA_FORMAT_A13_B8_C8, ++ I915_OA_FORMAT_B4_C8, ++ I915_OA_FORMAT_A45_B8_C8, ++ I915_OA_FORMAT_B4_C8_A16, ++ I915_OA_FORMAT_C4_B8, ++ I915_OA_FORMAT_A12, ++ I915_OA_FORMAT_A12_B8_C8, ++ I915_OA_FORMAT_A32u40_A4u32_B8_C8, ++ I915_OA_FORMAT_MAX ++}; ++enum drm_i915_perf_property_id { ++ DRM_I915_PERF_PROP_CTX_HANDLE = 1, ++ DRM_I915_PERF_PROP_SAMPLE_OA, ++ DRM_I915_PERF_PROP_OA_METRICS_SET, ++ DRM_I915_PERF_PROP_OA_FORMAT, ++ DRM_I915_PERF_PROP_OA_EXPONENT, ++ DRM_I915_PERF_PROP_HOLD_PREEMPTION, ++ DRM_I915_PERF_PROP_GLOBAL_SSEU, ++ DRM_I915_PERF_PROP_POLL_OA_PERIOD, ++ DRM_I915_PERF_PROP_MAX ++}; ++struct drm_i915_perf_open_param { ++ __u32 flags; ++#define I915_PERF_FLAG_FD_CLOEXEC (1 << 0) ++#define I915_PERF_FLAG_FD_NONBLOCK (1 << 1) ++#define I915_PERF_FLAG_DISABLED (1 << 2) ++ __u32 num_properties; ++ __u64 properties_ptr; ++}; ++#define I915_PERF_IOCTL_ENABLE _IO('i', 0x0) ++#define I915_PERF_IOCTL_DISABLE _IO('i', 0x1) ++#define I915_PERF_IOCTL_CONFIG _IO('i', 0x2) ++struct drm_i915_perf_record_header { ++ __u32 type; ++ __u16 pad; ++ __u16 size; ++}; ++enum drm_i915_perf_record_type { ++ DRM_I915_PERF_RECORD_SAMPLE = 1, ++ DRM_I915_PERF_RECORD_OA_REPORT_LOST = 2, ++ DRM_I915_PERF_RECORD_OA_BUFFER_LOST = 3, ++ DRM_I915_PERF_RECORD_MAX ++}; ++struct drm_i915_perf_oa_config { ++ char uuid[36]; ++ __u32 n_mux_regs; ++ __u32 n_boolean_regs; ++ __u32 n_flex_regs; ++ __u64 mux_regs_ptr; ++ __u64 boolean_regs_ptr; ++ __u64 flex_regs_ptr; ++}; ++struct drm_i915_query_item { ++ __u64 query_id; ++#define DRM_I915_QUERY_TOPOLOGY_INFO 1 ++#define DRM_I915_QUERY_ENGINE_INFO 2 ++#define DRM_I915_QUERY_PERF_CONFIG 3 ++ __s32 length; ++ __u32 flags; ++#define DRM_I915_QUERY_PERF_CONFIG_LIST 1 ++#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_UUID 2 ++#define DRM_I915_QUERY_PERF_CONFIG_DATA_FOR_ID 3 ++ __u64 data_ptr; ++}; ++struct drm_i915_query { ++ __u32 num_items; ++ __u32 flags; ++ __u64 items_ptr; ++}; ++struct drm_i915_query_topology_info { ++ __u16 flags; ++ __u16 max_slices; ++ __u16 max_subslices; ++ __u16 max_eus_per_subslice; ++ __u16 subslice_offset; ++ __u16 subslice_stride; ++ __u16 eu_offset; ++ __u16 eu_stride; ++ __u8 data[]; ++}; ++struct drm_i915_engine_info { ++ struct i915_engine_class_instance engine; ++ __u32 rsvd0; ++ __u64 flags; ++ __u64 capabilities; ++#define I915_VIDEO_CLASS_CAPABILITY_HEVC (1 << 0) ++#define I915_VIDEO_AND_ENHANCE_CLASS_CAPABILITY_SFC (1 << 1) ++ __u64 rsvd1[4]; ++}; ++struct drm_i915_query_engine_info { ++ __u32 num_engines; ++ __u32 rsvd[3]; ++ struct drm_i915_engine_info engines[]; ++}; ++struct drm_i915_query_perf_config { ++ union { ++ __u64 n_configs; ++ __u64 config; ++ char uuid[36]; ++ }; ++ __u32 flags; ++ __u8 data[]; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/lima_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/lima_drm.h +new file mode 100644 +index 0000000..bd8ba9c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/lima_drm.h +@@ -0,0 +1,130 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __LIMA_DRM_H__ ++#define __LIMA_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++enum drm_lima_param_gpu_id { ++ DRM_LIMA_PARAM_GPU_ID_UNKNOWN, ++ DRM_LIMA_PARAM_GPU_ID_MALI400, ++ DRM_LIMA_PARAM_GPU_ID_MALI450, ++}; ++enum drm_lima_param { ++ DRM_LIMA_PARAM_GPU_ID, ++ DRM_LIMA_PARAM_NUM_PP, ++ DRM_LIMA_PARAM_GP_VERSION, ++ DRM_LIMA_PARAM_PP_VERSION, ++}; ++struct drm_lima_get_param { ++ __u32 param; ++ __u32 pad; ++ __u64 value; ++}; ++#define LIMA_BO_FLAG_HEAP (1 << 0) ++struct drm_lima_gem_create { ++ __u32 size; ++ __u32 flags; ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_lima_gem_info { ++ __u32 handle; ++ __u32 va; ++ __u64 offset; ++}; ++#define LIMA_SUBMIT_BO_READ 0x01 ++#define LIMA_SUBMIT_BO_WRITE 0x02 ++struct drm_lima_gem_submit_bo { ++ __u32 handle; ++ __u32 flags; ++}; ++#define LIMA_GP_FRAME_REG_NUM 6 ++struct drm_lima_gp_frame { ++ __u32 frame[LIMA_GP_FRAME_REG_NUM]; ++}; ++#define LIMA_PP_FRAME_REG_NUM 23 ++#define LIMA_PP_WB_REG_NUM 12 ++struct drm_lima_m400_pp_frame { ++ __u32 frame[LIMA_PP_FRAME_REG_NUM]; ++ __u32 num_pp; ++ __u32 wb[3 * LIMA_PP_WB_REG_NUM]; ++ __u32 plbu_array_address[4]; ++ __u32 fragment_stack_address[4]; ++}; ++struct drm_lima_m450_pp_frame { ++ __u32 frame[LIMA_PP_FRAME_REG_NUM]; ++ __u32 num_pp; ++ __u32 wb[3 * LIMA_PP_WB_REG_NUM]; ++ __u32 use_dlbu; ++ __u32 _pad; ++ union { ++ __u32 plbu_array_address[8]; ++ __u32 dlbu_regs[4]; ++ }; ++ __u32 fragment_stack_address[8]; ++}; ++#define LIMA_PIPE_GP 0x00 ++#define LIMA_PIPE_PP 0x01 ++#define LIMA_SUBMIT_FLAG_EXPLICIT_FENCE (1 << 0) ++struct drm_lima_gem_submit { ++ __u32 ctx; ++ __u32 pipe; ++ __u32 nr_bos; ++ __u32 frame_size; ++ __u64 bos; ++ __u64 frame; ++ __u32 flags; ++ __u32 out_sync; ++ __u32 in_sync[2]; ++}; ++#define LIMA_GEM_WAIT_READ 0x01 ++#define LIMA_GEM_WAIT_WRITE 0x02 ++struct drm_lima_gem_wait { ++ __u32 handle; ++ __u32 op; ++ __s64 timeout_ns; ++}; ++struct drm_lima_ctx_create { ++ __u32 id; ++ __u32 _pad; ++}; ++struct drm_lima_ctx_free { ++ __u32 id; ++ __u32 _pad; ++}; ++#define DRM_LIMA_GET_PARAM 0x00 ++#define DRM_LIMA_GEM_CREATE 0x01 ++#define DRM_LIMA_GEM_INFO 0x02 ++#define DRM_LIMA_GEM_SUBMIT 0x03 ++#define DRM_LIMA_GEM_WAIT 0x04 ++#define DRM_LIMA_CTX_CREATE 0x05 ++#define DRM_LIMA_CTX_FREE 0x06 ++#define DRM_IOCTL_LIMA_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GET_PARAM, struct drm_lima_get_param) ++#define DRM_IOCTL_LIMA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_CREATE, struct drm_lima_gem_create) ++#define DRM_IOCTL_LIMA_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_LIMA_GEM_INFO, struct drm_lima_gem_info) ++#define DRM_IOCTL_LIMA_GEM_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_SUBMIT, struct drm_lima_gem_submit) ++#define DRM_IOCTL_LIMA_GEM_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_GEM_WAIT, struct drm_lima_gem_wait) ++#define DRM_IOCTL_LIMA_CTX_CREATE DRM_IOR(DRM_COMMAND_BASE + DRM_LIMA_CTX_CREATE, struct drm_lima_ctx_create) ++#define DRM_IOCTL_LIMA_CTX_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_LIMA_CTX_FREE, struct drm_lima_ctx_free) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/mga_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/mga_drm.h +new file mode 100644 +index 0000000..4959502 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/mga_drm.h +@@ -0,0 +1,246 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __MGA_DRM_H__ ++#define __MGA_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef __MGA_SAREA_DEFINES__ ++#define __MGA_SAREA_DEFINES__ ++#define MGA_F 0x1 ++#define MGA_A 0x2 ++#define MGA_S 0x4 ++#define MGA_T2 0x8 ++#define MGA_WARP_TGZ 0 ++#define MGA_WARP_TGZF (MGA_F) ++#define MGA_WARP_TGZA (MGA_A) ++#define MGA_WARP_TGZAF (MGA_F | MGA_A) ++#define MGA_WARP_TGZS (MGA_S) ++#define MGA_WARP_TGZSF (MGA_S | MGA_F) ++#define MGA_WARP_TGZSA (MGA_S | MGA_A) ++#define MGA_WARP_TGZSAF (MGA_S | MGA_F | MGA_A) ++#define MGA_WARP_T2GZ (MGA_T2) ++#define MGA_WARP_T2GZF (MGA_T2 | MGA_F) ++#define MGA_WARP_T2GZA (MGA_T2 | MGA_A) ++#define MGA_WARP_T2GZAF (MGA_T2 | MGA_A | MGA_F) ++#define MGA_WARP_T2GZS (MGA_T2 | MGA_S) ++#define MGA_WARP_T2GZSF (MGA_T2 | MGA_S | MGA_F) ++#define MGA_WARP_T2GZSA (MGA_T2 | MGA_S | MGA_A) ++#define MGA_WARP_T2GZSAF (MGA_T2 | MGA_S | MGA_F | MGA_A) ++#define MGA_MAX_G200_PIPES 8 ++#define MGA_MAX_G400_PIPES 16 ++#define MGA_MAX_WARP_PIPES MGA_MAX_G400_PIPES ++#define MGA_WARP_UCODE_SIZE 32768 ++#define MGA_CARD_TYPE_G200 1 ++#define MGA_CARD_TYPE_G400 2 ++#define MGA_CARD_TYPE_G450 3 ++#define MGA_CARD_TYPE_G550 4 ++#define MGA_FRONT 0x1 ++#define MGA_BACK 0x2 ++#define MGA_DEPTH 0x4 ++#define MGA_UPLOAD_CONTEXT 0x1 ++#define MGA_UPLOAD_TEX0 0x2 ++#define MGA_UPLOAD_TEX1 0x4 ++#define MGA_UPLOAD_PIPE 0x8 ++#define MGA_UPLOAD_TEX0IMAGE 0x10 ++#define MGA_UPLOAD_TEX1IMAGE 0x20 ++#define MGA_UPLOAD_2D 0x40 ++#define MGA_WAIT_AGE 0x80 ++#define MGA_UPLOAD_CLIPRECTS 0x100 ++#define MGA_BUFFER_SIZE (1 << 16) ++#define MGA_NUM_BUFFERS 128 ++#define MGA_NR_SAREA_CLIPRECTS 8 ++#define MGA_CARD_HEAP 0 ++#define MGA_AGP_HEAP 1 ++#define MGA_NR_TEX_HEAPS 2 ++#define MGA_NR_TEX_REGIONS 16 ++#define MGA_LOG_MIN_TEX_REGION_SIZE 16 ++#define DRM_MGA_IDLE_RETRY 2048 ++#endif ++typedef struct { ++ unsigned int dstorg; ++ unsigned int maccess; ++ unsigned int plnwt; ++ unsigned int dwgctl; ++ unsigned int alphactrl; ++ unsigned int fogcolor; ++ unsigned int wflag; ++ unsigned int tdualstage0; ++ unsigned int tdualstage1; ++ unsigned int fcol; ++ unsigned int stencil; ++ unsigned int stencilctl; ++} drm_mga_context_regs_t; ++typedef struct { ++ unsigned int pitch; ++} drm_mga_server_regs_t; ++typedef struct { ++ unsigned int texctl; ++ unsigned int texctl2; ++ unsigned int texfilter; ++ unsigned int texbordercol; ++ unsigned int texorg; ++ unsigned int texwidth; ++ unsigned int texheight; ++ unsigned int texorg1; ++ unsigned int texorg2; ++ unsigned int texorg3; ++ unsigned int texorg4; ++} drm_mga_texture_regs_t; ++typedef struct { ++ unsigned int head; ++ unsigned int wrap; ++} drm_mga_age_t; ++typedef struct _drm_mga_sarea { ++ drm_mga_context_regs_t context_state; ++ drm_mga_server_regs_t server_state; ++ drm_mga_texture_regs_t tex_state[2]; ++ unsigned int warp_pipe; ++ unsigned int dirty; ++ unsigned int vertsize; ++ struct drm_clip_rect boxes[MGA_NR_SAREA_CLIPRECTS]; ++ unsigned int nbox; ++ unsigned int req_drawable; ++ unsigned int req_draw_buffer; ++ unsigned int exported_drawable; ++ unsigned int exported_index; ++ unsigned int exported_stamp; ++ unsigned int exported_buffers; ++ unsigned int exported_nfront; ++ unsigned int exported_nback; ++ int exported_back_x, exported_front_x, exported_w; ++ int exported_back_y, exported_front_y, exported_h; ++ struct drm_clip_rect exported_boxes[MGA_NR_SAREA_CLIPRECTS]; ++ unsigned int status[4]; ++ unsigned int last_wrap; ++ drm_mga_age_t last_frame; ++ unsigned int last_enqueue; ++ unsigned int last_dispatch; ++ unsigned int last_quiescent; ++ struct drm_tex_region texList[MGA_NR_TEX_HEAPS][MGA_NR_TEX_REGIONS + 1]; ++ unsigned int texAge[MGA_NR_TEX_HEAPS]; ++ int ctxOwner; ++} drm_mga_sarea_t; ++#define DRM_MGA_INIT 0x00 ++#define DRM_MGA_FLUSH 0x01 ++#define DRM_MGA_RESET 0x02 ++#define DRM_MGA_SWAP 0x03 ++#define DRM_MGA_CLEAR 0x04 ++#define DRM_MGA_VERTEX 0x05 ++#define DRM_MGA_INDICES 0x06 ++#define DRM_MGA_ILOAD 0x07 ++#define DRM_MGA_BLIT 0x08 ++#define DRM_MGA_GETPARAM 0x09 ++#define DRM_MGA_SET_FENCE 0x0a ++#define DRM_MGA_WAIT_FENCE 0x0b ++#define DRM_MGA_DMA_BOOTSTRAP 0x0c ++#define DRM_IOCTL_MGA_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_INIT, drm_mga_init_t) ++#define DRM_IOCTL_MGA_FLUSH DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_FLUSH, struct drm_lock) ++#define DRM_IOCTL_MGA_RESET DRM_IO(DRM_COMMAND_BASE + DRM_MGA_RESET) ++#define DRM_IOCTL_MGA_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_MGA_SWAP) ++#define DRM_IOCTL_MGA_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_CLEAR, drm_mga_clear_t) ++#define DRM_IOCTL_MGA_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_VERTEX, drm_mga_vertex_t) ++#define DRM_IOCTL_MGA_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_INDICES, drm_mga_indices_t) ++#define DRM_IOCTL_MGA_ILOAD DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_ILOAD, drm_mga_iload_t) ++#define DRM_IOCTL_MGA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_BLIT, drm_mga_blit_t) ++#define DRM_IOCTL_MGA_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_GETPARAM, drm_mga_getparam_t) ++#define DRM_IOCTL_MGA_SET_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MGA_SET_FENCE, __u32) ++#define DRM_IOCTL_MGA_WAIT_FENCE DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_WAIT_FENCE, __u32) ++#define DRM_IOCTL_MGA_DMA_BOOTSTRAP DRM_IOWR(DRM_COMMAND_BASE + DRM_MGA_DMA_BOOTSTRAP, drm_mga_dma_bootstrap_t) ++typedef struct _drm_mga_warp_index { ++ int installed; ++ unsigned long phys_addr; ++ int size; ++} drm_mga_warp_index_t; ++typedef struct drm_mga_init { ++ enum { ++ MGA_INIT_DMA = 0x01, ++ MGA_CLEANUP_DMA = 0x02 ++ } func; ++ unsigned long sarea_priv_offset; ++ int chipset; ++ int sgram; ++ unsigned int maccess; ++ unsigned int fb_cpp; ++ unsigned int front_offset, front_pitch; ++ unsigned int back_offset, back_pitch; ++ unsigned int depth_cpp; ++ unsigned int depth_offset, depth_pitch; ++ unsigned int texture_offset[MGA_NR_TEX_HEAPS]; ++ unsigned int texture_size[MGA_NR_TEX_HEAPS]; ++ unsigned long fb_offset; ++ unsigned long mmio_offset; ++ unsigned long status_offset; ++ unsigned long warp_offset; ++ unsigned long primary_offset; ++ unsigned long buffers_offset; ++} drm_mga_init_t; ++typedef struct drm_mga_dma_bootstrap { ++ unsigned long texture_handle; ++ __u32 texture_size; ++ __u32 primary_size; ++ __u32 secondary_bin_count; ++ __u32 secondary_bin_size; ++ __u32 agp_mode; ++ __u8 agp_size; ++} drm_mga_dma_bootstrap_t; ++typedef struct drm_mga_clear { ++ unsigned int flags; ++ unsigned int clear_color; ++ unsigned int clear_depth; ++ unsigned int color_mask; ++ unsigned int depth_mask; ++} drm_mga_clear_t; ++typedef struct drm_mga_vertex { ++ int idx; ++ int used; ++ int discard; ++} drm_mga_vertex_t; ++typedef struct drm_mga_indices { ++ int idx; ++ unsigned int start; ++ unsigned int end; ++ int discard; ++} drm_mga_indices_t; ++typedef struct drm_mga_iload { ++ int idx; ++ unsigned int dstorg; ++ unsigned int length; ++} drm_mga_iload_t; ++typedef struct _drm_mga_blit { ++ unsigned int planemask; ++ unsigned int srcorg; ++ unsigned int dstorg; ++ int src_pitch, dst_pitch; ++ int delta_sx, delta_sy; ++ int delta_dx, delta_dy; ++ int height, ydir; ++ int source_pitch, dest_pitch; ++} drm_mga_blit_t; ++#define MGA_PARAM_IRQ_NR 1 ++#define MGA_PARAM_CARD_TYPE 2 ++typedef struct drm_mga_getparam { ++ int param; ++ void __user * value; ++} drm_mga_getparam_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/msm_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/msm_drm.h +new file mode 100644 +index 0000000..fcfcc20 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/msm_drm.h +@@ -0,0 +1,196 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __MSM_DRM_H__ ++#define __MSM_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define MSM_PIPE_NONE 0x00 ++#define MSM_PIPE_2D0 0x01 ++#define MSM_PIPE_2D1 0x02 ++#define MSM_PIPE_3D0 0x10 ++#define MSM_PIPE_ID_MASK 0xffff ++#define MSM_PIPE_ID(x) ((x) & MSM_PIPE_ID_MASK) ++#define MSM_PIPE_FLAGS(x) ((x) & ~MSM_PIPE_ID_MASK) ++struct drm_msm_timespec { ++ __s64 tv_sec; ++ __s64 tv_nsec; ++}; ++#define MSM_PARAM_GPU_ID 0x01 ++#define MSM_PARAM_GMEM_SIZE 0x02 ++#define MSM_PARAM_CHIP_ID 0x03 ++#define MSM_PARAM_MAX_FREQ 0x04 ++#define MSM_PARAM_TIMESTAMP 0x05 ++#define MSM_PARAM_GMEM_BASE 0x06 ++#define MSM_PARAM_NR_RINGS 0x07 ++#define MSM_PARAM_PP_PGTABLE 0x08 ++#define MSM_PARAM_FAULTS 0x09 ++struct drm_msm_param { ++ __u32 pipe; ++ __u32 param; ++ __u64 value; ++}; ++#define MSM_BO_SCANOUT 0x00000001 ++#define MSM_BO_GPU_READONLY 0x00000002 ++#define MSM_BO_CACHE_MASK 0x000f0000 ++#define MSM_BO_CACHED 0x00010000 ++#define MSM_BO_WC 0x00020000 ++#define MSM_BO_UNCACHED 0x00040000 ++#define MSM_BO_FLAGS (MSM_BO_SCANOUT | MSM_BO_GPU_READONLY | MSM_BO_CACHED | MSM_BO_WC | MSM_BO_UNCACHED) ++struct drm_msm_gem_new { ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++#define MSM_INFO_GET_OFFSET 0x00 ++#define MSM_INFO_GET_IOVA 0x01 ++#define MSM_INFO_SET_NAME 0x02 ++#define MSM_INFO_GET_NAME 0x03 ++struct drm_msm_gem_info { ++ __u32 handle; ++ __u32 info; ++ __u64 value; ++ __u32 len; ++ __u32 pad; ++}; ++#define MSM_PREP_READ 0x01 ++#define MSM_PREP_WRITE 0x02 ++#define MSM_PREP_NOSYNC 0x04 ++#define MSM_PREP_FLAGS (MSM_PREP_READ | MSM_PREP_WRITE | MSM_PREP_NOSYNC) ++struct drm_msm_gem_cpu_prep { ++ __u32 handle; ++ __u32 op; ++ struct drm_msm_timespec timeout; ++}; ++struct drm_msm_gem_cpu_fini { ++ __u32 handle; ++}; ++struct drm_msm_gem_submit_reloc { ++ __u32 submit_offset; ++ __u32 or; ++ __s32 shift; ++ __u32 reloc_idx; ++ __u64 reloc_offset; ++}; ++#define MSM_SUBMIT_CMD_BUF 0x0001 ++#define MSM_SUBMIT_CMD_IB_TARGET_BUF 0x0002 ++#define MSM_SUBMIT_CMD_CTX_RESTORE_BUF 0x0003 ++struct drm_msm_gem_submit_cmd { ++ __u32 type; ++ __u32 submit_idx; ++ __u32 submit_offset; ++ __u32 size; ++ __u32 pad; ++ __u32 nr_relocs; ++ __u64 relocs; ++}; ++#define MSM_SUBMIT_BO_READ 0x0001 ++#define MSM_SUBMIT_BO_WRITE 0x0002 ++#define MSM_SUBMIT_BO_DUMP 0x0004 ++#define MSM_SUBMIT_BO_FLAGS (MSM_SUBMIT_BO_READ | MSM_SUBMIT_BO_WRITE | MSM_SUBMIT_BO_DUMP) ++struct drm_msm_gem_submit_bo { ++ __u32 flags; ++ __u32 handle; ++ __u64 presumed; ++}; ++#define MSM_SUBMIT_NO_IMPLICIT 0x80000000 ++#define MSM_SUBMIT_FENCE_FD_IN 0x40000000 ++#define MSM_SUBMIT_FENCE_FD_OUT 0x20000000 ++#define MSM_SUBMIT_SUDO 0x10000000 ++#define MSM_SUBMIT_SYNCOBJ_IN 0x08000000 ++#define MSM_SUBMIT_SYNCOBJ_OUT 0x04000000 ++#define MSM_SUBMIT_FLAGS (MSM_SUBMIT_NO_IMPLICIT | MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_FENCE_FD_OUT | MSM_SUBMIT_SUDO | MSM_SUBMIT_SYNCOBJ_IN | MSM_SUBMIT_SYNCOBJ_OUT | 0) ++#define MSM_SUBMIT_SYNCOBJ_RESET 0x00000001 ++#define MSM_SUBMIT_SYNCOBJ_FLAGS (MSM_SUBMIT_SYNCOBJ_RESET | 0) ++struct drm_msm_gem_submit_syncobj { ++ __u32 handle; ++ __u32 flags; ++ __u64 point; ++}; ++struct drm_msm_gem_submit { ++ __u32 flags; ++ __u32 fence; ++ __u32 nr_bos; ++ __u32 nr_cmds; ++ __u64 bos; ++ __u64 cmds; ++ __s32 fence_fd; ++ __u32 queueid; ++ __u64 in_syncobjs; ++ __u64 out_syncobjs; ++ __u32 nr_in_syncobjs; ++ __u32 nr_out_syncobjs; ++ __u32 syncobj_stride; ++ __u32 pad; ++}; ++struct drm_msm_wait_fence { ++ __u32 fence; ++ __u32 pad; ++ struct drm_msm_timespec timeout; ++ __u32 queueid; ++}; ++#define MSM_MADV_WILLNEED 0 ++#define MSM_MADV_DONTNEED 1 ++#define __MSM_MADV_PURGED 2 ++struct drm_msm_gem_madvise { ++ __u32 handle; ++ __u32 madv; ++ __u32 retained; ++}; ++#define MSM_SUBMITQUEUE_FLAGS (0) ++struct drm_msm_submitqueue { ++ __u32 flags; ++ __u32 prio; ++ __u32 id; ++}; ++#define MSM_SUBMITQUEUE_PARAM_FAULTS 0 ++struct drm_msm_submitqueue_query { ++ __u64 data; ++ __u32 id; ++ __u32 param; ++ __u32 len; ++ __u32 pad; ++}; ++#define DRM_MSM_GET_PARAM 0x00 ++#define DRM_MSM_GEM_NEW 0x02 ++#define DRM_MSM_GEM_INFO 0x03 ++#define DRM_MSM_GEM_CPU_PREP 0x04 ++#define DRM_MSM_GEM_CPU_FINI 0x05 ++#define DRM_MSM_GEM_SUBMIT 0x06 ++#define DRM_MSM_WAIT_FENCE 0x07 ++#define DRM_MSM_GEM_MADVISE 0x08 ++#define DRM_MSM_SUBMITQUEUE_NEW 0x0A ++#define DRM_MSM_SUBMITQUEUE_CLOSE 0x0B ++#define DRM_MSM_SUBMITQUEUE_QUERY 0x0C ++#define DRM_IOCTL_MSM_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GET_PARAM, struct drm_msm_param) ++#define DRM_IOCTL_MSM_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_NEW, struct drm_msm_gem_new) ++#define DRM_IOCTL_MSM_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_INFO, struct drm_msm_gem_info) ++#define DRM_IOCTL_MSM_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_PREP, struct drm_msm_gem_cpu_prep) ++#define DRM_IOCTL_MSM_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_GEM_CPU_FINI, struct drm_msm_gem_cpu_fini) ++#define DRM_IOCTL_MSM_GEM_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_SUBMIT, struct drm_msm_gem_submit) ++#define DRM_IOCTL_MSM_WAIT_FENCE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_WAIT_FENCE, struct drm_msm_wait_fence) ++#define DRM_IOCTL_MSM_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_GEM_MADVISE, struct drm_msm_gem_madvise) ++#define DRM_IOCTL_MSM_SUBMITQUEUE_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_NEW, struct drm_msm_submitqueue) ++#define DRM_IOCTL_MSM_SUBMITQUEUE_CLOSE DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_CLOSE, __u32) ++#define DRM_IOCTL_MSM_SUBMITQUEUE_QUERY DRM_IOW(DRM_COMMAND_BASE + DRM_MSM_SUBMITQUEUE_QUERY, struct drm_msm_submitqueue_query) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/nouveau_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/nouveau_drm.h +new file mode 100644 +index 0000000..150f729 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/nouveau_drm.h +@@ -0,0 +1,160 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __NOUVEAU_DRM_H__ ++#define __NOUVEAU_DRM_H__ ++#define DRM_NOUVEAU_EVENT_NVIF 0x80000000 ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define NOUVEAU_GEM_DOMAIN_CPU (1 << 0) ++#define NOUVEAU_GEM_DOMAIN_VRAM (1 << 1) ++#define NOUVEAU_GEM_DOMAIN_GART (1 << 2) ++#define NOUVEAU_GEM_DOMAIN_MAPPABLE (1 << 3) ++#define NOUVEAU_GEM_DOMAIN_COHERENT (1 << 4) ++#define NOUVEAU_GEM_TILE_COMP 0x00030000 ++#define NOUVEAU_GEM_TILE_LAYOUT_MASK 0x0000ff00 ++#define NOUVEAU_GEM_TILE_16BPP 0x00000001 ++#define NOUVEAU_GEM_TILE_32BPP 0x00000002 ++#define NOUVEAU_GEM_TILE_ZETA 0x00000004 ++#define NOUVEAU_GEM_TILE_NONCONTIG 0x00000008 ++struct drm_nouveau_gem_info { ++ __u32 handle; ++ __u32 domain; ++ __u64 size; ++ __u64 offset; ++ __u64 map_handle; ++ __u32 tile_mode; ++ __u32 tile_flags; ++}; ++struct drm_nouveau_gem_new { ++ struct drm_nouveau_gem_info info; ++ __u32 channel_hint; ++ __u32 align; ++}; ++#define NOUVEAU_GEM_MAX_BUFFERS 1024 ++struct drm_nouveau_gem_pushbuf_bo_presumed { ++ __u32 valid; ++ __u32 domain; ++ __u64 offset; ++}; ++struct drm_nouveau_gem_pushbuf_bo { ++ __u64 user_priv; ++ __u32 handle; ++ __u32 read_domains; ++ __u32 write_domains; ++ __u32 valid_domains; ++ struct drm_nouveau_gem_pushbuf_bo_presumed presumed; ++}; ++#define NOUVEAU_GEM_RELOC_LOW (1 << 0) ++#define NOUVEAU_GEM_RELOC_HIGH (1 << 1) ++#define NOUVEAU_GEM_RELOC_OR (1 << 2) ++#define NOUVEAU_GEM_MAX_RELOCS 1024 ++struct drm_nouveau_gem_pushbuf_reloc { ++ __u32 reloc_bo_index; ++ __u32 reloc_bo_offset; ++ __u32 bo_index; ++ __u32 flags; ++ __u32 data; ++ __u32 vor; ++ __u32 tor; ++}; ++#define NOUVEAU_GEM_MAX_PUSH 512 ++struct drm_nouveau_gem_pushbuf_push { ++ __u32 bo_index; ++ __u32 pad; ++ __u64 offset; ++ __u64 length; ++}; ++struct drm_nouveau_gem_pushbuf { ++ __u32 channel; ++ __u32 nr_buffers; ++ __u64 buffers; ++ __u32 nr_relocs; ++ __u32 nr_push; ++ __u64 relocs; ++ __u64 push; ++ __u32 suffix0; ++ __u32 suffix1; ++#define NOUVEAU_GEM_PUSHBUF_SYNC (1ULL << 0) ++ __u64 vram_available; ++ __u64 gart_available; ++}; ++#define NOUVEAU_GEM_CPU_PREP_NOWAIT 0x00000001 ++#define NOUVEAU_GEM_CPU_PREP_WRITE 0x00000004 ++struct drm_nouveau_gem_cpu_prep { ++ __u32 handle; ++ __u32 flags; ++}; ++struct drm_nouveau_gem_cpu_fini { ++ __u32 handle; ++}; ++#define DRM_NOUVEAU_GETPARAM 0x00 ++#define DRM_NOUVEAU_SETPARAM 0x01 ++#define DRM_NOUVEAU_CHANNEL_ALLOC 0x02 ++#define DRM_NOUVEAU_CHANNEL_FREE 0x03 ++#define DRM_NOUVEAU_GROBJ_ALLOC 0x04 ++#define DRM_NOUVEAU_NOTIFIEROBJ_ALLOC 0x05 ++#define DRM_NOUVEAU_GPUOBJ_FREE 0x06 ++#define DRM_NOUVEAU_NVIF 0x07 ++#define DRM_NOUVEAU_SVM_INIT 0x08 ++#define DRM_NOUVEAU_SVM_BIND 0x09 ++#define DRM_NOUVEAU_GEM_NEW 0x40 ++#define DRM_NOUVEAU_GEM_PUSHBUF 0x41 ++#define DRM_NOUVEAU_GEM_CPU_PREP 0x42 ++#define DRM_NOUVEAU_GEM_CPU_FINI 0x43 ++#define DRM_NOUVEAU_GEM_INFO 0x44 ++struct drm_nouveau_svm_init { ++ __u64 unmanaged_addr; ++ __u64 unmanaged_size; ++}; ++struct drm_nouveau_svm_bind { ++ __u64 header; ++ __u64 va_start; ++ __u64 va_end; ++ __u64 npages; ++ __u64 stride; ++ __u64 result; ++ __u64 reserved0; ++ __u64 reserved1; ++}; ++#define NOUVEAU_SVM_BIND_COMMAND_SHIFT 0 ++#define NOUVEAU_SVM_BIND_COMMAND_BITS 8 ++#define NOUVEAU_SVM_BIND_COMMAND_MASK ((1 << 8) - 1) ++#define NOUVEAU_SVM_BIND_PRIORITY_SHIFT 8 ++#define NOUVEAU_SVM_BIND_PRIORITY_BITS 8 ++#define NOUVEAU_SVM_BIND_PRIORITY_MASK ((1 << 8) - 1) ++#define NOUVEAU_SVM_BIND_TARGET_SHIFT 16 ++#define NOUVEAU_SVM_BIND_TARGET_BITS 32 ++#define NOUVEAU_SVM_BIND_TARGET_MASK 0xffffffff ++#define NOUVEAU_SVM_BIND_VALID_BITS 48 ++#define NOUVEAU_SVM_BIND_VALID_MASK ((1ULL << NOUVEAU_SVM_BIND_VALID_BITS) - 1) ++#define NOUVEAU_SVM_BIND_COMMAND__MIGRATE 0 ++#define NOUVEAU_SVM_BIND_TARGET__GPU_VRAM (1UL << 31) ++#define DRM_IOCTL_NOUVEAU_SVM_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_INIT, struct drm_nouveau_svm_init) ++#define DRM_IOCTL_NOUVEAU_SVM_BIND DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_SVM_BIND, struct drm_nouveau_svm_bind) ++#define DRM_IOCTL_NOUVEAU_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_NEW, struct drm_nouveau_gem_new) ++#define DRM_IOCTL_NOUVEAU_GEM_PUSHBUF DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_PUSHBUF, struct drm_nouveau_gem_pushbuf) ++#define DRM_IOCTL_NOUVEAU_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_PREP, struct drm_nouveau_gem_cpu_prep) ++#define DRM_IOCTL_NOUVEAU_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_CPU_FINI, struct drm_nouveau_gem_cpu_fini) ++#define DRM_IOCTL_NOUVEAU_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_NOUVEAU_GEM_INFO, struct drm_nouveau_gem_info) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/omap_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/omap_drm.h +new file mode 100644 +index 0000000..72d949d +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/omap_drm.h +@@ -0,0 +1,89 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __OMAP_DRM_H__ ++#define __OMAP_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define OMAP_PARAM_CHIPSET_ID 1 ++struct drm_omap_param { ++ __u64 param; ++ __u64 value; ++}; ++#define OMAP_BO_SCANOUT 0x00000001 ++#define OMAP_BO_CACHED 0x00000000 ++#define OMAP_BO_WC 0x00000002 ++#define OMAP_BO_UNCACHED 0x00000004 ++#define OMAP_BO_CACHE_MASK 0x00000006 ++#define OMAP_BO_TILED_8 0x00000100 ++#define OMAP_BO_TILED_16 0x00000200 ++#define OMAP_BO_TILED_32 0x00000300 ++#define OMAP_BO_TILED_MASK 0x00000f00 ++union omap_gem_size { ++ __u32 bytes; ++ struct { ++ __u16 width; ++ __u16 height; ++ } tiled; ++}; ++struct drm_omap_gem_new { ++ union omap_gem_size size; ++ __u32 flags; ++ __u32 handle; ++ __u32 __pad; ++}; ++enum omap_gem_op { ++ OMAP_GEM_READ = 0x01, ++ OMAP_GEM_WRITE = 0x02, ++}; ++struct drm_omap_gem_cpu_prep { ++ __u32 handle; ++ __u32 op; ++}; ++struct drm_omap_gem_cpu_fini { ++ __u32 handle; ++ __u32 op; ++ __u32 nregions; ++ __u32 __pad; ++}; ++struct drm_omap_gem_info { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u32 size; ++ __u32 __pad; ++}; ++#define DRM_OMAP_GET_PARAM 0x00 ++#define DRM_OMAP_SET_PARAM 0x01 ++#define DRM_OMAP_GEM_NEW 0x03 ++#define DRM_OMAP_GEM_CPU_PREP 0x04 ++#define DRM_OMAP_GEM_CPU_FINI 0x05 ++#define DRM_OMAP_GEM_INFO 0x06 ++#define DRM_OMAP_NUM_IOCTLS 0x07 ++#define DRM_IOCTL_OMAP_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GET_PARAM, struct drm_omap_param) ++#define DRM_IOCTL_OMAP_SET_PARAM DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_SET_PARAM, struct drm_omap_param) ++#define DRM_IOCTL_OMAP_GEM_NEW DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_NEW, struct drm_omap_gem_new) ++#define DRM_IOCTL_OMAP_GEM_CPU_PREP DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_PREP, struct drm_omap_gem_cpu_prep) ++#define DRM_IOCTL_OMAP_GEM_CPU_FINI DRM_IOW(DRM_COMMAND_BASE + DRM_OMAP_GEM_CPU_FINI, struct drm_omap_gem_cpu_fini) ++#define DRM_IOCTL_OMAP_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_OMAP_GEM_INFO, struct drm_omap_gem_info) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/panfrost_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/panfrost_drm.h +new file mode 100644 +index 0000000..f8b8aa1 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/panfrost_drm.h +@@ -0,0 +1,141 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _PANFROST_DRM_H_ ++#define _PANFROST_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_PANFROST_SUBMIT 0x00 ++#define DRM_PANFROST_WAIT_BO 0x01 ++#define DRM_PANFROST_CREATE_BO 0x02 ++#define DRM_PANFROST_MMAP_BO 0x03 ++#define DRM_PANFROST_GET_PARAM 0x04 ++#define DRM_PANFROST_GET_BO_OFFSET 0x05 ++#define DRM_PANFROST_PERFCNT_ENABLE 0x06 ++#define DRM_PANFROST_PERFCNT_DUMP 0x07 ++#define DRM_PANFROST_MADVISE 0x08 ++#define DRM_IOCTL_PANFROST_SUBMIT DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_SUBMIT, struct drm_panfrost_submit) ++#define DRM_IOCTL_PANFROST_WAIT_BO DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_WAIT_BO, struct drm_panfrost_wait_bo) ++#define DRM_IOCTL_PANFROST_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_CREATE_BO, struct drm_panfrost_create_bo) ++#define DRM_IOCTL_PANFROST_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MMAP_BO, struct drm_panfrost_mmap_bo) ++#define DRM_IOCTL_PANFROST_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_PARAM, struct drm_panfrost_get_param) ++#define DRM_IOCTL_PANFROST_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_GET_BO_OFFSET, struct drm_panfrost_get_bo_offset) ++#define DRM_IOCTL_PANFROST_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_PANFROST_MADVISE, struct drm_panfrost_madvise) ++#define DRM_IOCTL_PANFROST_PERFCNT_ENABLE DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_ENABLE, struct drm_panfrost_perfcnt_enable) ++#define DRM_IOCTL_PANFROST_PERFCNT_DUMP DRM_IOW(DRM_COMMAND_BASE + DRM_PANFROST_PERFCNT_DUMP, struct drm_panfrost_perfcnt_dump) ++#define PANFROST_JD_REQ_FS (1 << 0) ++struct drm_panfrost_submit { ++ __u64 jc; ++ __u64 in_syncs; ++ __u32 in_sync_count; ++ __u32 out_sync; ++ __u64 bo_handles; ++ __u32 bo_handle_count; ++ __u32 requirements; ++}; ++struct drm_panfrost_wait_bo { ++ __u32 handle; ++ __u32 pad; ++ __s64 timeout_ns; ++}; ++#define PANFROST_BO_NOEXEC 1 ++#define PANFROST_BO_HEAP 2 ++struct drm_panfrost_create_bo { ++ __u32 size; ++ __u32 flags; ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++struct drm_panfrost_mmap_bo { ++ __u32 handle; ++ __u32 flags; ++ __u64 offset; ++}; ++enum drm_panfrost_param { ++ DRM_PANFROST_PARAM_GPU_PROD_ID, ++ DRM_PANFROST_PARAM_GPU_REVISION, ++ DRM_PANFROST_PARAM_SHADER_PRESENT, ++ DRM_PANFROST_PARAM_TILER_PRESENT, ++ DRM_PANFROST_PARAM_L2_PRESENT, ++ DRM_PANFROST_PARAM_STACK_PRESENT, ++ DRM_PANFROST_PARAM_AS_PRESENT, ++ DRM_PANFROST_PARAM_JS_PRESENT, ++ DRM_PANFROST_PARAM_L2_FEATURES, ++ DRM_PANFROST_PARAM_CORE_FEATURES, ++ DRM_PANFROST_PARAM_TILER_FEATURES, ++ DRM_PANFROST_PARAM_MEM_FEATURES, ++ DRM_PANFROST_PARAM_MMU_FEATURES, ++ DRM_PANFROST_PARAM_THREAD_FEATURES, ++ DRM_PANFROST_PARAM_MAX_THREADS, ++ DRM_PANFROST_PARAM_THREAD_MAX_WORKGROUP_SZ, ++ DRM_PANFROST_PARAM_THREAD_MAX_BARRIER_SZ, ++ DRM_PANFROST_PARAM_COHERENCY_FEATURES, ++ DRM_PANFROST_PARAM_TEXTURE_FEATURES0, ++ DRM_PANFROST_PARAM_TEXTURE_FEATURES1, ++ DRM_PANFROST_PARAM_TEXTURE_FEATURES2, ++ DRM_PANFROST_PARAM_TEXTURE_FEATURES3, ++ DRM_PANFROST_PARAM_JS_FEATURES0, ++ DRM_PANFROST_PARAM_JS_FEATURES1, ++ DRM_PANFROST_PARAM_JS_FEATURES2, ++ DRM_PANFROST_PARAM_JS_FEATURES3, ++ DRM_PANFROST_PARAM_JS_FEATURES4, ++ DRM_PANFROST_PARAM_JS_FEATURES5, ++ DRM_PANFROST_PARAM_JS_FEATURES6, ++ DRM_PANFROST_PARAM_JS_FEATURES7, ++ DRM_PANFROST_PARAM_JS_FEATURES8, ++ DRM_PANFROST_PARAM_JS_FEATURES9, ++ DRM_PANFROST_PARAM_JS_FEATURES10, ++ DRM_PANFROST_PARAM_JS_FEATURES11, ++ DRM_PANFROST_PARAM_JS_FEATURES12, ++ DRM_PANFROST_PARAM_JS_FEATURES13, ++ DRM_PANFROST_PARAM_JS_FEATURES14, ++ DRM_PANFROST_PARAM_JS_FEATURES15, ++ DRM_PANFROST_PARAM_NR_CORE_GROUPS, ++ DRM_PANFROST_PARAM_THREAD_TLS_ALLOC, ++}; ++struct drm_panfrost_get_param { ++ __u32 param; ++ __u32 pad; ++ __u64 value; ++}; ++struct drm_panfrost_get_bo_offset { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++struct drm_panfrost_perfcnt_enable { ++ __u32 enable; ++ __u32 counterset; ++}; ++struct drm_panfrost_perfcnt_dump { ++ __u64 buf_ptr; ++}; ++#define PANFROST_MADV_WILLNEED 0 ++#define PANFROST_MADV_DONTNEED 1 ++struct drm_panfrost_madvise { ++ __u32 handle; ++ __u32 madv; ++ __u32 retained; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/qxl_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/qxl_drm.h +new file mode 100644 +index 0000000..e9521c4 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/qxl_drm.h +@@ -0,0 +1,103 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef QXL_DRM_H ++#define QXL_DRM_H ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define QXL_GEM_DOMAIN_CPU 0 ++#define QXL_GEM_DOMAIN_VRAM 1 ++#define QXL_GEM_DOMAIN_SURFACE 2 ++#define DRM_QXL_ALLOC 0x00 ++#define DRM_QXL_MAP 0x01 ++#define DRM_QXL_EXECBUFFER 0x02 ++#define DRM_QXL_UPDATE_AREA 0x03 ++#define DRM_QXL_GETPARAM 0x04 ++#define DRM_QXL_CLIENTCAP 0x05 ++#define DRM_QXL_ALLOC_SURF 0x06 ++struct drm_qxl_alloc { ++ __u32 size; ++ __u32 handle; ++}; ++struct drm_qxl_map { ++ __u64 offset; ++ __u32 handle; ++ __u32 pad; ++}; ++#define QXL_RELOC_TYPE_BO 1 ++#define QXL_RELOC_TYPE_SURF 2 ++struct drm_qxl_reloc { ++ __u64 src_offset; ++ __u64 dst_offset; ++ __u32 src_handle; ++ __u32 dst_handle; ++ __u32 reloc_type; ++ __u32 pad; ++}; ++struct drm_qxl_command { ++ __u64 command; ++ __u64 relocs; ++ __u32 type; ++ __u32 command_size; ++ __u32 relocs_num; ++ __u32 pad; ++}; ++struct drm_qxl_execbuffer { ++ __u32 flags; ++ __u32 commands_num; ++ __u64 commands; ++}; ++struct drm_qxl_update_area { ++ __u32 handle; ++ __u32 top; ++ __u32 left; ++ __u32 bottom; ++ __u32 right; ++ __u32 pad; ++}; ++#define QXL_PARAM_NUM_SURFACES 1 ++#define QXL_PARAM_MAX_RELOCS 2 ++struct drm_qxl_getparam { ++ __u64 param; ++ __u64 value; ++}; ++struct drm_qxl_clientcap { ++ __u32 index; ++ __u32 pad; ++}; ++struct drm_qxl_alloc_surf { ++ __u32 format; ++ __u32 width; ++ __u32 height; ++ __s32 stride; ++ __u32 handle; ++ __u32 pad; ++}; ++#define DRM_IOCTL_QXL_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC, struct drm_qxl_alloc) ++#define DRM_IOCTL_QXL_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_MAP, struct drm_qxl_map) ++#define DRM_IOCTL_QXL_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_EXECBUFFER, struct drm_qxl_execbuffer) ++#define DRM_IOCTL_QXL_UPDATE_AREA DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_UPDATE_AREA, struct drm_qxl_update_area) ++#define DRM_IOCTL_QXL_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_GETPARAM, struct drm_qxl_getparam) ++#define DRM_IOCTL_QXL_CLIENTCAP DRM_IOW(DRM_COMMAND_BASE + DRM_QXL_CLIENTCAP, struct drm_qxl_clientcap) ++#define DRM_IOCTL_QXL_ALLOC_SURF DRM_IOWR(DRM_COMMAND_BASE + DRM_QXL_ALLOC_SURF, struct drm_qxl_alloc_surf) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/r128_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/r128_drm.h +new file mode 100644 +index 0000000..618b6dc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/r128_drm.h +@@ -0,0 +1,235 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __R128_DRM_H__ ++#define __R128_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef __R128_SAREA_DEFINES__ ++#define __R128_SAREA_DEFINES__ ++#define R128_UPLOAD_CONTEXT 0x001 ++#define R128_UPLOAD_SETUP 0x002 ++#define R128_UPLOAD_TEX0 0x004 ++#define R128_UPLOAD_TEX1 0x008 ++#define R128_UPLOAD_TEX0IMAGES 0x010 ++#define R128_UPLOAD_TEX1IMAGES 0x020 ++#define R128_UPLOAD_CORE 0x040 ++#define R128_UPLOAD_MASKS 0x080 ++#define R128_UPLOAD_WINDOW 0x100 ++#define R128_UPLOAD_CLIPRECTS 0x200 ++#define R128_REQUIRE_QUIESCENCE 0x400 ++#define R128_UPLOAD_ALL 0x7ff ++#define R128_FRONT 0x1 ++#define R128_BACK 0x2 ++#define R128_DEPTH 0x4 ++#define R128_POINTS 0x1 ++#define R128_LINES 0x2 ++#define R128_LINE_STRIP 0x3 ++#define R128_TRIANGLES 0x4 ++#define R128_TRIANGLE_FAN 0x5 ++#define R128_TRIANGLE_STRIP 0x6 ++#define R128_BUFFER_SIZE 16384 ++#define R128_INDEX_PRIM_OFFSET 20 ++#define R128_HOSTDATA_BLIT_OFFSET 32 ++#define R128_NR_SAREA_CLIPRECTS 12 ++#define R128_LOCAL_TEX_HEAP 0 ++#define R128_AGP_TEX_HEAP 1 ++#define R128_NR_TEX_HEAPS 2 ++#define R128_NR_TEX_REGIONS 64 ++#define R128_LOG_TEX_GRANULARITY 16 ++#define R128_NR_CONTEXT_REGS 12 ++#define R128_MAX_TEXTURE_LEVELS 11 ++#define R128_MAX_TEXTURE_UNITS 2 ++#endif ++typedef struct { ++ unsigned int dst_pitch_offset_c; ++ unsigned int dp_gui_master_cntl_c; ++ unsigned int sc_top_left_c; ++ unsigned int sc_bottom_right_c; ++ unsigned int z_offset_c; ++ unsigned int z_pitch_c; ++ unsigned int z_sten_cntl_c; ++ unsigned int tex_cntl_c; ++ unsigned int misc_3d_state_cntl_reg; ++ unsigned int texture_clr_cmp_clr_c; ++ unsigned int texture_clr_cmp_msk_c; ++ unsigned int fog_color_c; ++ unsigned int tex_size_pitch_c; ++ unsigned int constant_color_c; ++ unsigned int pm4_vc_fpu_setup; ++ unsigned int setup_cntl; ++ unsigned int dp_write_mask; ++ unsigned int sten_ref_mask_c; ++ unsigned int plane_3d_mask_c; ++ unsigned int window_xy_offset; ++ unsigned int scale_3d_cntl; ++} drm_r128_context_regs_t; ++typedef struct { ++ unsigned int tex_cntl; ++ unsigned int tex_combine_cntl; ++ unsigned int tex_size_pitch; ++ unsigned int tex_offset[R128_MAX_TEXTURE_LEVELS]; ++ unsigned int tex_border_color; ++} drm_r128_texture_regs_t; ++typedef struct drm_r128_sarea { ++ drm_r128_context_regs_t context_state; ++ drm_r128_texture_regs_t tex_state[R128_MAX_TEXTURE_UNITS]; ++ unsigned int dirty; ++ unsigned int vertsize; ++ unsigned int vc_format; ++ struct drm_clip_rect boxes[R128_NR_SAREA_CLIPRECTS]; ++ unsigned int nbox; ++ unsigned int last_frame; ++ unsigned int last_dispatch; ++ struct drm_tex_region tex_list[R128_NR_TEX_HEAPS][R128_NR_TEX_REGIONS + 1]; ++ unsigned int tex_age[R128_NR_TEX_HEAPS]; ++ int ctx_owner; ++ int pfAllowPageFlip; ++ int pfCurrentPage; ++} drm_r128_sarea_t; ++#define DRM_R128_INIT 0x00 ++#define DRM_R128_CCE_START 0x01 ++#define DRM_R128_CCE_STOP 0x02 ++#define DRM_R128_CCE_RESET 0x03 ++#define DRM_R128_CCE_IDLE 0x04 ++#define DRM_R128_RESET 0x06 ++#define DRM_R128_SWAP 0x07 ++#define DRM_R128_CLEAR 0x08 ++#define DRM_R128_VERTEX 0x09 ++#define DRM_R128_INDICES 0x0a ++#define DRM_R128_BLIT 0x0b ++#define DRM_R128_DEPTH 0x0c ++#define DRM_R128_STIPPLE 0x0d ++#define DRM_R128_INDIRECT 0x0f ++#define DRM_R128_FULLSCREEN 0x10 ++#define DRM_R128_CLEAR2 0x11 ++#define DRM_R128_GETPARAM 0x12 ++#define DRM_R128_FLIP 0x13 ++#define DRM_IOCTL_R128_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_R128_INIT, drm_r128_init_t) ++#define DRM_IOCTL_R128_CCE_START DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_START) ++#define DRM_IOCTL_R128_CCE_STOP DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CCE_STOP, drm_r128_cce_stop_t) ++#define DRM_IOCTL_R128_CCE_RESET DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_RESET) ++#define DRM_IOCTL_R128_CCE_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_R128_CCE_IDLE) ++#define DRM_IOCTL_R128_RESET DRM_IO(DRM_COMMAND_BASE + DRM_R128_RESET) ++#define DRM_IOCTL_R128_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_R128_SWAP) ++#define DRM_IOCTL_R128_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CLEAR, drm_r128_clear_t) ++#define DRM_IOCTL_R128_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_R128_VERTEX, drm_r128_vertex_t) ++#define DRM_IOCTL_R128_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_R128_INDICES, drm_r128_indices_t) ++#define DRM_IOCTL_R128_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_R128_BLIT, drm_r128_blit_t) ++#define DRM_IOCTL_R128_DEPTH DRM_IOW(DRM_COMMAND_BASE + DRM_R128_DEPTH, drm_r128_depth_t) ++#define DRM_IOCTL_R128_STIPPLE DRM_IOW(DRM_COMMAND_BASE + DRM_R128_STIPPLE, drm_r128_stipple_t) ++#define DRM_IOCTL_R128_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_INDIRECT, drm_r128_indirect_t) ++#define DRM_IOCTL_R128_FULLSCREEN DRM_IOW(DRM_COMMAND_BASE + DRM_R128_FULLSCREEN, drm_r128_fullscreen_t) ++#define DRM_IOCTL_R128_CLEAR2 DRM_IOW(DRM_COMMAND_BASE + DRM_R128_CLEAR2, drm_r128_clear2_t) ++#define DRM_IOCTL_R128_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_R128_GETPARAM, drm_r128_getparam_t) ++#define DRM_IOCTL_R128_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_R128_FLIP) ++typedef struct drm_r128_init { ++ enum { ++ R128_INIT_CCE = 0x01, ++ R128_CLEANUP_CCE = 0x02 ++ } func; ++ unsigned long sarea_priv_offset; ++ int is_pci; ++ int cce_mode; ++ int cce_secure; ++ int ring_size; ++ int usec_timeout; ++ unsigned int fb_bpp; ++ unsigned int front_offset, front_pitch; ++ unsigned int back_offset, back_pitch; ++ unsigned int depth_bpp; ++ unsigned int depth_offset, depth_pitch; ++ unsigned int span_offset; ++ unsigned long fb_offset; ++ unsigned long mmio_offset; ++ unsigned long ring_offset; ++ unsigned long ring_rptr_offset; ++ unsigned long buffers_offset; ++ unsigned long agp_textures_offset; ++} drm_r128_init_t; ++typedef struct drm_r128_cce_stop { ++ int flush; ++ int idle; ++} drm_r128_cce_stop_t; ++typedef struct drm_r128_clear { ++ unsigned int flags; ++ unsigned int clear_color; ++ unsigned int clear_depth; ++ unsigned int color_mask; ++ unsigned int depth_mask; ++} drm_r128_clear_t; ++typedef struct drm_r128_vertex { ++ int prim; ++ int idx; ++ int count; ++ int discard; ++} drm_r128_vertex_t; ++typedef struct drm_r128_indices { ++ int prim; ++ int idx; ++ int start; ++ int end; ++ int discard; ++} drm_r128_indices_t; ++typedef struct drm_r128_blit { ++ int idx; ++ int pitch; ++ int offset; ++ int format; ++ unsigned short x, y; ++ unsigned short width, height; ++} drm_r128_blit_t; ++typedef struct drm_r128_depth { ++ enum { ++ R128_WRITE_SPAN = 0x01, ++ R128_WRITE_PIXELS = 0x02, ++ R128_READ_SPAN = 0x03, ++ R128_READ_PIXELS = 0x04 ++ } func; ++ int n; ++ int __user * x; ++ int __user * y; ++ unsigned int __user * buffer; ++ unsigned char __user * mask; ++} drm_r128_depth_t; ++typedef struct drm_r128_stipple { ++ unsigned int __user * mask; ++} drm_r128_stipple_t; ++typedef struct drm_r128_indirect { ++ int idx; ++ int start; ++ int end; ++ int discard; ++} drm_r128_indirect_t; ++typedef struct drm_r128_fullscreen { ++ enum { ++ R128_INIT_FULLSCREEN = 0x01, ++ R128_CLEANUP_FULLSCREEN = 0x02 ++ } func; ++} drm_r128_fullscreen_t; ++#define R128_PARAM_IRQ_NR 1 ++typedef struct drm_r128_getparam { ++ int param; ++ void __user * value; ++} drm_r128_getparam_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/radeon_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/radeon_drm.h +new file mode 100644 +index 0000000..9dc69ad +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/radeon_drm.h +@@ -0,0 +1,807 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __RADEON_DRM_H__ ++#define __RADEON_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef __RADEON_SAREA_DEFINES__ ++#define __RADEON_SAREA_DEFINES__ ++#define RADEON_UPLOAD_CONTEXT 0x00000001 ++#define RADEON_UPLOAD_VERTFMT 0x00000002 ++#define RADEON_UPLOAD_LINE 0x00000004 ++#define RADEON_UPLOAD_BUMPMAP 0x00000008 ++#define RADEON_UPLOAD_MASKS 0x00000010 ++#define RADEON_UPLOAD_VIEWPORT 0x00000020 ++#define RADEON_UPLOAD_SETUP 0x00000040 ++#define RADEON_UPLOAD_TCL 0x00000080 ++#define RADEON_UPLOAD_MISC 0x00000100 ++#define RADEON_UPLOAD_TEX0 0x00000200 ++#define RADEON_UPLOAD_TEX1 0x00000400 ++#define RADEON_UPLOAD_TEX2 0x00000800 ++#define RADEON_UPLOAD_TEX0IMAGES 0x00001000 ++#define RADEON_UPLOAD_TEX1IMAGES 0x00002000 ++#define RADEON_UPLOAD_TEX2IMAGES 0x00004000 ++#define RADEON_UPLOAD_CLIPRECTS 0x00008000 ++#define RADEON_REQUIRE_QUIESCENCE 0x00010000 ++#define RADEON_UPLOAD_ZBIAS 0x00020000 ++#define RADEON_UPLOAD_ALL 0x003effff ++#define RADEON_UPLOAD_CONTEXT_ALL 0x003e01ff ++#define RADEON_EMIT_PP_MISC 0 ++#define RADEON_EMIT_PP_CNTL 1 ++#define RADEON_EMIT_RB3D_COLORPITCH 2 ++#define RADEON_EMIT_RE_LINE_PATTERN 3 ++#define RADEON_EMIT_SE_LINE_WIDTH 4 ++#define RADEON_EMIT_PP_LUM_MATRIX 5 ++#define RADEON_EMIT_PP_ROT_MATRIX_0 6 ++#define RADEON_EMIT_RB3D_STENCILREFMASK 7 ++#define RADEON_EMIT_SE_VPORT_XSCALE 8 ++#define RADEON_EMIT_SE_CNTL 9 ++#define RADEON_EMIT_SE_CNTL_STATUS 10 ++#define RADEON_EMIT_RE_MISC 11 ++#define RADEON_EMIT_PP_TXFILTER_0 12 ++#define RADEON_EMIT_PP_BORDER_COLOR_0 13 ++#define RADEON_EMIT_PP_TXFILTER_1 14 ++#define RADEON_EMIT_PP_BORDER_COLOR_1 15 ++#define RADEON_EMIT_PP_TXFILTER_2 16 ++#define RADEON_EMIT_PP_BORDER_COLOR_2 17 ++#define RADEON_EMIT_SE_ZBIAS_FACTOR 18 ++#define RADEON_EMIT_SE_TCL_OUTPUT_VTX_FMT 19 ++#define RADEON_EMIT_SE_TCL_MATERIAL_EMMISSIVE_RED 20 ++#define R200_EMIT_PP_TXCBLEND_0 21 ++#define R200_EMIT_PP_TXCBLEND_1 22 ++#define R200_EMIT_PP_TXCBLEND_2 23 ++#define R200_EMIT_PP_TXCBLEND_3 24 ++#define R200_EMIT_PP_TXCBLEND_4 25 ++#define R200_EMIT_PP_TXCBLEND_5 26 ++#define R200_EMIT_PP_TXCBLEND_6 27 ++#define R200_EMIT_PP_TXCBLEND_7 28 ++#define R200_EMIT_TCL_LIGHT_MODEL_CTL_0 29 ++#define R200_EMIT_TFACTOR_0 30 ++#define R200_EMIT_VTX_FMT_0 31 ++#define R200_EMIT_VAP_CTL 32 ++#define R200_EMIT_MATRIX_SELECT_0 33 ++#define R200_EMIT_TEX_PROC_CTL_2 34 ++#define R200_EMIT_TCL_UCP_VERT_BLEND_CTL 35 ++#define R200_EMIT_PP_TXFILTER_0 36 ++#define R200_EMIT_PP_TXFILTER_1 37 ++#define R200_EMIT_PP_TXFILTER_2 38 ++#define R200_EMIT_PP_TXFILTER_3 39 ++#define R200_EMIT_PP_TXFILTER_4 40 ++#define R200_EMIT_PP_TXFILTER_5 41 ++#define R200_EMIT_PP_TXOFFSET_0 42 ++#define R200_EMIT_PP_TXOFFSET_1 43 ++#define R200_EMIT_PP_TXOFFSET_2 44 ++#define R200_EMIT_PP_TXOFFSET_3 45 ++#define R200_EMIT_PP_TXOFFSET_4 46 ++#define R200_EMIT_PP_TXOFFSET_5 47 ++#define R200_EMIT_VTE_CNTL 48 ++#define R200_EMIT_OUTPUT_VTX_COMP_SEL 49 ++#define R200_EMIT_PP_TAM_DEBUG3 50 ++#define R200_EMIT_PP_CNTL_X 51 ++#define R200_EMIT_RB3D_DEPTHXY_OFFSET 52 ++#define R200_EMIT_RE_AUX_SCISSOR_CNTL 53 ++#define R200_EMIT_RE_SCISSOR_TL_0 54 ++#define R200_EMIT_RE_SCISSOR_TL_1 55 ++#define R200_EMIT_RE_SCISSOR_TL_2 56 ++#define R200_EMIT_SE_VAP_CNTL_STATUS 57 ++#define R200_EMIT_SE_VTX_STATE_CNTL 58 ++#define R200_EMIT_RE_POINTSIZE 59 ++#define R200_EMIT_TCL_INPUT_VTX_VECTOR_ADDR_0 60 ++#define R200_EMIT_PP_CUBIC_FACES_0 61 ++#define R200_EMIT_PP_CUBIC_OFFSETS_0 62 ++#define R200_EMIT_PP_CUBIC_FACES_1 63 ++#define R200_EMIT_PP_CUBIC_OFFSETS_1 64 ++#define R200_EMIT_PP_CUBIC_FACES_2 65 ++#define R200_EMIT_PP_CUBIC_OFFSETS_2 66 ++#define R200_EMIT_PP_CUBIC_FACES_3 67 ++#define R200_EMIT_PP_CUBIC_OFFSETS_3 68 ++#define R200_EMIT_PP_CUBIC_FACES_4 69 ++#define R200_EMIT_PP_CUBIC_OFFSETS_4 70 ++#define R200_EMIT_PP_CUBIC_FACES_5 71 ++#define R200_EMIT_PP_CUBIC_OFFSETS_5 72 ++#define RADEON_EMIT_PP_TEX_SIZE_0 73 ++#define RADEON_EMIT_PP_TEX_SIZE_1 74 ++#define RADEON_EMIT_PP_TEX_SIZE_2 75 ++#define R200_EMIT_RB3D_BLENDCOLOR 76 ++#define R200_EMIT_TCL_POINT_SPRITE_CNTL 77 ++#define RADEON_EMIT_PP_CUBIC_FACES_0 78 ++#define RADEON_EMIT_PP_CUBIC_OFFSETS_T0 79 ++#define RADEON_EMIT_PP_CUBIC_FACES_1 80 ++#define RADEON_EMIT_PP_CUBIC_OFFSETS_T1 81 ++#define RADEON_EMIT_PP_CUBIC_FACES_2 82 ++#define RADEON_EMIT_PP_CUBIC_OFFSETS_T2 83 ++#define R200_EMIT_PP_TRI_PERF_CNTL 84 ++#define R200_EMIT_PP_AFS_0 85 ++#define R200_EMIT_PP_AFS_1 86 ++#define R200_EMIT_ATF_TFACTOR 87 ++#define R200_EMIT_PP_TXCTLALL_0 88 ++#define R200_EMIT_PP_TXCTLALL_1 89 ++#define R200_EMIT_PP_TXCTLALL_2 90 ++#define R200_EMIT_PP_TXCTLALL_3 91 ++#define R200_EMIT_PP_TXCTLALL_4 92 ++#define R200_EMIT_PP_TXCTLALL_5 93 ++#define R200_EMIT_VAP_PVS_CNTL 94 ++#define RADEON_MAX_STATE_PACKETS 95 ++#define RADEON_CMD_PACKET 1 ++#define RADEON_CMD_SCALARS 2 ++#define RADEON_CMD_VECTORS 3 ++#define RADEON_CMD_DMA_DISCARD 4 ++#define RADEON_CMD_PACKET3 5 ++#define RADEON_CMD_PACKET3_CLIP 6 ++#define RADEON_CMD_SCALARS2 7 ++#define RADEON_CMD_WAIT 8 ++#define RADEON_CMD_VECLINEAR 9 ++typedef union { ++ int i; ++ struct { ++ unsigned char cmd_type, pad0, pad1, pad2; ++ } header; ++ struct { ++ unsigned char cmd_type, packet_id, pad0, pad1; ++ } packet; ++ struct { ++ unsigned char cmd_type, offset, stride, count; ++ } scalars; ++ struct { ++ unsigned char cmd_type, offset, stride, count; ++ } vectors; ++ struct { ++ unsigned char cmd_type, addr_lo, addr_hi, count; ++ } veclinear; ++ struct { ++ unsigned char cmd_type, buf_idx, pad0, pad1; ++ } dma; ++ struct { ++ unsigned char cmd_type, flags, pad0, pad1; ++ } wait; ++} drm_radeon_cmd_header_t; ++#define RADEON_WAIT_2D 0x1 ++#define RADEON_WAIT_3D 0x2 ++#define R300_CMD_PACKET3_CLEAR 0 ++#define R300_CMD_PACKET3_RAW 1 ++#define R300_CMD_PACKET0 1 ++#define R300_CMD_VPU 2 ++#define R300_CMD_PACKET3 3 ++#define R300_CMD_END3D 4 ++#define R300_CMD_CP_DELAY 5 ++#define R300_CMD_DMA_DISCARD 6 ++#define R300_CMD_WAIT 7 ++#define R300_WAIT_2D 0x1 ++#define R300_WAIT_3D 0x2 ++#define R300_WAIT_2D_CLEAN 0x3 ++#define R300_WAIT_3D_CLEAN 0x4 ++#define R300_NEW_WAIT_2D_3D 0x3 ++#define R300_NEW_WAIT_2D_2D_CLEAN 0x4 ++#define R300_NEW_WAIT_3D_3D_CLEAN 0x6 ++#define R300_NEW_WAIT_2D_2D_CLEAN_3D_3D_CLEAN 0x8 ++#define R300_CMD_SCRATCH 8 ++#define R300_CMD_R500FP 9 ++typedef union { ++ unsigned int u; ++ struct { ++ unsigned char cmd_type, pad0, pad1, pad2; ++ } header; ++ struct { ++ unsigned char cmd_type, count, reglo, reghi; ++ } packet0; ++ struct { ++ unsigned char cmd_type, count, adrlo, adrhi; ++ } vpu; ++ struct { ++ unsigned char cmd_type, packet, pad0, pad1; ++ } packet3; ++ struct { ++ unsigned char cmd_type, packet; ++ unsigned short count; ++ } delay; ++ struct { ++ unsigned char cmd_type, buf_idx, pad0, pad1; ++ } dma; ++ struct { ++ unsigned char cmd_type, flags, pad0, pad1; ++ } wait; ++ struct { ++ unsigned char cmd_type, reg, n_bufs, flags; ++ } scratch; ++ struct { ++ unsigned char cmd_type, count, adrlo, adrhi_flags; ++ } r500fp; ++} drm_r300_cmd_header_t; ++#define RADEON_FRONT 0x1 ++#define RADEON_BACK 0x2 ++#define RADEON_DEPTH 0x4 ++#define RADEON_STENCIL 0x8 ++#define RADEON_CLEAR_FASTZ 0x80000000 ++#define RADEON_USE_HIERZ 0x40000000 ++#define RADEON_USE_COMP_ZBUF 0x20000000 ++#define R500FP_CONSTANT_TYPE (1 << 1) ++#define R500FP_CONSTANT_CLAMP (1 << 2) ++#define RADEON_POINTS 0x1 ++#define RADEON_LINES 0x2 ++#define RADEON_LINE_STRIP 0x3 ++#define RADEON_TRIANGLES 0x4 ++#define RADEON_TRIANGLE_FAN 0x5 ++#define RADEON_TRIANGLE_STRIP 0x6 ++#define RADEON_BUFFER_SIZE 65536 ++#define RADEON_INDEX_PRIM_OFFSET 20 ++#define RADEON_SCRATCH_REG_OFFSET 32 ++#define R600_SCRATCH_REG_OFFSET 256 ++#define RADEON_NR_SAREA_CLIPRECTS 12 ++#define RADEON_LOCAL_TEX_HEAP 0 ++#define RADEON_GART_TEX_HEAP 1 ++#define RADEON_NR_TEX_HEAPS 2 ++#define RADEON_NR_TEX_REGIONS 64 ++#define RADEON_LOG_TEX_GRANULARITY 16 ++#define RADEON_MAX_TEXTURE_LEVELS 12 ++#define RADEON_MAX_TEXTURE_UNITS 3 ++#define RADEON_MAX_SURFACES 8 ++#define RADEON_OFFSET_SHIFT 10 ++#define RADEON_OFFSET_ALIGN (1 << RADEON_OFFSET_SHIFT) ++#define RADEON_OFFSET_MASK (RADEON_OFFSET_ALIGN - 1) ++#endif ++typedef struct { ++ unsigned int red; ++ unsigned int green; ++ unsigned int blue; ++ unsigned int alpha; ++} radeon_color_regs_t; ++typedef struct { ++ unsigned int pp_misc; ++ unsigned int pp_fog_color; ++ unsigned int re_solid_color; ++ unsigned int rb3d_blendcntl; ++ unsigned int rb3d_depthoffset; ++ unsigned int rb3d_depthpitch; ++ unsigned int rb3d_zstencilcntl; ++ unsigned int pp_cntl; ++ unsigned int rb3d_cntl; ++ unsigned int rb3d_coloroffset; ++ unsigned int re_width_height; ++ unsigned int rb3d_colorpitch; ++ unsigned int se_cntl; ++ unsigned int se_coord_fmt; ++ unsigned int re_line_pattern; ++ unsigned int re_line_state; ++ unsigned int se_line_width; ++ unsigned int pp_lum_matrix; ++ unsigned int pp_rot_matrix_0; ++ unsigned int pp_rot_matrix_1; ++ unsigned int rb3d_stencilrefmask; ++ unsigned int rb3d_ropcntl; ++ unsigned int rb3d_planemask; ++ unsigned int se_vport_xscale; ++ unsigned int se_vport_xoffset; ++ unsigned int se_vport_yscale; ++ unsigned int se_vport_yoffset; ++ unsigned int se_vport_zscale; ++ unsigned int se_vport_zoffset; ++ unsigned int se_cntl_status; ++ unsigned int re_top_left; ++ unsigned int re_misc; ++} drm_radeon_context_regs_t; ++typedef struct { ++ unsigned int se_zbias_factor; ++ unsigned int se_zbias_constant; ++} drm_radeon_context2_regs_t; ++typedef struct { ++ unsigned int pp_txfilter; ++ unsigned int pp_txformat; ++ unsigned int pp_txoffset; ++ unsigned int pp_txcblend; ++ unsigned int pp_txablend; ++ unsigned int pp_tfactor; ++ unsigned int pp_border_color; ++} drm_radeon_texture_regs_t; ++typedef struct { ++ unsigned int start; ++ unsigned int finish; ++ unsigned int prim : 8; ++ unsigned int stateidx : 8; ++ unsigned int numverts : 16; ++ unsigned int vc_format; ++} drm_radeon_prim_t; ++typedef struct { ++ drm_radeon_context_regs_t context; ++ drm_radeon_texture_regs_t tex[RADEON_MAX_TEXTURE_UNITS]; ++ drm_radeon_context2_regs_t context2; ++ unsigned int dirty; ++} drm_radeon_state_t; ++typedef struct { ++ drm_radeon_context_regs_t context_state; ++ drm_radeon_texture_regs_t tex_state[RADEON_MAX_TEXTURE_UNITS]; ++ unsigned int dirty; ++ unsigned int vertsize; ++ unsigned int vc_format; ++ struct drm_clip_rect boxes[RADEON_NR_SAREA_CLIPRECTS]; ++ unsigned int nbox; ++ unsigned int last_frame; ++ unsigned int last_dispatch; ++ unsigned int last_clear; ++ struct drm_tex_region tex_list[RADEON_NR_TEX_HEAPS][RADEON_NR_TEX_REGIONS + 1]; ++ unsigned int tex_age[RADEON_NR_TEX_HEAPS]; ++ int ctx_owner; ++ int pfState; ++ int pfCurrentPage; ++ int crtc2_base; ++ int tiling_enabled; ++} drm_radeon_sarea_t; ++#define DRM_RADEON_CP_INIT 0x00 ++#define DRM_RADEON_CP_START 0x01 ++#define DRM_RADEON_CP_STOP 0x02 ++#define DRM_RADEON_CP_RESET 0x03 ++#define DRM_RADEON_CP_IDLE 0x04 ++#define DRM_RADEON_RESET 0x05 ++#define DRM_RADEON_FULLSCREEN 0x06 ++#define DRM_RADEON_SWAP 0x07 ++#define DRM_RADEON_CLEAR 0x08 ++#define DRM_RADEON_VERTEX 0x09 ++#define DRM_RADEON_INDICES 0x0A ++#define DRM_RADEON_NOT_USED ++#define DRM_RADEON_STIPPLE 0x0C ++#define DRM_RADEON_INDIRECT 0x0D ++#define DRM_RADEON_TEXTURE 0x0E ++#define DRM_RADEON_VERTEX2 0x0F ++#define DRM_RADEON_CMDBUF 0x10 ++#define DRM_RADEON_GETPARAM 0x11 ++#define DRM_RADEON_FLIP 0x12 ++#define DRM_RADEON_ALLOC 0x13 ++#define DRM_RADEON_FREE 0x14 ++#define DRM_RADEON_INIT_HEAP 0x15 ++#define DRM_RADEON_IRQ_EMIT 0x16 ++#define DRM_RADEON_IRQ_WAIT 0x17 ++#define DRM_RADEON_CP_RESUME 0x18 ++#define DRM_RADEON_SETPARAM 0x19 ++#define DRM_RADEON_SURF_ALLOC 0x1a ++#define DRM_RADEON_SURF_FREE 0x1b ++#define DRM_RADEON_GEM_INFO 0x1c ++#define DRM_RADEON_GEM_CREATE 0x1d ++#define DRM_RADEON_GEM_MMAP 0x1e ++#define DRM_RADEON_GEM_PREAD 0x21 ++#define DRM_RADEON_GEM_PWRITE 0x22 ++#define DRM_RADEON_GEM_SET_DOMAIN 0x23 ++#define DRM_RADEON_GEM_WAIT_IDLE 0x24 ++#define DRM_RADEON_CS 0x26 ++#define DRM_RADEON_INFO 0x27 ++#define DRM_RADEON_GEM_SET_TILING 0x28 ++#define DRM_RADEON_GEM_GET_TILING 0x29 ++#define DRM_RADEON_GEM_BUSY 0x2a ++#define DRM_RADEON_GEM_VA 0x2b ++#define DRM_RADEON_GEM_OP 0x2c ++#define DRM_RADEON_GEM_USERPTR 0x2d ++#define DRM_IOCTL_RADEON_CP_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_INIT, drm_radeon_init_t) ++#define DRM_IOCTL_RADEON_CP_START DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_START) ++#define DRM_IOCTL_RADEON_CP_STOP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CP_STOP, drm_radeon_cp_stop_t) ++#define DRM_IOCTL_RADEON_CP_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESET) ++#define DRM_IOCTL_RADEON_CP_IDLE DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_IDLE) ++#define DRM_IOCTL_RADEON_RESET DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_RESET) ++#define DRM_IOCTL_RADEON_FULLSCREEN DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FULLSCREEN, drm_radeon_fullscreen_t) ++#define DRM_IOCTL_RADEON_SWAP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_SWAP) ++#define DRM_IOCTL_RADEON_CLEAR DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CLEAR, drm_radeon_clear_t) ++#define DRM_IOCTL_RADEON_VERTEX DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX, drm_radeon_vertex_t) ++#define DRM_IOCTL_RADEON_INDICES DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INDICES, drm_radeon_indices_t) ++#define DRM_IOCTL_RADEON_STIPPLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_STIPPLE, drm_radeon_stipple_t) ++#define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INDIRECT, drm_radeon_indirect_t) ++#define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_TEXTURE, drm_radeon_texture_t) ++#define DRM_IOCTL_RADEON_VERTEX2 DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_VERTEX2, drm_radeon_vertex2_t) ++#define DRM_IOCTL_RADEON_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_CMDBUF, drm_radeon_cmd_buffer_t) ++#define DRM_IOCTL_RADEON_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GETPARAM, drm_radeon_getparam_t) ++#define DRM_IOCTL_RADEON_FLIP DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_FLIP) ++#define DRM_IOCTL_RADEON_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_ALLOC, drm_radeon_mem_alloc_t) ++#define DRM_IOCTL_RADEON_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_FREE, drm_radeon_mem_free_t) ++#define DRM_IOCTL_RADEON_INIT_HEAP DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_INIT_HEAP, drm_radeon_mem_init_heap_t) ++#define DRM_IOCTL_RADEON_IRQ_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_IRQ_EMIT, drm_radeon_irq_emit_t) ++#define DRM_IOCTL_RADEON_IRQ_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_IRQ_WAIT, drm_radeon_irq_wait_t) ++#define DRM_IOCTL_RADEON_CP_RESUME DRM_IO(DRM_COMMAND_BASE + DRM_RADEON_CP_RESUME) ++#define DRM_IOCTL_RADEON_SETPARAM DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SETPARAM, drm_radeon_setparam_t) ++#define DRM_IOCTL_RADEON_SURF_ALLOC DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_ALLOC, drm_radeon_surface_alloc_t) ++#define DRM_IOCTL_RADEON_SURF_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_SURF_FREE, drm_radeon_surface_free_t) ++#define DRM_IOCTL_RADEON_GEM_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_INFO, struct drm_radeon_gem_info) ++#define DRM_IOCTL_RADEON_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_CREATE, struct drm_radeon_gem_create) ++#define DRM_IOCTL_RADEON_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_MMAP, struct drm_radeon_gem_mmap) ++#define DRM_IOCTL_RADEON_GEM_PREAD DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PREAD, struct drm_radeon_gem_pread) ++#define DRM_IOCTL_RADEON_GEM_PWRITE DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_PWRITE, struct drm_radeon_gem_pwrite) ++#define DRM_IOCTL_RADEON_GEM_SET_DOMAIN DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_DOMAIN, struct drm_radeon_gem_set_domain) ++#define DRM_IOCTL_RADEON_GEM_WAIT_IDLE DRM_IOW(DRM_COMMAND_BASE + DRM_RADEON_GEM_WAIT_IDLE, struct drm_radeon_gem_wait_idle) ++#define DRM_IOCTL_RADEON_CS DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_CS, struct drm_radeon_cs) ++#define DRM_IOCTL_RADEON_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_INFO, struct drm_radeon_info) ++#define DRM_IOCTL_RADEON_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_SET_TILING, struct drm_radeon_gem_set_tiling) ++#define DRM_IOCTL_RADEON_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_GET_TILING, struct drm_radeon_gem_get_tiling) ++#define DRM_IOCTL_RADEON_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_BUSY, struct drm_radeon_gem_busy) ++#define DRM_IOCTL_RADEON_GEM_VA DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_VA, struct drm_radeon_gem_va) ++#define DRM_IOCTL_RADEON_GEM_OP DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_OP, struct drm_radeon_gem_op) ++#define DRM_IOCTL_RADEON_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_RADEON_GEM_USERPTR, struct drm_radeon_gem_userptr) ++typedef struct drm_radeon_init { ++ enum { ++ RADEON_INIT_CP = 0x01, ++ RADEON_CLEANUP_CP = 0x02, ++ RADEON_INIT_R200_CP = 0x03, ++ RADEON_INIT_R300_CP = 0x04, ++ RADEON_INIT_R600_CP = 0x05 ++ } func; ++ unsigned long sarea_priv_offset; ++ int is_pci; ++ int cp_mode; ++ int gart_size; ++ int ring_size; ++ int usec_timeout; ++ unsigned int fb_bpp; ++ unsigned int front_offset, front_pitch; ++ unsigned int back_offset, back_pitch; ++ unsigned int depth_bpp; ++ unsigned int depth_offset, depth_pitch; ++ unsigned long fb_offset; ++ unsigned long mmio_offset; ++ unsigned long ring_offset; ++ unsigned long ring_rptr_offset; ++ unsigned long buffers_offset; ++ unsigned long gart_textures_offset; ++} drm_radeon_init_t; ++typedef struct drm_radeon_cp_stop { ++ int flush; ++ int idle; ++} drm_radeon_cp_stop_t; ++typedef struct drm_radeon_fullscreen { ++ enum { ++ RADEON_INIT_FULLSCREEN = 0x01, ++ RADEON_CLEANUP_FULLSCREEN = 0x02 ++ } func; ++} drm_radeon_fullscreen_t; ++#define CLEAR_X1 0 ++#define CLEAR_Y1 1 ++#define CLEAR_X2 2 ++#define CLEAR_Y2 3 ++#define CLEAR_DEPTH 4 ++typedef union drm_radeon_clear_rect { ++ float f[5]; ++ unsigned int ui[5]; ++} drm_radeon_clear_rect_t; ++typedef struct drm_radeon_clear { ++ unsigned int flags; ++ unsigned int clear_color; ++ unsigned int clear_depth; ++ unsigned int color_mask; ++ unsigned int depth_mask; ++ drm_radeon_clear_rect_t __user * depth_boxes; ++} drm_radeon_clear_t; ++typedef struct drm_radeon_vertex { ++ int prim; ++ int idx; ++ int count; ++ int discard; ++} drm_radeon_vertex_t; ++typedef struct drm_radeon_indices { ++ int prim; ++ int idx; ++ int start; ++ int end; ++ int discard; ++} drm_radeon_indices_t; ++typedef struct drm_radeon_vertex2 { ++ int idx; ++ int discard; ++ int nr_states; ++ drm_radeon_state_t __user * state; ++ int nr_prims; ++ drm_radeon_prim_t __user * prim; ++} drm_radeon_vertex2_t; ++typedef struct drm_radeon_cmd_buffer { ++ int bufsz; ++ char __user * buf; ++ int nbox; ++ struct drm_clip_rect __user * boxes; ++} drm_radeon_cmd_buffer_t; ++typedef struct drm_radeon_tex_image { ++ unsigned int x, y; ++ unsigned int width, height; ++ const void __user * data; ++} drm_radeon_tex_image_t; ++typedef struct drm_radeon_texture { ++ unsigned int offset; ++ int pitch; ++ int format; ++ int width; ++ int height; ++ drm_radeon_tex_image_t __user * image; ++} drm_radeon_texture_t; ++typedef struct drm_radeon_stipple { ++ unsigned int __user * mask; ++} drm_radeon_stipple_t; ++typedef struct drm_radeon_indirect { ++ int idx; ++ int start; ++ int end; ++ int discard; ++} drm_radeon_indirect_t; ++#define RADEON_CARD_PCI 0 ++#define RADEON_CARD_AGP 1 ++#define RADEON_CARD_PCIE 2 ++#define RADEON_PARAM_GART_BUFFER_OFFSET 1 ++#define RADEON_PARAM_LAST_FRAME 2 ++#define RADEON_PARAM_LAST_DISPATCH 3 ++#define RADEON_PARAM_LAST_CLEAR 4 ++#define RADEON_PARAM_IRQ_NR 5 ++#define RADEON_PARAM_GART_BASE 6 ++#define RADEON_PARAM_REGISTER_HANDLE 7 ++#define RADEON_PARAM_STATUS_HANDLE 8 ++#define RADEON_PARAM_SAREA_HANDLE 9 ++#define RADEON_PARAM_GART_TEX_HANDLE 10 ++#define RADEON_PARAM_SCRATCH_OFFSET 11 ++#define RADEON_PARAM_CARD_TYPE 12 ++#define RADEON_PARAM_VBLANK_CRTC 13 ++#define RADEON_PARAM_FB_LOCATION 14 ++#define RADEON_PARAM_NUM_GB_PIPES 15 ++#define RADEON_PARAM_DEVICE_ID 16 ++#define RADEON_PARAM_NUM_Z_PIPES 17 ++typedef struct drm_radeon_getparam { ++ int param; ++ void __user * value; ++} drm_radeon_getparam_t; ++#define RADEON_MEM_REGION_GART 1 ++#define RADEON_MEM_REGION_FB 2 ++typedef struct drm_radeon_mem_alloc { ++ int region; ++ int alignment; ++ int size; ++ int __user * region_offset; ++} drm_radeon_mem_alloc_t; ++typedef struct drm_radeon_mem_free { ++ int region; ++ int region_offset; ++} drm_radeon_mem_free_t; ++typedef struct drm_radeon_mem_init_heap { ++ int region; ++ int size; ++ int start; ++} drm_radeon_mem_init_heap_t; ++typedef struct drm_radeon_irq_emit { ++ int __user * irq_seq; ++} drm_radeon_irq_emit_t; ++typedef struct drm_radeon_irq_wait { ++ int irq_seq; ++} drm_radeon_irq_wait_t; ++typedef struct drm_radeon_setparam { ++ unsigned int param; ++ __s64 value; ++} drm_radeon_setparam_t; ++#define RADEON_SETPARAM_FB_LOCATION 1 ++#define RADEON_SETPARAM_SWITCH_TILING 2 ++#define RADEON_SETPARAM_PCIGART_LOCATION 3 ++#define RADEON_SETPARAM_NEW_MEMMAP 4 ++#define RADEON_SETPARAM_PCIGART_TABLE_SIZE 5 ++#define RADEON_SETPARAM_VBLANK_CRTC 6 ++typedef struct drm_radeon_surface_alloc { ++ unsigned int address; ++ unsigned int size; ++ unsigned int flags; ++} drm_radeon_surface_alloc_t; ++typedef struct drm_radeon_surface_free { ++ unsigned int address; ++} drm_radeon_surface_free_t; ++#define DRM_RADEON_VBLANK_CRTC1 1 ++#define DRM_RADEON_VBLANK_CRTC2 2 ++#define RADEON_GEM_DOMAIN_CPU 0x1 ++#define RADEON_GEM_DOMAIN_GTT 0x2 ++#define RADEON_GEM_DOMAIN_VRAM 0x4 ++struct drm_radeon_gem_info { ++ __u64 gart_size; ++ __u64 vram_size; ++ __u64 vram_visible; ++}; ++#define RADEON_GEM_NO_BACKING_STORE (1 << 0) ++#define RADEON_GEM_GTT_UC (1 << 1) ++#define RADEON_GEM_GTT_WC (1 << 2) ++#define RADEON_GEM_CPU_ACCESS (1 << 3) ++#define RADEON_GEM_NO_CPU_ACCESS (1 << 4) ++struct drm_radeon_gem_create { ++ __u64 size; ++ __u64 alignment; ++ __u32 handle; ++ __u32 initial_domain; ++ __u32 flags; ++}; ++#define RADEON_GEM_USERPTR_READONLY (1 << 0) ++#define RADEON_GEM_USERPTR_ANONONLY (1 << 1) ++#define RADEON_GEM_USERPTR_VALIDATE (1 << 2) ++#define RADEON_GEM_USERPTR_REGISTER (1 << 3) ++struct drm_radeon_gem_userptr { ++ __u64 addr; ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++#define RADEON_TILING_MACRO 0x1 ++#define RADEON_TILING_MICRO 0x2 ++#define RADEON_TILING_SWAP_16BIT 0x4 ++#define RADEON_TILING_SWAP_32BIT 0x8 ++#define RADEON_TILING_SURFACE 0x10 ++#define RADEON_TILING_MICRO_SQUARE 0x20 ++#define RADEON_TILING_EG_BANKW_SHIFT 8 ++#define RADEON_TILING_EG_BANKW_MASK 0xf ++#define RADEON_TILING_EG_BANKH_SHIFT 12 ++#define RADEON_TILING_EG_BANKH_MASK 0xf ++#define RADEON_TILING_EG_MACRO_TILE_ASPECT_SHIFT 16 ++#define RADEON_TILING_EG_MACRO_TILE_ASPECT_MASK 0xf ++#define RADEON_TILING_EG_TILE_SPLIT_SHIFT 24 ++#define RADEON_TILING_EG_TILE_SPLIT_MASK 0xf ++#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_SHIFT 28 ++#define RADEON_TILING_EG_STENCIL_TILE_SPLIT_MASK 0xf ++struct drm_radeon_gem_set_tiling { ++ __u32 handle; ++ __u32 tiling_flags; ++ __u32 pitch; ++}; ++struct drm_radeon_gem_get_tiling { ++ __u32 handle; ++ __u32 tiling_flags; ++ __u32 pitch; ++}; ++struct drm_radeon_gem_mmap { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 addr_ptr; ++}; ++struct drm_radeon_gem_set_domain { ++ __u32 handle; ++ __u32 read_domains; ++ __u32 write_domain; ++}; ++struct drm_radeon_gem_wait_idle { ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_radeon_gem_busy { ++ __u32 handle; ++ __u32 domain; ++}; ++struct drm_radeon_gem_pread { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 data_ptr; ++}; ++struct drm_radeon_gem_pwrite { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++ __u64 size; ++ __u64 data_ptr; ++}; ++struct drm_radeon_gem_op { ++ __u32 handle; ++ __u32 op; ++ __u64 value; ++}; ++#define RADEON_GEM_OP_GET_INITIAL_DOMAIN 0 ++#define RADEON_GEM_OP_SET_INITIAL_DOMAIN 1 ++#define RADEON_VA_MAP 1 ++#define RADEON_VA_UNMAP 2 ++#define RADEON_VA_RESULT_OK 0 ++#define RADEON_VA_RESULT_ERROR 1 ++#define RADEON_VA_RESULT_VA_EXIST 2 ++#define RADEON_VM_PAGE_VALID (1 << 0) ++#define RADEON_VM_PAGE_READABLE (1 << 1) ++#define RADEON_VM_PAGE_WRITEABLE (1 << 2) ++#define RADEON_VM_PAGE_SYSTEM (1 << 3) ++#define RADEON_VM_PAGE_SNOOPED (1 << 4) ++struct drm_radeon_gem_va { ++ __u32 handle; ++ __u32 operation; ++ __u32 vm_id; ++ __u32 flags; ++ __u64 offset; ++}; ++#define RADEON_CHUNK_ID_RELOCS 0x01 ++#define RADEON_CHUNK_ID_IB 0x02 ++#define RADEON_CHUNK_ID_FLAGS 0x03 ++#define RADEON_CHUNK_ID_CONST_IB 0x04 ++#define RADEON_CS_KEEP_TILING_FLAGS 0x01 ++#define RADEON_CS_USE_VM 0x02 ++#define RADEON_CS_END_OF_FRAME 0x04 ++#define RADEON_CS_RING_GFX 0 ++#define RADEON_CS_RING_COMPUTE 1 ++#define RADEON_CS_RING_DMA 2 ++#define RADEON_CS_RING_UVD 3 ++#define RADEON_CS_RING_VCE 4 ++struct drm_radeon_cs_chunk { ++ __u32 chunk_id; ++ __u32 length_dw; ++ __u64 chunk_data; ++}; ++#define RADEON_RELOC_PRIO_MASK (0xf << 0) ++struct drm_radeon_cs_reloc { ++ __u32 handle; ++ __u32 read_domains; ++ __u32 write_domain; ++ __u32 flags; ++}; ++struct drm_radeon_cs { ++ __u32 num_chunks; ++ __u32 cs_id; ++ __u64 chunks; ++ __u64 gart_limit; ++ __u64 vram_limit; ++}; ++#define RADEON_INFO_DEVICE_ID 0x00 ++#define RADEON_INFO_NUM_GB_PIPES 0x01 ++#define RADEON_INFO_NUM_Z_PIPES 0x02 ++#define RADEON_INFO_ACCEL_WORKING 0x03 ++#define RADEON_INFO_CRTC_FROM_ID 0x04 ++#define RADEON_INFO_ACCEL_WORKING2 0x05 ++#define RADEON_INFO_TILING_CONFIG 0x06 ++#define RADEON_INFO_WANT_HYPERZ 0x07 ++#define RADEON_INFO_WANT_CMASK 0x08 ++#define RADEON_INFO_CLOCK_CRYSTAL_FREQ 0x09 ++#define RADEON_INFO_NUM_BACKENDS 0x0a ++#define RADEON_INFO_NUM_TILE_PIPES 0x0b ++#define RADEON_INFO_FUSION_GART_WORKING 0x0c ++#define RADEON_INFO_BACKEND_MAP 0x0d ++#define RADEON_INFO_VA_START 0x0e ++#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f ++#define RADEON_INFO_MAX_PIPES 0x10 ++#define RADEON_INFO_TIMESTAMP 0x11 ++#define RADEON_INFO_MAX_SE 0x12 ++#define RADEON_INFO_MAX_SH_PER_SE 0x13 ++#define RADEON_INFO_FASTFB_WORKING 0x14 ++#define RADEON_INFO_RING_WORKING 0x15 ++#define RADEON_INFO_SI_TILE_MODE_ARRAY 0x16 ++#define RADEON_INFO_SI_CP_DMA_COMPUTE 0x17 ++#define RADEON_INFO_CIK_MACROTILE_MODE_ARRAY 0x18 ++#define RADEON_INFO_SI_BACKEND_ENABLED_MASK 0x19 ++#define RADEON_INFO_MAX_SCLK 0x1a ++#define RADEON_INFO_VCE_FW_VERSION 0x1b ++#define RADEON_INFO_VCE_FB_VERSION 0x1c ++#define RADEON_INFO_NUM_BYTES_MOVED 0x1d ++#define RADEON_INFO_VRAM_USAGE 0x1e ++#define RADEON_INFO_GTT_USAGE 0x1f ++#define RADEON_INFO_ACTIVE_CU_COUNT 0x20 ++#define RADEON_INFO_CURRENT_GPU_TEMP 0x21 ++#define RADEON_INFO_CURRENT_GPU_SCLK 0x22 ++#define RADEON_INFO_CURRENT_GPU_MCLK 0x23 ++#define RADEON_INFO_READ_REG 0x24 ++#define RADEON_INFO_VA_UNMAP_WORKING 0x25 ++#define RADEON_INFO_GPU_RESET_COUNTER 0x26 ++struct drm_radeon_info { ++ __u32 request; ++ __u32 pad; ++ __u64 value; ++}; ++#define SI_TILE_MODE_COLOR_LINEAR_ALIGNED 8 ++#define SI_TILE_MODE_COLOR_1D 13 ++#define SI_TILE_MODE_COLOR_1D_SCANOUT 9 ++#define SI_TILE_MODE_COLOR_2D_8BPP 14 ++#define SI_TILE_MODE_COLOR_2D_16BPP 15 ++#define SI_TILE_MODE_COLOR_2D_32BPP 16 ++#define SI_TILE_MODE_COLOR_2D_64BPP 17 ++#define SI_TILE_MODE_COLOR_2D_SCANOUT_16BPP 11 ++#define SI_TILE_MODE_COLOR_2D_SCANOUT_32BPP 12 ++#define SI_TILE_MODE_DEPTH_STENCIL_1D 4 ++#define SI_TILE_MODE_DEPTH_STENCIL_2D 0 ++#define SI_TILE_MODE_DEPTH_STENCIL_2D_2AA 3 ++#define SI_TILE_MODE_DEPTH_STENCIL_2D_4AA 3 ++#define SI_TILE_MODE_DEPTH_STENCIL_2D_8AA 2 ++#define CIK_TILE_MODE_DEPTH_STENCIL_1D 5 ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/savage_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/savage_drm.h +new file mode 100644 +index 0000000..ae87d21 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/savage_drm.h +@@ -0,0 +1,157 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __SAVAGE_DRM_H__ ++#define __SAVAGE_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef __SAVAGE_SAREA_DEFINES__ ++#define __SAVAGE_SAREA_DEFINES__ ++#define SAVAGE_CARD_HEAP 0 ++#define SAVAGE_AGP_HEAP 1 ++#define SAVAGE_NR_TEX_HEAPS 2 ++#define SAVAGE_NR_TEX_REGIONS 16 ++#define SAVAGE_LOG_MIN_TEX_REGION_SIZE 16 ++#endif ++typedef struct _drm_savage_sarea { ++ struct drm_tex_region texList[SAVAGE_NR_TEX_HEAPS][SAVAGE_NR_TEX_REGIONS + 1]; ++ unsigned int texAge[SAVAGE_NR_TEX_HEAPS]; ++ int ctxOwner; ++} drm_savage_sarea_t, * drm_savage_sarea_ptr; ++#define DRM_SAVAGE_BCI_INIT 0x00 ++#define DRM_SAVAGE_BCI_CMDBUF 0x01 ++#define DRM_SAVAGE_BCI_EVENT_EMIT 0x02 ++#define DRM_SAVAGE_BCI_EVENT_WAIT 0x03 ++#define DRM_IOCTL_SAVAGE_BCI_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_INIT, drm_savage_init_t) ++#define DRM_IOCTL_SAVAGE_BCI_CMDBUF DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_CMDBUF, drm_savage_cmdbuf_t) ++#define DRM_IOCTL_SAVAGE_BCI_EVENT_EMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_EMIT, drm_savage_event_emit_t) ++#define DRM_IOCTL_SAVAGE_BCI_EVENT_WAIT DRM_IOW(DRM_COMMAND_BASE + DRM_SAVAGE_BCI_EVENT_WAIT, drm_savage_event_wait_t) ++#define SAVAGE_DMA_PCI 1 ++#define SAVAGE_DMA_AGP 3 ++typedef struct drm_savage_init { ++ enum { ++ SAVAGE_INIT_BCI = 1, ++ SAVAGE_CLEANUP_BCI = 2 ++ } func; ++ unsigned int sarea_priv_offset; ++ unsigned int cob_size; ++ unsigned int bci_threshold_lo, bci_threshold_hi; ++ unsigned int dma_type; ++ unsigned int fb_bpp; ++ unsigned int front_offset, front_pitch; ++ unsigned int back_offset, back_pitch; ++ unsigned int depth_bpp; ++ unsigned int depth_offset, depth_pitch; ++ unsigned int texture_offset; ++ unsigned int texture_size; ++ unsigned long status_offset; ++ unsigned long buffers_offset; ++ unsigned long agp_textures_offset; ++ unsigned long cmd_dma_offset; ++} drm_savage_init_t; ++typedef union drm_savage_cmd_header drm_savage_cmd_header_t; ++typedef struct drm_savage_cmdbuf { ++ drm_savage_cmd_header_t __user * cmd_addr; ++ unsigned int size; ++ unsigned int dma_idx; ++ int discard; ++ unsigned int __user * vb_addr; ++ unsigned int vb_size; ++ unsigned int vb_stride; ++ struct drm_clip_rect __user * box_addr; ++ unsigned int nbox; ++} drm_savage_cmdbuf_t; ++#define SAVAGE_WAIT_2D 0x1 ++#define SAVAGE_WAIT_3D 0x2 ++#define SAVAGE_WAIT_IRQ 0x4 ++typedef struct drm_savage_event { ++ unsigned int count; ++ unsigned int flags; ++} drm_savage_event_emit_t, drm_savage_event_wait_t; ++#define SAVAGE_CMD_STATE 0 ++#define SAVAGE_CMD_DMA_PRIM 1 ++#define SAVAGE_CMD_VB_PRIM 2 ++#define SAVAGE_CMD_DMA_IDX 3 ++#define SAVAGE_CMD_VB_IDX 4 ++#define SAVAGE_CMD_CLEAR 5 ++#define SAVAGE_CMD_SWAP 6 ++#define SAVAGE_PRIM_TRILIST 0 ++#define SAVAGE_PRIM_TRISTRIP 1 ++#define SAVAGE_PRIM_TRIFAN 2 ++#define SAVAGE_PRIM_TRILIST_201 3 ++#define SAVAGE_SKIP_Z 0x01 ++#define SAVAGE_SKIP_W 0x02 ++#define SAVAGE_SKIP_C0 0x04 ++#define SAVAGE_SKIP_C1 0x08 ++#define SAVAGE_SKIP_S0 0x10 ++#define SAVAGE_SKIP_T0 0x20 ++#define SAVAGE_SKIP_ST0 0x30 ++#define SAVAGE_SKIP_S1 0x40 ++#define SAVAGE_SKIP_T1 0x80 ++#define SAVAGE_SKIP_ST1 0xc0 ++#define SAVAGE_SKIP_ALL_S3D 0x3f ++#define SAVAGE_SKIP_ALL_S4 0xff ++#define SAVAGE_FRONT 0x1 ++#define SAVAGE_BACK 0x2 ++#define SAVAGE_DEPTH 0x4 ++union drm_savage_cmd_header { ++ struct { ++ unsigned char cmd; ++ unsigned char pad0; ++ unsigned short pad1; ++ unsigned short pad2; ++ unsigned short pad3; ++ } cmd; ++ struct { ++ unsigned char cmd; ++ unsigned char global; ++ unsigned short count; ++ unsigned short start; ++ unsigned short pad3; ++ } state; ++ struct { ++ unsigned char cmd; ++ unsigned char prim; ++ unsigned short skip; ++ unsigned short count; ++ unsigned short start; ++ } prim; ++ struct { ++ unsigned char cmd; ++ unsigned char prim; ++ unsigned short skip; ++ unsigned short count; ++ unsigned short pad3; ++ } idx; ++ struct { ++ unsigned char cmd; ++ unsigned char pad0; ++ unsigned short pad1; ++ unsigned int flags; ++ } clear0; ++ struct { ++ unsigned int mask; ++ unsigned int value; ++ } clear1; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/sis_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/sis_drm.h +new file mode 100644 +index 0000000..1606a85 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/sis_drm.h +@@ -0,0 +1,54 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __SIS_DRM_H__ ++#define __SIS_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define NOT_USED_0_3 ++#define DRM_SIS_FB_ALLOC 0x04 ++#define DRM_SIS_FB_FREE 0x05 ++#define NOT_USED_6_12 ++#define DRM_SIS_AGP_INIT 0x13 ++#define DRM_SIS_AGP_ALLOC 0x14 ++#define DRM_SIS_AGP_FREE 0x15 ++#define DRM_SIS_FB_INIT 0x16 ++#define DRM_IOCTL_SIS_FB_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_FB_ALLOC, drm_sis_mem_t) ++#define DRM_IOCTL_SIS_FB_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_FB_FREE, drm_sis_mem_t) ++#define DRM_IOCTL_SIS_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_INIT, drm_sis_agp_t) ++#define DRM_IOCTL_SIS_AGP_ALLOC DRM_IOWR(DRM_COMMAND_BASE + DRM_SIS_AGP_ALLOC, drm_sis_mem_t) ++#define DRM_IOCTL_SIS_AGP_FREE DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_AGP_FREE, drm_sis_mem_t) ++#define DRM_IOCTL_SIS_FB_INIT DRM_IOW(DRM_COMMAND_BASE + DRM_SIS_FB_INIT, drm_sis_fb_t) ++typedef struct { ++ int context; ++ unsigned long offset; ++ unsigned long size; ++ unsigned long free; ++} drm_sis_mem_t; ++typedef struct { ++ unsigned long offset, size; ++} drm_sis_agp_t; ++typedef struct { ++ unsigned long offset, size; ++} drm_sis_fb_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/tegra_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/tegra_drm.h +new file mode 100644 +index 0000000..5244a27 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/tegra_drm.h +@@ -0,0 +1,169 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_TEGRA_DRM_H_ ++#define _UAPI_TEGRA_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_TEGRA_GEM_CREATE_TILED (1 << 0) ++#define DRM_TEGRA_GEM_CREATE_BOTTOM_UP (1 << 1) ++struct drm_tegra_gem_create { ++ __u64 size; ++ __u32 flags; ++ __u32 handle; ++}; ++struct drm_tegra_gem_mmap { ++ __u32 handle; ++ __u32 pad; ++ __u64 offset; ++}; ++struct drm_tegra_syncpt_read { ++ __u32 id; ++ __u32 value; ++}; ++struct drm_tegra_syncpt_incr { ++ __u32 id; ++ __u32 pad; ++}; ++struct drm_tegra_syncpt_wait { ++ __u32 id; ++ __u32 thresh; ++ __u32 timeout; ++ __u32 value; ++}; ++#define DRM_TEGRA_NO_TIMEOUT (0xffffffff) ++struct drm_tegra_open_channel { ++ __u32 client; ++ __u32 pad; ++ __u64 context; ++}; ++struct drm_tegra_close_channel { ++ __u64 context; ++}; ++struct drm_tegra_get_syncpt { ++ __u64 context; ++ __u32 index; ++ __u32 id; ++}; ++struct drm_tegra_get_syncpt_base { ++ __u64 context; ++ __u32 syncpt; ++ __u32 id; ++}; ++struct drm_tegra_syncpt { ++ __u32 id; ++ __u32 incrs; ++}; ++struct drm_tegra_cmdbuf { ++ __u32 handle; ++ __u32 offset; ++ __u32 words; ++ __u32 pad; ++}; ++struct drm_tegra_reloc { ++ struct { ++ __u32 handle; ++ __u32 offset; ++ } cmdbuf; ++ struct { ++ __u32 handle; ++ __u32 offset; ++ } target; ++ __u32 shift; ++ __u32 pad; ++}; ++struct drm_tegra_waitchk { ++ __u32 handle; ++ __u32 offset; ++ __u32 syncpt; ++ __u32 thresh; ++}; ++struct drm_tegra_submit { ++ __u64 context; ++ __u32 num_syncpts; ++ __u32 num_cmdbufs; ++ __u32 num_relocs; ++ __u32 num_waitchks; ++ __u32 waitchk_mask; ++ __u32 timeout; ++ __u64 syncpts; ++ __u64 cmdbufs; ++ __u64 relocs; ++ __u64 waitchks; ++ __u32 fence; ++ __u32 reserved[5]; ++}; ++#define DRM_TEGRA_GEM_TILING_MODE_PITCH 0 ++#define DRM_TEGRA_GEM_TILING_MODE_TILED 1 ++#define DRM_TEGRA_GEM_TILING_MODE_BLOCK 2 ++struct drm_tegra_gem_set_tiling { ++ __u32 handle; ++ __u32 mode; ++ __u32 value; ++ __u32 pad; ++}; ++struct drm_tegra_gem_get_tiling { ++ __u32 handle; ++ __u32 mode; ++ __u32 value; ++ __u32 pad; ++}; ++#define DRM_TEGRA_GEM_BOTTOM_UP (1 << 0) ++#define DRM_TEGRA_GEM_FLAGS (DRM_TEGRA_GEM_BOTTOM_UP) ++struct drm_tegra_gem_set_flags { ++ __u32 handle; ++ __u32 flags; ++}; ++struct drm_tegra_gem_get_flags { ++ __u32 handle; ++ __u32 flags; ++}; ++#define DRM_TEGRA_GEM_CREATE 0x00 ++#define DRM_TEGRA_GEM_MMAP 0x01 ++#define DRM_TEGRA_SYNCPT_READ 0x02 ++#define DRM_TEGRA_SYNCPT_INCR 0x03 ++#define DRM_TEGRA_SYNCPT_WAIT 0x04 ++#define DRM_TEGRA_OPEN_CHANNEL 0x05 ++#define DRM_TEGRA_CLOSE_CHANNEL 0x06 ++#define DRM_TEGRA_GET_SYNCPT 0x07 ++#define DRM_TEGRA_SUBMIT 0x08 ++#define DRM_TEGRA_GET_SYNCPT_BASE 0x09 ++#define DRM_TEGRA_GEM_SET_TILING 0x0a ++#define DRM_TEGRA_GEM_GET_TILING 0x0b ++#define DRM_TEGRA_GEM_SET_FLAGS 0x0c ++#define DRM_TEGRA_GEM_GET_FLAGS 0x0d ++#define DRM_IOCTL_TEGRA_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_CREATE, struct drm_tegra_gem_create) ++#define DRM_IOCTL_TEGRA_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_MMAP, struct drm_tegra_gem_mmap) ++#define DRM_IOCTL_TEGRA_SYNCPT_READ DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_READ, struct drm_tegra_syncpt_read) ++#define DRM_IOCTL_TEGRA_SYNCPT_INCR DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_INCR, struct drm_tegra_syncpt_incr) ++#define DRM_IOCTL_TEGRA_SYNCPT_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SYNCPT_WAIT, struct drm_tegra_syncpt_wait) ++#define DRM_IOCTL_TEGRA_OPEN_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_OPEN_CHANNEL, struct drm_tegra_open_channel) ++#define DRM_IOCTL_TEGRA_CLOSE_CHANNEL DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_CLOSE_CHANNEL, struct drm_tegra_close_channel) ++#define DRM_IOCTL_TEGRA_GET_SYNCPT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT, struct drm_tegra_get_syncpt) ++#define DRM_IOCTL_TEGRA_SUBMIT DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_SUBMIT, struct drm_tegra_submit) ++#define DRM_IOCTL_TEGRA_GET_SYNCPT_BASE DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GET_SYNCPT_BASE, struct drm_tegra_get_syncpt_base) ++#define DRM_IOCTL_TEGRA_GEM_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_TILING, struct drm_tegra_gem_set_tiling) ++#define DRM_IOCTL_TEGRA_GEM_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_TILING, struct drm_tegra_gem_get_tiling) ++#define DRM_IOCTL_TEGRA_GEM_SET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_SET_FLAGS, struct drm_tegra_gem_set_flags) ++#define DRM_IOCTL_TEGRA_GEM_GET_FLAGS DRM_IOWR(DRM_COMMAND_BASE + DRM_TEGRA_GEM_GET_FLAGS, struct drm_tegra_gem_get_flags) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/v3d_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/v3d_drm.h +new file mode 100644 +index 0000000..cdc2cf5 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/v3d_drm.h +@@ -0,0 +1,118 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _V3D_DRM_H_ ++#define _V3D_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_V3D_SUBMIT_CL 0x00 ++#define DRM_V3D_WAIT_BO 0x01 ++#define DRM_V3D_CREATE_BO 0x02 ++#define DRM_V3D_MMAP_BO 0x03 ++#define DRM_V3D_GET_PARAM 0x04 ++#define DRM_V3D_GET_BO_OFFSET 0x05 ++#define DRM_V3D_SUBMIT_TFU 0x06 ++#define DRM_V3D_SUBMIT_CSD 0x07 ++#define DRM_IOCTL_V3D_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CL, struct drm_v3d_submit_cl) ++#define DRM_IOCTL_V3D_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_WAIT_BO, struct drm_v3d_wait_bo) ++#define DRM_IOCTL_V3D_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_CREATE_BO, struct drm_v3d_create_bo) ++#define DRM_IOCTL_V3D_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_MMAP_BO, struct drm_v3d_mmap_bo) ++#define DRM_IOCTL_V3D_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_PARAM, struct drm_v3d_get_param) ++#define DRM_IOCTL_V3D_GET_BO_OFFSET DRM_IOWR(DRM_COMMAND_BASE + DRM_V3D_GET_BO_OFFSET, struct drm_v3d_get_bo_offset) ++#define DRM_IOCTL_V3D_SUBMIT_TFU DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_TFU, struct drm_v3d_submit_tfu) ++#define DRM_IOCTL_V3D_SUBMIT_CSD DRM_IOW(DRM_COMMAND_BASE + DRM_V3D_SUBMIT_CSD, struct drm_v3d_submit_csd) ++#define DRM_V3D_SUBMIT_CL_FLUSH_CACHE 0x01 ++struct drm_v3d_submit_cl { ++ __u32 bcl_start; ++ __u32 bcl_end; ++ __u32 rcl_start; ++ __u32 rcl_end; ++ __u32 in_sync_bcl; ++ __u32 in_sync_rcl; ++ __u32 out_sync; ++ __u32 qma; ++ __u32 qms; ++ __u32 qts; ++ __u64 bo_handles; ++ __u32 bo_handle_count; ++ __u32 flags; ++}; ++struct drm_v3d_wait_bo { ++ __u32 handle; ++ __u32 pad; ++ __u64 timeout_ns; ++}; ++struct drm_v3d_create_bo { ++ __u32 size; ++ __u32 flags; ++ __u32 handle; ++ __u32 offset; ++}; ++struct drm_v3d_mmap_bo { ++ __u32 handle; ++ __u32 flags; ++ __u64 offset; ++}; ++enum drm_v3d_param { ++ DRM_V3D_PARAM_V3D_UIFCFG, ++ DRM_V3D_PARAM_V3D_HUB_IDENT1, ++ DRM_V3D_PARAM_V3D_HUB_IDENT2, ++ DRM_V3D_PARAM_V3D_HUB_IDENT3, ++ DRM_V3D_PARAM_V3D_CORE0_IDENT0, ++ DRM_V3D_PARAM_V3D_CORE0_IDENT1, ++ DRM_V3D_PARAM_V3D_CORE0_IDENT2, ++ DRM_V3D_PARAM_SUPPORTS_TFU, ++ DRM_V3D_PARAM_SUPPORTS_CSD, ++ DRM_V3D_PARAM_SUPPORTS_CACHE_FLUSH, ++}; ++struct drm_v3d_get_param { ++ __u32 param; ++ __u32 pad; ++ __u64 value; ++}; ++struct drm_v3d_get_bo_offset { ++ __u32 handle; ++ __u32 offset; ++}; ++struct drm_v3d_submit_tfu { ++ __u32 icfg; ++ __u32 iia; ++ __u32 iis; ++ __u32 ica; ++ __u32 iua; ++ __u32 ioa; ++ __u32 ios; ++ __u32 coef[4]; ++ __u32 bo_handles[4]; ++ __u32 in_sync; ++ __u32 out_sync; ++}; ++struct drm_v3d_submit_csd { ++ __u32 cfg[7]; ++ __u32 coef[4]; ++ __u64 bo_handles; ++ __u32 bo_handle_count; ++ __u32 in_sync; ++ __u32 out_sync; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/vc4_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/vc4_drm.h +new file mode 100644 +index 0000000..fde443f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/vc4_drm.h +@@ -0,0 +1,239 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_VC4_DRM_H_ ++#define _UAPI_VC4_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_VC4_SUBMIT_CL 0x00 ++#define DRM_VC4_WAIT_SEQNO 0x01 ++#define DRM_VC4_WAIT_BO 0x02 ++#define DRM_VC4_CREATE_BO 0x03 ++#define DRM_VC4_MMAP_BO 0x04 ++#define DRM_VC4_CREATE_SHADER_BO 0x05 ++#define DRM_VC4_GET_HANG_STATE 0x06 ++#define DRM_VC4_GET_PARAM 0x07 ++#define DRM_VC4_SET_TILING 0x08 ++#define DRM_VC4_GET_TILING 0x09 ++#define DRM_VC4_LABEL_BO 0x0a ++#define DRM_VC4_GEM_MADVISE 0x0b ++#define DRM_VC4_PERFMON_CREATE 0x0c ++#define DRM_VC4_PERFMON_DESTROY 0x0d ++#define DRM_VC4_PERFMON_GET_VALUES 0x0e ++#define DRM_IOCTL_VC4_SUBMIT_CL DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SUBMIT_CL, struct drm_vc4_submit_cl) ++#define DRM_IOCTL_VC4_WAIT_SEQNO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_SEQNO, struct drm_vc4_wait_seqno) ++#define DRM_IOCTL_VC4_WAIT_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_WAIT_BO, struct drm_vc4_wait_bo) ++#define DRM_IOCTL_VC4_CREATE_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_BO, struct drm_vc4_create_bo) ++#define DRM_IOCTL_VC4_MMAP_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_MMAP_BO, struct drm_vc4_mmap_bo) ++#define DRM_IOCTL_VC4_CREATE_SHADER_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_CREATE_SHADER_BO, struct drm_vc4_create_shader_bo) ++#define DRM_IOCTL_VC4_GET_HANG_STATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_HANG_STATE, struct drm_vc4_get_hang_state) ++#define DRM_IOCTL_VC4_GET_PARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_PARAM, struct drm_vc4_get_param) ++#define DRM_IOCTL_VC4_SET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_SET_TILING, struct drm_vc4_set_tiling) ++#define DRM_IOCTL_VC4_GET_TILING DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GET_TILING, struct drm_vc4_get_tiling) ++#define DRM_IOCTL_VC4_LABEL_BO DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_LABEL_BO, struct drm_vc4_label_bo) ++#define DRM_IOCTL_VC4_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_GEM_MADVISE, struct drm_vc4_gem_madvise) ++#define DRM_IOCTL_VC4_PERFMON_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_CREATE, struct drm_vc4_perfmon_create) ++#define DRM_IOCTL_VC4_PERFMON_DESTROY DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_DESTROY, struct drm_vc4_perfmon_destroy) ++#define DRM_IOCTL_VC4_PERFMON_GET_VALUES DRM_IOWR(DRM_COMMAND_BASE + DRM_VC4_PERFMON_GET_VALUES, struct drm_vc4_perfmon_get_values) ++struct drm_vc4_submit_rcl_surface { ++ __u32 hindex; ++ __u32 offset; ++ __u16 bits; ++#define VC4_SUBMIT_RCL_SURFACE_READ_IS_FULL_RES (1 << 0) ++ __u16 flags; ++}; ++struct drm_vc4_submit_cl { ++ __u64 bin_cl; ++ __u64 shader_rec; ++ __u64 uniforms; ++ __u64 bo_handles; ++ __u32 bin_cl_size; ++ __u32 shader_rec_size; ++ __u32 shader_rec_count; ++ __u32 uniforms_size; ++ __u32 bo_handle_count; ++ __u16 width; ++ __u16 height; ++ __u8 min_x_tile; ++ __u8 min_y_tile; ++ __u8 max_x_tile; ++ __u8 max_y_tile; ++ struct drm_vc4_submit_rcl_surface color_read; ++ struct drm_vc4_submit_rcl_surface color_write; ++ struct drm_vc4_submit_rcl_surface zs_read; ++ struct drm_vc4_submit_rcl_surface zs_write; ++ struct drm_vc4_submit_rcl_surface msaa_color_write; ++ struct drm_vc4_submit_rcl_surface msaa_zs_write; ++ __u32 clear_color[2]; ++ __u32 clear_z; ++ __u8 clear_s; ++ __u32 pad : 24; ++#define VC4_SUBMIT_CL_USE_CLEAR_COLOR (1 << 0) ++#define VC4_SUBMIT_CL_FIXED_RCL_ORDER (1 << 1) ++#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X (1 << 2) ++#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y (1 << 3) ++ __u32 flags; ++ __u64 seqno; ++ __u32 perfmonid; ++ __u32 in_sync; ++ __u32 out_sync; ++ __u32 pad2; ++}; ++struct drm_vc4_wait_seqno { ++ __u64 seqno; ++ __u64 timeout_ns; ++}; ++struct drm_vc4_wait_bo { ++ __u32 handle; ++ __u32 pad; ++ __u64 timeout_ns; ++}; ++struct drm_vc4_create_bo { ++ __u32 size; ++ __u32 flags; ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_vc4_mmap_bo { ++ __u32 handle; ++ __u32 flags; ++ __u64 offset; ++}; ++struct drm_vc4_create_shader_bo { ++ __u32 size; ++ __u32 flags; ++ __u64 data; ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_vc4_get_hang_state_bo { ++ __u32 handle; ++ __u32 paddr; ++ __u32 size; ++ __u32 pad; ++}; ++struct drm_vc4_get_hang_state { ++ __u64 bo; ++ __u32 bo_count; ++ __u32 start_bin, start_render; ++ __u32 ct0ca, ct0ea; ++ __u32 ct1ca, ct1ea; ++ __u32 ct0cs, ct1cs; ++ __u32 ct0ra0, ct1ra0; ++ __u32 bpca, bpcs; ++ __u32 bpoa, bpos; ++ __u32 vpmbase; ++ __u32 dbge; ++ __u32 fdbgo; ++ __u32 fdbgb; ++ __u32 fdbgr; ++ __u32 fdbgs; ++ __u32 errstat; ++ __u32 pad[16]; ++}; ++#define DRM_VC4_PARAM_V3D_IDENT0 0 ++#define DRM_VC4_PARAM_V3D_IDENT1 1 ++#define DRM_VC4_PARAM_V3D_IDENT2 2 ++#define DRM_VC4_PARAM_SUPPORTS_BRANCHES 3 ++#define DRM_VC4_PARAM_SUPPORTS_ETC1 4 ++#define DRM_VC4_PARAM_SUPPORTS_THREADED_FS 5 ++#define DRM_VC4_PARAM_SUPPORTS_FIXED_RCL_ORDER 6 ++#define DRM_VC4_PARAM_SUPPORTS_MADVISE 7 ++#define DRM_VC4_PARAM_SUPPORTS_PERFMON 8 ++struct drm_vc4_get_param { ++ __u32 param; ++ __u32 pad; ++ __u64 value; ++}; ++struct drm_vc4_get_tiling { ++ __u32 handle; ++ __u32 flags; ++ __u64 modifier; ++}; ++struct drm_vc4_set_tiling { ++ __u32 handle; ++ __u32 flags; ++ __u64 modifier; ++}; ++struct drm_vc4_label_bo { ++ __u32 handle; ++ __u32 len; ++ __u64 name; ++}; ++#define VC4_MADV_WILLNEED 0 ++#define VC4_MADV_DONTNEED 1 ++#define __VC4_MADV_PURGED 2 ++#define __VC4_MADV_NOTSUPP 3 ++struct drm_vc4_gem_madvise { ++ __u32 handle; ++ __u32 madv; ++ __u32 retained; ++ __u32 pad; ++}; ++enum { ++ VC4_PERFCNT_FEP_VALID_PRIMS_NO_RENDER, ++ VC4_PERFCNT_FEP_VALID_PRIMS_RENDER, ++ VC4_PERFCNT_FEP_CLIPPED_QUADS, ++ VC4_PERFCNT_FEP_VALID_QUADS, ++ VC4_PERFCNT_TLB_QUADS_NOT_PASSING_STENCIL, ++ VC4_PERFCNT_TLB_QUADS_NOT_PASSING_Z_AND_STENCIL, ++ VC4_PERFCNT_TLB_QUADS_PASSING_Z_AND_STENCIL, ++ VC4_PERFCNT_TLB_QUADS_ZERO_COVERAGE, ++ VC4_PERFCNT_TLB_QUADS_NON_ZERO_COVERAGE, ++ VC4_PERFCNT_TLB_QUADS_WRITTEN_TO_COLOR_BUF, ++ VC4_PERFCNT_PLB_PRIMS_OUTSIDE_VIEWPORT, ++ VC4_PERFCNT_PLB_PRIMS_NEED_CLIPPING, ++ VC4_PERFCNT_PSE_PRIMS_REVERSED, ++ VC4_PERFCNT_QPU_TOTAL_IDLE_CYCLES, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_VERTEX_COORD_SHADING, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_FRAGMENT_SHADING, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_EXEC_VALID_INST, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_TMUS, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_SCOREBOARD, ++ VC4_PERFCNT_QPU_TOTAL_CLK_CYCLES_WAITING_VARYINGS, ++ VC4_PERFCNT_QPU_TOTAL_INST_CACHE_HIT, ++ VC4_PERFCNT_QPU_TOTAL_INST_CACHE_MISS, ++ VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_HIT, ++ VC4_PERFCNT_QPU_TOTAL_UNIFORM_CACHE_MISS, ++ VC4_PERFCNT_TMU_TOTAL_TEXT_QUADS_PROCESSED, ++ VC4_PERFCNT_TMU_TOTAL_TEXT_CACHE_MISS, ++ VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VDW_STALLED, ++ VC4_PERFCNT_VPM_TOTAL_CLK_CYCLES_VCD_STALLED, ++ VC4_PERFCNT_L2C_TOTAL_L2_CACHE_HIT, ++ VC4_PERFCNT_L2C_TOTAL_L2_CACHE_MISS, ++ VC4_PERFCNT_NUM_EVENTS, ++}; ++#define DRM_VC4_MAX_PERF_COUNTERS 16 ++struct drm_vc4_perfmon_create { ++ __u32 id; ++ __u32 ncounters; ++ __u8 events[DRM_VC4_MAX_PERF_COUNTERS]; ++}; ++struct drm_vc4_perfmon_destroy { ++ __u32 id; ++}; ++struct drm_vc4_perfmon_get_values { ++ __u32 id; ++ __u64 values_ptr; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/vgem_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/vgem_drm.h +new file mode 100644 +index 0000000..b33452b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/vgem_drm.h +@@ -0,0 +1,43 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_VGEM_DRM_H_ ++#define _UAPI_VGEM_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_VGEM_FENCE_ATTACH 0x1 ++#define DRM_VGEM_FENCE_SIGNAL 0x2 ++#define DRM_IOCTL_VGEM_FENCE_ATTACH DRM_IOWR(DRM_COMMAND_BASE + DRM_VGEM_FENCE_ATTACH, struct drm_vgem_fence_attach) ++#define DRM_IOCTL_VGEM_FENCE_SIGNAL DRM_IOW(DRM_COMMAND_BASE + DRM_VGEM_FENCE_SIGNAL, struct drm_vgem_fence_signal) ++struct drm_vgem_fence_attach { ++ __u32 handle; ++ __u32 flags; ++#define VGEM_FENCE_WRITE 0x1 ++ __u32 out_fence; ++ __u32 pad; ++}; ++struct drm_vgem_fence_signal { ++ __u32 fence; ++ __u32 flags; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/via_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/via_drm.h +new file mode 100644 +index 0000000..9ef645a +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/via_drm.h +@@ -0,0 +1,202 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _VIA_DRM_H_ ++#define _VIA_DRM_H_ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#ifndef _VIA_DEFINES_ ++#define _VIA_DEFINES_ ++#define VIA_NR_SAREA_CLIPRECTS 8 ++#define VIA_NR_XVMC_PORTS 10 ++#define VIA_NR_XVMC_LOCKS 5 ++#define VIA_MAX_CACHELINE_SIZE 64 ++#define XVMCLOCKPTR(saPriv,lockNo) ((volatile struct drm_hw_lock *) (((((unsigned long) (saPriv)->XvMCLockArea) + (VIA_MAX_CACHELINE_SIZE - 1)) & ~(VIA_MAX_CACHELINE_SIZE - 1)) + VIA_MAX_CACHELINE_SIZE * (lockNo))) ++#define VIA_NR_TEX_REGIONS 64 ++#define VIA_LOG_MIN_TEX_REGION_SIZE 16 ++#endif ++#define VIA_UPLOAD_TEX0IMAGE 0x1 ++#define VIA_UPLOAD_TEX1IMAGE 0x2 ++#define VIA_UPLOAD_CTX 0x4 ++#define VIA_UPLOAD_BUFFERS 0x8 ++#define VIA_UPLOAD_TEX0 0x10 ++#define VIA_UPLOAD_TEX1 0x20 ++#define VIA_UPLOAD_CLIPRECTS 0x40 ++#define VIA_UPLOAD_ALL 0xff ++#define DRM_VIA_ALLOCMEM 0x00 ++#define DRM_VIA_FREEMEM 0x01 ++#define DRM_VIA_AGP_INIT 0x02 ++#define DRM_VIA_FB_INIT 0x03 ++#define DRM_VIA_MAP_INIT 0x04 ++#define DRM_VIA_DEC_FUTEX 0x05 ++#define NOT_USED ++#define DRM_VIA_DMA_INIT 0x07 ++#define DRM_VIA_CMDBUFFER 0x08 ++#define DRM_VIA_FLUSH 0x09 ++#define DRM_VIA_PCICMD 0x0a ++#define DRM_VIA_CMDBUF_SIZE 0x0b ++#define NOT_USED ++#define DRM_VIA_WAIT_IRQ 0x0d ++#define DRM_VIA_DMA_BLIT 0x0e ++#define DRM_VIA_BLIT_SYNC 0x0f ++#define DRM_IOCTL_VIA_ALLOCMEM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_ALLOCMEM, drm_via_mem_t) ++#define DRM_IOCTL_VIA_FREEMEM DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_FREEMEM, drm_via_mem_t) ++#define DRM_IOCTL_VIA_AGP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_AGP_INIT, drm_via_agp_t) ++#define DRM_IOCTL_VIA_FB_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_FB_INIT, drm_via_fb_t) ++#define DRM_IOCTL_VIA_MAP_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_MAP_INIT, drm_via_init_t) ++#define DRM_IOCTL_VIA_DEC_FUTEX DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DEC_FUTEX, drm_via_futex_t) ++#define DRM_IOCTL_VIA_DMA_INIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_DMA_INIT, drm_via_dma_init_t) ++#define DRM_IOCTL_VIA_CMDBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_CMDBUFFER, drm_via_cmdbuffer_t) ++#define DRM_IOCTL_VIA_FLUSH DRM_IO(DRM_COMMAND_BASE + DRM_VIA_FLUSH) ++#define DRM_IOCTL_VIA_PCICMD DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_PCICMD, drm_via_cmdbuffer_t) ++#define DRM_IOCTL_VIA_CMDBUF_SIZE DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_CMDBUF_SIZE, drm_via_cmdbuf_size_t) ++#define DRM_IOCTL_VIA_WAIT_IRQ DRM_IOWR(DRM_COMMAND_BASE + DRM_VIA_WAIT_IRQ, drm_via_irqwait_t) ++#define DRM_IOCTL_VIA_DMA_BLIT DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_DMA_BLIT, drm_via_dmablit_t) ++#define DRM_IOCTL_VIA_BLIT_SYNC DRM_IOW(DRM_COMMAND_BASE + DRM_VIA_BLIT_SYNC, drm_via_blitsync_t) ++#define VIA_TEX_SETUP_SIZE 8 ++#define VIA_FRONT 0x1 ++#define VIA_BACK 0x2 ++#define VIA_DEPTH 0x4 ++#define VIA_STENCIL 0x8 ++#define VIA_MEM_VIDEO 0 ++#define VIA_MEM_AGP 1 ++#define VIA_MEM_SYSTEM 2 ++#define VIA_MEM_MIXED 3 ++#define VIA_MEM_UNKNOWN 4 ++typedef struct { ++ __u32 offset; ++ __u32 size; ++} drm_via_agp_t; ++typedef struct { ++ __u32 offset; ++ __u32 size; ++} drm_via_fb_t; ++typedef struct { ++ __u32 context; ++ __u32 type; ++ __u32 size; ++ unsigned long index; ++ unsigned long offset; ++} drm_via_mem_t; ++typedef struct _drm_via_init { ++ enum { ++ VIA_INIT_MAP = 0x01, ++ VIA_CLEANUP_MAP = 0x02 ++ } func; ++ unsigned long sarea_priv_offset; ++ unsigned long fb_offset; ++ unsigned long mmio_offset; ++ unsigned long agpAddr; ++} drm_via_init_t; ++typedef struct _drm_via_futex { ++ enum { ++ VIA_FUTEX_WAIT = 0x00, ++ VIA_FUTEX_WAKE = 0X01 ++ } func; ++ __u32 ms; ++ __u32 lock; ++ __u32 val; ++} drm_via_futex_t; ++typedef struct _drm_via_dma_init { ++ enum { ++ VIA_INIT_DMA = 0x01, ++ VIA_CLEANUP_DMA = 0x02, ++ VIA_DMA_INITIALIZED = 0x03 ++ } func; ++ unsigned long offset; ++ unsigned long size; ++ unsigned long reg_pause_addr; ++} drm_via_dma_init_t; ++typedef struct _drm_via_cmdbuffer { ++ char __user * buf; ++ unsigned long size; ++} drm_via_cmdbuffer_t; ++typedef struct _drm_via_tex_region { ++ unsigned char next, prev; ++ unsigned char inUse; ++ int age; ++} drm_via_tex_region_t; ++typedef struct _drm_via_sarea { ++ unsigned int dirty; ++ unsigned int nbox; ++ struct drm_clip_rect boxes[VIA_NR_SAREA_CLIPRECTS]; ++ drm_via_tex_region_t texList[VIA_NR_TEX_REGIONS + 1]; ++ int texAge; ++ int ctxOwner; ++ int vertexPrim; ++ char XvMCLockArea[VIA_MAX_CACHELINE_SIZE * (VIA_NR_XVMC_LOCKS + 1)]; ++ unsigned int XvMCDisplaying[VIA_NR_XVMC_PORTS]; ++ unsigned int XvMCSubPicOn[VIA_NR_XVMC_PORTS]; ++ unsigned int XvMCCtxNoGrabbed; ++ unsigned int pfCurrentOffset; ++} drm_via_sarea_t; ++typedef struct _drm_via_cmdbuf_size { ++ enum { ++ VIA_CMDBUF_SPACE = 0x01, ++ VIA_CMDBUF_LAG = 0x02 ++ } func; ++ int wait; ++ __u32 size; ++} drm_via_cmdbuf_size_t; ++typedef enum { ++ VIA_IRQ_ABSOLUTE = 0x0, ++ VIA_IRQ_RELATIVE = 0x1, ++ VIA_IRQ_SIGNAL = 0x10000000, ++ VIA_IRQ_FORCE_SEQUENCE = 0x20000000 ++} via_irq_seq_type_t; ++#define VIA_IRQ_FLAGS_MASK 0xF0000000 ++enum drm_via_irqs { ++ drm_via_irq_hqv0 = 0, ++ drm_via_irq_hqv1, ++ drm_via_irq_dma0_dd, ++ drm_via_irq_dma0_td, ++ drm_via_irq_dma1_dd, ++ drm_via_irq_dma1_td, ++ drm_via_irq_num ++}; ++struct drm_via_wait_irq_request { ++ unsigned irq; ++ via_irq_seq_type_t type; ++ __u32 sequence; ++ __u32 signal; ++}; ++typedef union drm_via_irqwait { ++ struct drm_via_wait_irq_request request; ++ struct drm_wait_vblank_reply reply; ++} drm_via_irqwait_t; ++typedef struct drm_via_blitsync { ++ __u32 sync_handle; ++ unsigned engine; ++} drm_via_blitsync_t; ++typedef struct drm_via_dmablit { ++ __u32 num_lines; ++ __u32 line_length; ++ __u32 fb_addr; ++ __u32 fb_stride; ++ unsigned char * mem_addr; ++ __u32 mem_stride; ++ __u32 flags; ++ int to_fb; ++ drm_via_blitsync_t sync; ++} drm_via_dmablit_t; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/virtgpu_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/virtgpu_drm.h +new file mode 100644 +index 0000000..bc4aad4 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/virtgpu_drm.h +@@ -0,0 +1,122 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef VIRTGPU_DRM_H ++#define VIRTGPU_DRM_H ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_VIRTGPU_MAP 0x01 ++#define DRM_VIRTGPU_EXECBUFFER 0x02 ++#define DRM_VIRTGPU_GETPARAM 0x03 ++#define DRM_VIRTGPU_RESOURCE_CREATE 0x04 ++#define DRM_VIRTGPU_RESOURCE_INFO 0x05 ++#define DRM_VIRTGPU_TRANSFER_FROM_HOST 0x06 ++#define DRM_VIRTGPU_TRANSFER_TO_HOST 0x07 ++#define DRM_VIRTGPU_WAIT 0x08 ++#define DRM_VIRTGPU_GET_CAPS 0x09 ++#define VIRTGPU_EXECBUF_FENCE_FD_IN 0x01 ++#define VIRTGPU_EXECBUF_FENCE_FD_OUT 0x02 ++#define VIRTGPU_EXECBUF_FLAGS (VIRTGPU_EXECBUF_FENCE_FD_IN | VIRTGPU_EXECBUF_FENCE_FD_OUT | 0) ++struct drm_virtgpu_map { ++ __u64 offset; ++ __u32 handle; ++ __u32 pad; ++}; ++struct drm_virtgpu_execbuffer { ++ __u32 flags; ++ __u32 size; ++ __u64 command; ++ __u64 bo_handles; ++ __u32 num_bo_handles; ++ __s32 fence_fd; ++}; ++#define VIRTGPU_PARAM_3D_FEATURES 1 ++#define VIRTGPU_PARAM_CAPSET_QUERY_FIX 2 ++struct drm_virtgpu_getparam { ++ __u64 param; ++ __u64 value; ++}; ++struct drm_virtgpu_resource_create { ++ __u32 target; ++ __u32 format; ++ __u32 bind; ++ __u32 width; ++ __u32 height; ++ __u32 depth; ++ __u32 array_size; ++ __u32 last_level; ++ __u32 nr_samples; ++ __u32 flags; ++ __u32 bo_handle; ++ __u32 res_handle; ++ __u32 size; ++ __u32 stride; ++}; ++struct drm_virtgpu_resource_info { ++ __u32 bo_handle; ++ __u32 res_handle; ++ __u32 size; ++ __u32 stride; ++}; ++struct drm_virtgpu_3d_box { ++ __u32 x; ++ __u32 y; ++ __u32 z; ++ __u32 w; ++ __u32 h; ++ __u32 d; ++}; ++struct drm_virtgpu_3d_transfer_to_host { ++ __u32 bo_handle; ++ struct drm_virtgpu_3d_box box; ++ __u32 level; ++ __u32 offset; ++}; ++struct drm_virtgpu_3d_transfer_from_host { ++ __u32 bo_handle; ++ struct drm_virtgpu_3d_box box; ++ __u32 level; ++ __u32 offset; ++}; ++#define VIRTGPU_WAIT_NOWAIT 1 ++struct drm_virtgpu_3d_wait { ++ __u32 handle; ++ __u32 flags; ++}; ++struct drm_virtgpu_get_caps { ++ __u32 cap_set_id; ++ __u32 cap_set_ver; ++ __u64 addr; ++ __u32 size; ++ __u32 pad; ++}; ++#define DRM_IOCTL_VIRTGPU_MAP DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_MAP, struct drm_virtgpu_map) ++#define DRM_IOCTL_VIRTGPU_EXECBUFFER DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_EXECBUFFER, struct drm_virtgpu_execbuffer) ++#define DRM_IOCTL_VIRTGPU_GETPARAM DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GETPARAM, struct drm_virtgpu_getparam) ++#define DRM_IOCTL_VIRTGPU_RESOURCE_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_CREATE, struct drm_virtgpu_resource_create) ++#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, struct drm_virtgpu_resource_info) ++#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, struct drm_virtgpu_3d_transfer_from_host) ++#define DRM_IOCTL_VIRTGPU_TRANSFER_TO_HOST DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_TO_HOST, struct drm_virtgpu_3d_transfer_to_host) ++#define DRM_IOCTL_VIRTGPU_WAIT DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_WAIT, struct drm_virtgpu_3d_wait) ++#define DRM_IOCTL_VIRTGPU_GET_CAPS DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_GET_CAPS, struct drm_virtgpu_get_caps) ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/drm/vmwgfx_drm.h b/build/ohos/ohos-sysroot/usr/include/drm/vmwgfx_drm.h +new file mode 100644 +index 0000000..982b64f +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/drm/vmwgfx_drm.h +@@ -0,0 +1,366 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __VMWGFX_DRM_H__ ++#define __VMWGFX_DRM_H__ ++#include "drm.h" ++#ifdef __cplusplus ++extern "C" { ++#endif ++#define DRM_VMW_MAX_SURFACE_FACES 6 ++#define DRM_VMW_MAX_MIP_LEVELS 24 ++#define DRM_VMW_GET_PARAM 0 ++#define DRM_VMW_ALLOC_DMABUF 1 ++#define DRM_VMW_ALLOC_BO 1 ++#define DRM_VMW_UNREF_DMABUF 2 ++#define DRM_VMW_HANDLE_CLOSE 2 ++#define DRM_VMW_CURSOR_BYPASS 3 ++#define DRM_VMW_CONTROL_STREAM 4 ++#define DRM_VMW_CLAIM_STREAM 5 ++#define DRM_VMW_UNREF_STREAM 6 ++#define DRM_VMW_CREATE_CONTEXT 7 ++#define DRM_VMW_UNREF_CONTEXT 8 ++#define DRM_VMW_CREATE_SURFACE 9 ++#define DRM_VMW_UNREF_SURFACE 10 ++#define DRM_VMW_REF_SURFACE 11 ++#define DRM_VMW_EXECBUF 12 ++#define DRM_VMW_GET_3D_CAP 13 ++#define DRM_VMW_FENCE_WAIT 14 ++#define DRM_VMW_FENCE_SIGNALED 15 ++#define DRM_VMW_FENCE_UNREF 16 ++#define DRM_VMW_FENCE_EVENT 17 ++#define DRM_VMW_PRESENT 18 ++#define DRM_VMW_PRESENT_READBACK 19 ++#define DRM_VMW_UPDATE_LAYOUT 20 ++#define DRM_VMW_CREATE_SHADER 21 ++#define DRM_VMW_UNREF_SHADER 22 ++#define DRM_VMW_GB_SURFACE_CREATE 23 ++#define DRM_VMW_GB_SURFACE_REF 24 ++#define DRM_VMW_SYNCCPU 25 ++#define DRM_VMW_CREATE_EXTENDED_CONTEXT 26 ++#define DRM_VMW_GB_SURFACE_CREATE_EXT 27 ++#define DRM_VMW_GB_SURFACE_REF_EXT 28 ++#define DRM_VMW_MSG 29 ++#define DRM_VMW_PARAM_NUM_STREAMS 0 ++#define DRM_VMW_PARAM_NUM_FREE_STREAMS 1 ++#define DRM_VMW_PARAM_3D 2 ++#define DRM_VMW_PARAM_HW_CAPS 3 ++#define DRM_VMW_PARAM_FIFO_CAPS 4 ++#define DRM_VMW_PARAM_MAX_FB_SIZE 5 ++#define DRM_VMW_PARAM_FIFO_HW_VERSION 6 ++#define DRM_VMW_PARAM_MAX_SURF_MEMORY 7 ++#define DRM_VMW_PARAM_3D_CAPS_SIZE 8 ++#define DRM_VMW_PARAM_MAX_MOB_MEMORY 9 ++#define DRM_VMW_PARAM_MAX_MOB_SIZE 10 ++#define DRM_VMW_PARAM_SCREEN_TARGET 11 ++#define DRM_VMW_PARAM_DX 12 ++#define DRM_VMW_PARAM_HW_CAPS2 13 ++#define DRM_VMW_PARAM_SM4_1 14 ++#define DRM_VMW_PARAM_SM5 15 ++enum drm_vmw_handle_type { ++ DRM_VMW_HANDLE_LEGACY = 0, ++ DRM_VMW_HANDLE_PRIME = 1 ++}; ++struct drm_vmw_getparam_arg { ++ __u64 value; ++ __u32 param; ++ __u32 pad64; ++}; ++struct drm_vmw_context_arg { ++ __s32 cid; ++ __u32 pad64; ++}; ++struct drm_vmw_surface_create_req { ++ __u32 flags; ++ __u32 format; ++ __u32 mip_levels[DRM_VMW_MAX_SURFACE_FACES]; ++ __u64 size_addr; ++ __s32 shareable; ++ __s32 scanout; ++}; ++struct drm_vmw_surface_arg { ++ __s32 sid; ++ enum drm_vmw_handle_type handle_type; ++}; ++struct drm_vmw_size { ++ __u32 width; ++ __u32 height; ++ __u32 depth; ++ __u32 pad64; ++}; ++union drm_vmw_surface_create_arg { ++ struct drm_vmw_surface_arg rep; ++ struct drm_vmw_surface_create_req req; ++}; ++union drm_vmw_surface_reference_arg { ++ struct drm_vmw_surface_create_req rep; ++ struct drm_vmw_surface_arg req; ++}; ++#define DRM_VMW_EXECBUF_VERSION 2 ++#define DRM_VMW_EXECBUF_FLAG_IMPORT_FENCE_FD (1 << 0) ++#define DRM_VMW_EXECBUF_FLAG_EXPORT_FENCE_FD (1 << 1) ++struct drm_vmw_execbuf_arg { ++ __u64 commands; ++ __u32 command_size; ++ __u32 throttle_us; ++ __u64 fence_rep; ++ __u32 version; ++ __u32 flags; ++ __u32 context_handle; ++ __s32 imported_fence_fd; ++}; ++struct drm_vmw_fence_rep { ++ __u32 handle; ++ __u32 mask; ++ __u32 seqno; ++ __u32 passed_seqno; ++ __s32 fd; ++ __s32 error; ++}; ++struct drm_vmw_alloc_bo_req { ++ __u32 size; ++ __u32 pad64; ++}; ++#define drm_vmw_alloc_dmabuf_req drm_vmw_alloc_bo_req ++struct drm_vmw_bo_rep { ++ __u64 map_handle; ++ __u32 handle; ++ __u32 cur_gmr_id; ++ __u32 cur_gmr_offset; ++ __u32 pad64; ++}; ++#define drm_vmw_dmabuf_rep drm_vmw_bo_rep ++union drm_vmw_alloc_bo_arg { ++ struct drm_vmw_alloc_bo_req req; ++ struct drm_vmw_bo_rep rep; ++}; ++#define drm_vmw_alloc_dmabuf_arg drm_vmw_alloc_bo_arg ++struct drm_vmw_rect { ++ __s32 x; ++ __s32 y; ++ __u32 w; ++ __u32 h; ++}; ++struct drm_vmw_control_stream_arg { ++ __u32 stream_id; ++ __u32 enabled; ++ __u32 flags; ++ __u32 color_key; ++ __u32 handle; ++ __u32 offset; ++ __s32 format; ++ __u32 size; ++ __u32 width; ++ __u32 height; ++ __u32 pitch[3]; ++ __u32 pad64; ++ struct drm_vmw_rect src; ++ struct drm_vmw_rect dst; ++}; ++#define DRM_VMW_CURSOR_BYPASS_ALL (1 << 0) ++#define DRM_VMW_CURSOR_BYPASS_FLAGS (1) ++struct drm_vmw_cursor_bypass_arg { ++ __u32 flags; ++ __u32 crtc_id; ++ __s32 xpos; ++ __s32 ypos; ++ __s32 xhot; ++ __s32 yhot; ++}; ++struct drm_vmw_stream_arg { ++ __u32 stream_id; ++ __u32 pad64; ++}; ++struct drm_vmw_get_3d_cap_arg { ++ __u64 buffer; ++ __u32 max_size; ++ __u32 pad64; ++}; ++#define DRM_VMW_FENCE_FLAG_EXEC (1 << 0) ++#define DRM_VMW_FENCE_FLAG_QUERY (1 << 1) ++#define DRM_VMW_WAIT_OPTION_UNREF (1 << 0) ++struct drm_vmw_fence_wait_arg { ++ __u32 handle; ++ __s32 cookie_valid; ++ __u64 kernel_cookie; ++ __u64 timeout_us; ++ __s32 lazy; ++ __s32 flags; ++ __s32 wait_options; ++ __s32 pad64; ++}; ++struct drm_vmw_fence_signaled_arg { ++ __u32 handle; ++ __u32 flags; ++ __s32 signaled; ++ __u32 passed_seqno; ++ __u32 signaled_flags; ++ __u32 pad64; ++}; ++struct drm_vmw_fence_arg { ++ __u32 handle; ++ __u32 pad64; ++}; ++#define DRM_VMW_EVENT_FENCE_SIGNALED 0x80000000 ++struct drm_vmw_event_fence { ++ struct drm_event base; ++ __u64 user_data; ++ __u32 tv_sec; ++ __u32 tv_usec; ++}; ++#define DRM_VMW_FE_FLAG_REQ_TIME (1 << 0) ++struct drm_vmw_fence_event_arg { ++ __u64 fence_rep; ++ __u64 user_data; ++ __u32 handle; ++ __u32 flags; ++}; ++struct drm_vmw_present_arg { ++ __u32 fb_id; ++ __u32 sid; ++ __s32 dest_x; ++ __s32 dest_y; ++ __u64 clips_ptr; ++ __u32 num_clips; ++ __u32 pad64; ++}; ++struct drm_vmw_present_readback_arg { ++ __u32 fb_id; ++ __u32 num_clips; ++ __u64 clips_ptr; ++ __u64 fence_rep; ++}; ++struct drm_vmw_update_layout_arg { ++ __u32 num_outputs; ++ __u32 pad64; ++ __u64 rects; ++}; ++enum drm_vmw_shader_type { ++ drm_vmw_shader_type_vs = 0, ++ drm_vmw_shader_type_ps, ++}; ++struct drm_vmw_shader_create_arg { ++ enum drm_vmw_shader_type shader_type; ++ __u32 size; ++ __u32 buffer_handle; ++ __u32 shader_handle; ++ __u64 offset; ++}; ++struct drm_vmw_shader_arg { ++ __u32 handle; ++ __u32 pad64; ++}; ++enum drm_vmw_surface_flags { ++ drm_vmw_surface_flag_shareable = (1 << 0), ++ drm_vmw_surface_flag_scanout = (1 << 1), ++ drm_vmw_surface_flag_create_buffer = (1 << 2), ++ drm_vmw_surface_flag_coherent = (1 << 3), ++}; ++struct drm_vmw_gb_surface_create_req { ++ __u32 svga3d_flags; ++ __u32 format; ++ __u32 mip_levels; ++ enum drm_vmw_surface_flags drm_surface_flags; ++ __u32 multisample_count; ++ __u32 autogen_filter; ++ __u32 buffer_handle; ++ __u32 array_size; ++ struct drm_vmw_size base_size; ++}; ++struct drm_vmw_gb_surface_create_rep { ++ __u32 handle; ++ __u32 backup_size; ++ __u32 buffer_handle; ++ __u32 buffer_size; ++ __u64 buffer_map_handle; ++}; ++union drm_vmw_gb_surface_create_arg { ++ struct drm_vmw_gb_surface_create_rep rep; ++ struct drm_vmw_gb_surface_create_req req; ++}; ++struct drm_vmw_gb_surface_ref_rep { ++ struct drm_vmw_gb_surface_create_req creq; ++ struct drm_vmw_gb_surface_create_rep crep; ++}; ++union drm_vmw_gb_surface_reference_arg { ++ struct drm_vmw_gb_surface_ref_rep rep; ++ struct drm_vmw_surface_arg req; ++}; ++enum drm_vmw_synccpu_flags { ++ drm_vmw_synccpu_read = (1 << 0), ++ drm_vmw_synccpu_write = (1 << 1), ++ drm_vmw_synccpu_dontblock = (1 << 2), ++ drm_vmw_synccpu_allow_cs = (1 << 3) ++}; ++enum drm_vmw_synccpu_op { ++ drm_vmw_synccpu_grab, ++ drm_vmw_synccpu_release ++}; ++struct drm_vmw_synccpu_arg { ++ enum drm_vmw_synccpu_op op; ++ enum drm_vmw_synccpu_flags flags; ++ __u32 handle; ++ __u32 pad64; ++}; ++enum drm_vmw_extended_context { ++ drm_vmw_context_legacy, ++ drm_vmw_context_dx ++}; ++union drm_vmw_extended_context_arg { ++ enum drm_vmw_extended_context req; ++ struct drm_vmw_context_arg rep; ++}; ++struct drm_vmw_handle_close_arg { ++ __u32 handle; ++ __u32 pad64; ++}; ++#define drm_vmw_unref_dmabuf_arg drm_vmw_handle_close_arg ++enum drm_vmw_surface_version { ++ drm_vmw_gb_surface_v1, ++}; ++struct drm_vmw_gb_surface_create_ext_req { ++ struct drm_vmw_gb_surface_create_req base; ++ enum drm_vmw_surface_version version; ++ __u32 svga3d_flags_upper_32_bits; ++ __u32 multisample_pattern; ++ __u32 quality_level; ++ __u32 buffer_byte_stride; ++ __u32 must_be_zero; ++}; ++union drm_vmw_gb_surface_create_ext_arg { ++ struct drm_vmw_gb_surface_create_rep rep; ++ struct drm_vmw_gb_surface_create_ext_req req; ++}; ++struct drm_vmw_gb_surface_ref_ext_rep { ++ struct drm_vmw_gb_surface_create_ext_req creq; ++ struct drm_vmw_gb_surface_create_rep crep; ++}; ++union drm_vmw_gb_surface_reference_ext_arg { ++ struct drm_vmw_gb_surface_ref_ext_rep rep; ++ struct drm_vmw_surface_arg req; ++}; ++struct drm_vmw_msg_arg { ++ __u64 send; ++ __u64 receive; ++ __s32 send_only; ++ __u32 receive_len; ++}; ++#ifdef __cplusplus ++} ++#endif ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/elf.h b/build/ohos/ohos-sysroot/usr/include/elf.h +new file mode 100644 +index 0000000..549f92c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/elf.h +@@ -0,0 +1,3292 @@ ++#ifndef _ELF_H ++#define _ELF_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++typedef uint16_t Elf32_Half; ++typedef uint16_t Elf64_Half; ++ ++typedef uint32_t Elf32_Word; ++typedef int32_t Elf32_Sword; ++typedef uint32_t Elf64_Word; ++typedef int32_t Elf64_Sword; ++ ++typedef uint64_t Elf32_Xword; ++typedef int64_t Elf32_Sxword; ++typedef uint64_t Elf64_Xword; ++typedef int64_t Elf64_Sxword; ++ ++typedef uint32_t Elf32_Addr; ++typedef uint64_t Elf64_Addr; ++ ++typedef uint32_t Elf32_Off; ++typedef uint64_t Elf64_Off; ++ ++typedef uint16_t Elf32_Section; ++typedef uint16_t Elf64_Section; ++ ++typedef Elf32_Half Elf32_Versym; ++typedef Elf64_Half Elf64_Versym; ++ ++#define EI_NIDENT (16) ++ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; ++ Elf32_Half e_type; ++ Elf32_Half e_machine; ++ Elf32_Word e_version; ++ Elf32_Addr e_entry; ++ Elf32_Off e_phoff; ++ Elf32_Off e_shoff; ++ Elf32_Word e_flags; ++ Elf32_Half e_ehsize; ++ Elf32_Half e_phentsize; ++ Elf32_Half e_phnum; ++ Elf32_Half e_shentsize; ++ Elf32_Half e_shnum; ++ Elf32_Half e_shstrndx; ++} Elf32_Ehdr; ++ ++typedef struct { ++ unsigned char e_ident[EI_NIDENT]; ++ Elf64_Half e_type; ++ Elf64_Half e_machine; ++ Elf64_Word e_version; ++ Elf64_Addr e_entry; ++ Elf64_Off e_phoff; ++ Elf64_Off e_shoff; ++ Elf64_Word e_flags; ++ Elf64_Half e_ehsize; ++ Elf64_Half e_phentsize; ++ Elf64_Half e_phnum; ++ Elf64_Half e_shentsize; ++ Elf64_Half e_shnum; ++ Elf64_Half e_shstrndx; ++} Elf64_Ehdr; ++ ++#define EI_MAG0 0 ++#define ELFMAG0 0x7f ++ ++#define EI_MAG1 1 ++#define ELFMAG1 'E' ++ ++#define EI_MAG2 2 ++#define ELFMAG2 'L' ++ ++#define EI_MAG3 3 ++#define ELFMAG3 'F' ++ ++ ++#define ELFMAG "\177ELF" ++#define SELFMAG 4 ++ ++#define EI_CLASS 4 ++#define ELFCLASSNONE 0 ++#define ELFCLASS32 1 ++#define ELFCLASS64 2 ++#define ELFCLASSNUM 3 ++ ++#define EI_DATA 5 ++#define ELFDATANONE 0 ++#define ELFDATA2LSB 1 ++#define ELFDATA2MSB 2 ++#define ELFDATANUM 3 ++ ++#define EI_VERSION 6 ++ ++ ++#define EI_OSABI 7 ++#define ELFOSABI_NONE 0 ++#define ELFOSABI_SYSV 0 ++#define ELFOSABI_HPUX 1 ++#define ELFOSABI_NETBSD 2 ++#define ELFOSABI_LINUX 3 ++#define ELFOSABI_GNU 3 ++#define ELFOSABI_SOLARIS 6 ++#define ELFOSABI_AIX 7 ++#define ELFOSABI_IRIX 8 ++#define ELFOSABI_FREEBSD 9 ++#define ELFOSABI_TRU64 10 ++#define ELFOSABI_MODESTO 11 ++#define ELFOSABI_OPENBSD 12 ++#define ELFOSABI_ARM 97 ++#define ELFOSABI_STANDALONE 255 ++ ++#define EI_ABIVERSION 8 ++ ++#define EI_PAD 9 ++ ++ ++ ++#define ET_NONE 0 ++#define ET_REL 1 ++#define ET_EXEC 2 ++#define ET_DYN 3 ++#define ET_CORE 4 ++#define ET_NUM 5 ++#define ET_LOOS 0xfe00 ++#define ET_HIOS 0xfeff ++#define ET_LOPROC 0xff00 ++#define ET_HIPROC 0xffff ++ ++ ++ ++#define EM_NONE 0 ++#define EM_M32 1 ++#define EM_SPARC 2 ++#define EM_386 3 ++#define EM_68K 4 ++#define EM_88K 5 ++#define EM_860 7 ++#define EM_MIPS 8 ++#define EM_S370 9 ++#define EM_MIPS_RS3_LE 10 ++ ++#define EM_PARISC 15 ++#define EM_VPP500 17 ++#define EM_SPARC32PLUS 18 ++#define EM_960 19 ++#define EM_PPC 20 ++#define EM_PPC64 21 ++#define EM_S390 22 ++ ++#define EM_V800 36 ++#define EM_FR20 37 ++#define EM_RH32 38 ++#define EM_RCE 39 ++#define EM_ARM 40 ++#define EM_FAKE_ALPHA 41 ++#define EM_SH 42 ++#define EM_SPARCV9 43 ++#define EM_TRICORE 44 ++#define EM_ARC 45 ++#define EM_H8_300 46 ++#define EM_H8_300H 47 ++#define EM_H8S 48 ++#define EM_H8_500 49 ++#define EM_IA_64 50 ++#define EM_MIPS_X 51 ++#define EM_COLDFIRE 52 ++#define EM_68HC12 53 ++#define EM_MMA 54 ++#define EM_PCP 55 ++#define EM_NCPU 56 ++#define EM_NDR1 57 ++#define EM_STARCORE 58 ++#define EM_ME16 59 ++#define EM_ST100 60 ++#define EM_TINYJ 61 ++#define EM_X86_64 62 ++#define EM_PDSP 63 ++ ++#define EM_FX66 66 ++#define EM_ST9PLUS 67 ++#define EM_ST7 68 ++#define EM_68HC16 69 ++#define EM_68HC11 70 ++#define EM_68HC08 71 ++#define EM_68HC05 72 ++#define EM_SVX 73 ++#define EM_ST19 74 ++#define EM_VAX 75 ++#define EM_CRIS 76 ++#define EM_JAVELIN 77 ++#define EM_FIREPATH 78 ++#define EM_ZSP 79 ++#define EM_MMIX 80 ++#define EM_HUANY 81 ++#define EM_PRISM 82 ++#define EM_AVR 83 ++#define EM_FR30 84 ++#define EM_D10V 85 ++#define EM_D30V 86 ++#define EM_V850 87 ++#define EM_M32R 88 ++#define EM_MN10300 89 ++#define EM_MN10200 90 ++#define EM_PJ 91 ++#define EM_OR1K 92 ++#define EM_OPENRISC 92 ++#define EM_ARC_A5 93 ++#define EM_ARC_COMPACT 93 ++#define EM_XTENSA 94 ++#define EM_VIDEOCORE 95 ++#define EM_TMM_GPP 96 ++#define EM_NS32K 97 ++#define EM_TPC 98 ++#define EM_SNP1K 99 ++#define EM_ST200 100 ++#define EM_IP2K 101 ++#define EM_MAX 102 ++#define EM_CR 103 ++#define EM_F2MC16 104 ++#define EM_MSP430 105 ++#define EM_BLACKFIN 106 ++#define EM_SE_C33 107 ++#define EM_SEP 108 ++#define EM_ARCA 109 ++#define EM_UNICORE 110 ++#define EM_EXCESS 111 ++#define EM_DXP 112 ++#define EM_ALTERA_NIOS2 113 ++#define EM_CRX 114 ++#define EM_XGATE 115 ++#define EM_C166 116 ++#define EM_M16C 117 ++#define EM_DSPIC30F 118 ++#define EM_CE 119 ++#define EM_M32C 120 ++#define EM_TSK3000 131 ++#define EM_RS08 132 ++#define EM_SHARC 133 ++#define EM_ECOG2 134 ++#define EM_SCORE7 135 ++#define EM_DSP24 136 ++#define EM_VIDEOCORE3 137 ++#define EM_LATTICEMICO32 138 ++#define EM_SE_C17 139 ++#define EM_TI_C6000 140 ++#define EM_TI_C2000 141 ++#define EM_TI_C5500 142 ++#define EM_TI_ARP32 143 ++#define EM_TI_PRU 144 ++#define EM_MMDSP_PLUS 160 ++#define EM_CYPRESS_M8C 161 ++#define EM_R32C 162 ++#define EM_TRIMEDIA 163 ++#define EM_QDSP6 164 ++#define EM_8051 165 ++#define EM_STXP7X 166 ++#define EM_NDS32 167 ++#define EM_ECOG1X 168 ++#define EM_MAXQ30 169 ++#define EM_XIMO16 170 ++#define EM_MANIK 171 ++#define EM_CRAYNV2 172 ++#define EM_RX 173 ++#define EM_METAG 174 ++#define EM_MCST_ELBRUS 175 ++#define EM_ECOG16 176 ++#define EM_CR16 177 ++#define EM_ETPU 178 ++#define EM_SLE9X 179 ++#define EM_L10M 180 ++#define EM_K10M 181 ++#define EM_AARCH64 183 ++#define EM_AVR32 185 ++#define EM_STM8 186 ++#define EM_TILE64 187 ++#define EM_TILEPRO 188 ++#define EM_MICROBLAZE 189 ++#define EM_CUDA 190 ++#define EM_TILEGX 191 ++#define EM_CLOUDSHIELD 192 ++#define EM_COREA_1ST 193 ++#define EM_COREA_2ND 194 ++#define EM_ARC_COMPACT2 195 ++#define EM_OPEN8 196 ++#define EM_RL78 197 ++#define EM_VIDEOCORE5 198 ++#define EM_78KOR 199 ++#define EM_56800EX 200 ++#define EM_BA1 201 ++#define EM_BA2 202 ++#define EM_XCORE 203 ++#define EM_MCHP_PIC 204 ++#define EM_KM32 210 ++#define EM_KMX32 211 ++#define EM_EMX16 212 ++#define EM_EMX8 213 ++#define EM_KVARC 214 ++#define EM_CDP 215 ++#define EM_COGE 216 ++#define EM_COOL 217 ++#define EM_NORC 218 ++#define EM_CSR_KALIMBA 219 ++#define EM_Z80 220 ++#define EM_VISIUM 221 ++#define EM_FT32 222 ++#define EM_MOXIE 223 ++#define EM_AMDGPU 224 ++#define EM_RISCV 243 ++#define EM_BPF 247 ++#define EM_CSKY 252 ++#define EM_NUM 253 ++ ++#define EM_ALPHA 0x9026 ++ ++#define EV_NONE 0 ++#define EV_CURRENT 1 ++#define EV_NUM 2 ++ ++typedef struct { ++ Elf32_Word sh_name; ++ Elf32_Word sh_type; ++ Elf32_Word sh_flags; ++ Elf32_Addr sh_addr; ++ Elf32_Off sh_offset; ++ Elf32_Word sh_size; ++ Elf32_Word sh_link; ++ Elf32_Word sh_info; ++ Elf32_Word sh_addralign; ++ Elf32_Word sh_entsize; ++} Elf32_Shdr; ++ ++typedef struct { ++ Elf64_Word sh_name; ++ Elf64_Word sh_type; ++ Elf64_Xword sh_flags; ++ Elf64_Addr sh_addr; ++ Elf64_Off sh_offset; ++ Elf64_Xword sh_size; ++ Elf64_Word sh_link; ++ Elf64_Word sh_info; ++ Elf64_Xword sh_addralign; ++ Elf64_Xword sh_entsize; ++} Elf64_Shdr; ++ ++ ++ ++#define SHN_UNDEF 0 ++#define SHN_LORESERVE 0xff00 ++#define SHN_LOPROC 0xff00 ++#define SHN_BEFORE 0xff00 ++ ++#define SHN_AFTER 0xff01 ++ ++#define SHN_HIPROC 0xff1f ++#define SHN_LOOS 0xff20 ++#define SHN_HIOS 0xff3f ++#define SHN_ABS 0xfff1 ++#define SHN_COMMON 0xfff2 ++#define SHN_XINDEX 0xffff ++#define SHN_HIRESERVE 0xffff ++ ++ ++ ++#define SHT_NULL 0 ++#define SHT_PROGBITS 1 ++#define SHT_SYMTAB 2 ++#define SHT_STRTAB 3 ++#define SHT_RELA 4 ++#define SHT_HASH 5 ++#define SHT_DYNAMIC 6 ++#define SHT_NOTE 7 ++#define SHT_NOBITS 8 ++#define SHT_REL 9 ++#define SHT_SHLIB 10 ++#define SHT_DYNSYM 11 ++#define SHT_INIT_ARRAY 14 ++#define SHT_FINI_ARRAY 15 ++#define SHT_PREINIT_ARRAY 16 ++#define SHT_GROUP 17 ++#define SHT_SYMTAB_SHNDX 18 ++#define SHT_NUM 19 ++#define SHT_LOOS 0x60000000 ++#define SHT_GNU_ATTRIBUTES 0x6ffffff5 ++#define SHT_GNU_HASH 0x6ffffff6 ++#define SHT_GNU_LIBLIST 0x6ffffff7 ++#define SHT_CHECKSUM 0x6ffffff8 ++#define SHT_LOSUNW 0x6ffffffa ++#define SHT_SUNW_move 0x6ffffffa ++#define SHT_SUNW_COMDAT 0x6ffffffb ++#define SHT_SUNW_syminfo 0x6ffffffc ++#define SHT_GNU_verdef 0x6ffffffd ++#define SHT_GNU_verneed 0x6ffffffe ++#define SHT_GNU_versym 0x6fffffff ++#define SHT_HISUNW 0x6fffffff ++#define SHT_HIOS 0x6fffffff ++#define SHT_LOPROC 0x70000000 ++#define SHT_HIPROC 0x7fffffff ++#define SHT_LOUSER 0x80000000 ++#define SHT_HIUSER 0x8fffffff ++ ++#define SHF_WRITE (1 << 0) ++#define SHF_ALLOC (1 << 1) ++#define SHF_EXECINSTR (1 << 2) ++#define SHF_MERGE (1 << 4) ++#define SHF_STRINGS (1 << 5) ++#define SHF_INFO_LINK (1 << 6) ++#define SHF_LINK_ORDER (1 << 7) ++#define SHF_OS_NONCONFORMING (1 << 8) ++ ++#define SHF_GROUP (1 << 9) ++#define SHF_TLS (1 << 10) ++#define SHF_COMPRESSED (1 << 11) ++#define SHF_MASKOS 0x0ff00000 ++#define SHF_MASKPROC 0xf0000000 ++#define SHF_ORDERED (1 << 30) ++#define SHF_EXCLUDE (1U << 31) ++ ++typedef struct { ++ Elf32_Word ch_type; ++ Elf32_Word ch_size; ++ Elf32_Word ch_addralign; ++} Elf32_Chdr; ++ ++typedef struct { ++ Elf64_Word ch_type; ++ Elf64_Word ch_reserved; ++ Elf64_Xword ch_size; ++ Elf64_Xword ch_addralign; ++} Elf64_Chdr; ++ ++#define ELFCOMPRESS_ZLIB 1 ++#define ELFCOMPRESS_LOOS 0x60000000 ++#define ELFCOMPRESS_HIOS 0x6fffffff ++#define ELFCOMPRESS_LOPROC 0x70000000 ++#define ELFCOMPRESS_HIPROC 0x7fffffff ++ ++ ++#define GRP_COMDAT 0x1 ++ ++typedef struct { ++ Elf32_Word st_name; ++ Elf32_Addr st_value; ++ Elf32_Word st_size; ++ unsigned char st_info; ++ unsigned char st_other; ++ Elf32_Section st_shndx; ++} Elf32_Sym; ++ ++typedef struct { ++ Elf64_Word st_name; ++ unsigned char st_info; ++ unsigned char st_other; ++ Elf64_Section st_shndx; ++ Elf64_Addr st_value; ++ Elf64_Xword st_size; ++} Elf64_Sym; ++ ++typedef struct { ++ Elf32_Half si_boundto; ++ Elf32_Half si_flags; ++} Elf32_Syminfo; ++ ++typedef struct { ++ Elf64_Half si_boundto; ++ Elf64_Half si_flags; ++} Elf64_Syminfo; ++ ++#define SYMINFO_BT_SELF 0xffff ++#define SYMINFO_BT_PARENT 0xfffe ++#define SYMINFO_BT_LOWRESERVE 0xff00 ++ ++#define SYMINFO_FLG_DIRECT 0x0001 ++#define SYMINFO_FLG_PASSTHRU 0x0002 ++#define SYMINFO_FLG_COPY 0x0004 ++#define SYMINFO_FLG_LAZYLOAD 0x0008 ++ ++#define SYMINFO_NONE 0 ++#define SYMINFO_CURRENT 1 ++#define SYMINFO_NUM 2 ++ ++#define ELF32_ST_BIND(val) (((unsigned char) (val)) >> 4) ++#define ELF32_ST_TYPE(val) ((val) & 0xf) ++#define ELF32_ST_INFO(bind, type) (((bind) << 4) + ((type) & 0xf)) ++ ++#define ELF64_ST_BIND(val) ELF32_ST_BIND (val) ++#define ELF64_ST_TYPE(val) ELF32_ST_TYPE (val) ++#define ELF64_ST_INFO(bind, type) ELF32_ST_INFO ((bind), (type)) ++ ++#define STB_LOCAL 0 ++#define STB_GLOBAL 1 ++#define STB_WEAK 2 ++#define STB_NUM 3 ++#define STB_LOOS 10 ++#define STB_GNU_UNIQUE 10 ++#define STB_HIOS 12 ++#define STB_LOPROC 13 ++#define STB_HIPROC 15 ++ ++#define STT_NOTYPE 0 ++#define STT_OBJECT 1 ++#define STT_FUNC 2 ++#define STT_SECTION 3 ++#define STT_FILE 4 ++#define STT_COMMON 5 ++#define STT_TLS 6 ++#define STT_NUM 7 ++#define STT_LOOS 10 ++#define STT_GNU_IFUNC 10 ++#define STT_HIOS 12 ++#define STT_LOPROC 13 ++#define STT_HIPROC 15 ++ ++#define STN_UNDEF 0 ++ ++#define ELF32_ST_VISIBILITY(o) ((o) & 0x03) ++#define ELF64_ST_VISIBILITY(o) ELF32_ST_VISIBILITY (o) ++ ++#define STV_DEFAULT 0 ++#define STV_INTERNAL 1 ++#define STV_HIDDEN 2 ++#define STV_PROTECTED 3 ++ ++ ++ ++ ++typedef struct { ++ Elf32_Addr r_offset; ++ Elf32_Word r_info; ++} Elf32_Rel; ++ ++typedef struct { ++ Elf64_Addr r_offset; ++ Elf64_Xword r_info; ++} Elf64_Rel; ++ ++ ++ ++typedef struct { ++ Elf32_Addr r_offset; ++ Elf32_Word r_info; ++ Elf32_Sword r_addend; ++} Elf32_Rela; ++ ++typedef struct { ++ Elf64_Addr r_offset; ++ Elf64_Xword r_info; ++ Elf64_Sxword r_addend; ++} Elf64_Rela; ++ ++ ++ ++#define ELF32_R_SYM(val) ((val) >> 8) ++#define ELF32_R_TYPE(val) ((val) & 0xff) ++#define ELF32_R_INFO(sym, type) (((sym) << 8) + ((type) & 0xff)) ++ ++#define ELF64_R_SYM(i) ((i) >> 32) ++#define ELF64_R_TYPE(i) ((i) & 0xffffffff) ++#define ELF64_R_INFO(sym,type) ((((Elf64_Xword) (sym)) << 32) + (type)) ++ ++ ++ ++typedef struct { ++ Elf32_Word p_type; ++ Elf32_Off p_offset; ++ Elf32_Addr p_vaddr; ++ Elf32_Addr p_paddr; ++ Elf32_Word p_filesz; ++ Elf32_Word p_memsz; ++ Elf32_Word p_flags; ++ Elf32_Word p_align; ++} Elf32_Phdr; ++ ++typedef struct { ++ Elf64_Word p_type; ++ Elf64_Word p_flags; ++ Elf64_Off p_offset; ++ Elf64_Addr p_vaddr; ++ Elf64_Addr p_paddr; ++ Elf64_Xword p_filesz; ++ Elf64_Xword p_memsz; ++ Elf64_Xword p_align; ++} Elf64_Phdr; ++ ++ ++ ++#define PT_NULL 0 ++#define PT_LOAD 1 ++#define PT_DYNAMIC 2 ++#define PT_INTERP 3 ++#define PT_NOTE 4 ++#define PT_SHLIB 5 ++#define PT_PHDR 6 ++#define PT_TLS 7 ++#define PT_NUM 8 ++#define PT_LOOS 0x60000000 ++#define PT_GNU_EH_FRAME 0x6474e550 ++#define PT_GNU_STACK 0x6474e551 ++#define PT_GNU_RELRO 0x6474e552 ++#define PT_LOSUNW 0x6ffffffa ++#define PT_SUNWBSS 0x6ffffffa ++#define PT_SUNWSTACK 0x6ffffffb ++#define PT_HISUNW 0x6fffffff ++#define PT_HIOS 0x6fffffff ++#define PT_LOPROC 0x70000000 ++#define PT_HIPROC 0x7fffffff ++ ++ ++#define PN_XNUM 0xffff ++ ++ ++#define PF_X (1 << 0) ++#define PF_W (1 << 1) ++#define PF_R (1 << 2) ++#define PF_MASKOS 0x0ff00000 ++#define PF_MASKPROC 0xf0000000 ++ ++ ++ ++#define NT_PRSTATUS 1 ++#define NT_PRFPREG 2 ++#define NT_FPREGSET 2 ++#define NT_PRPSINFO 3 ++#define NT_PRXREG 4 ++#define NT_TASKSTRUCT 4 ++#define NT_PLATFORM 5 ++#define NT_AUXV 6 ++#define NT_GWINDOWS 7 ++#define NT_ASRS 8 ++#define NT_PSTATUS 10 ++#define NT_PSINFO 13 ++#define NT_PRCRED 14 ++#define NT_UTSNAME 15 ++#define NT_LWPSTATUS 16 ++#define NT_LWPSINFO 17 ++#define NT_PRFPXREG 20 ++#define NT_SIGINFO 0x53494749 ++#define NT_FILE 0x46494c45 ++#define NT_PRXFPREG 0x46e62b7f ++#define NT_PPC_VMX 0x100 ++#define NT_PPC_SPE 0x101 ++#define NT_PPC_VSX 0x102 ++#define NT_PPC_TAR 0x103 ++#define NT_PPC_PPR 0x104 ++#define NT_PPC_DSCR 0x105 ++#define NT_PPC_EBB 0x106 ++#define NT_PPC_PMU 0x107 ++#define NT_PPC_TM_CGPR 0x108 ++#define NT_PPC_TM_CFPR 0x109 ++#define NT_PPC_TM_CVMX 0x10a ++#define NT_PPC_TM_CVSX 0x10b ++#define NT_PPC_TM_SPR 0x10c ++#define NT_PPC_TM_CTAR 0x10d ++#define NT_PPC_TM_CPPR 0x10e ++#define NT_PPC_TM_CDSCR 0x10f ++#define NT_386_TLS 0x200 ++#define NT_386_IOPERM 0x201 ++#define NT_X86_XSTATE 0x202 ++#define NT_S390_HIGH_GPRS 0x300 ++#define NT_S390_TIMER 0x301 ++#define NT_S390_TODCMP 0x302 ++#define NT_S390_TODPREG 0x303 ++#define NT_S390_CTRS 0x304 ++#define NT_S390_PREFIX 0x305 ++#define NT_S390_LAST_BREAK 0x306 ++#define NT_S390_SYSTEM_CALL 0x307 ++#define NT_S390_TDB 0x308 ++#define NT_S390_VXRS_LOW 0x309 ++#define NT_S390_VXRS_HIGH 0x30a ++#define NT_S390_GS_CB 0x30b ++#define NT_S390_GS_BC 0x30c ++#define NT_S390_RI_CB 0x30d ++#define NT_ARM_VFP 0x400 ++#define NT_ARM_TLS 0x401 ++#define NT_ARM_HW_BREAK 0x402 ++#define NT_ARM_HW_WATCH 0x403 ++#define NT_ARM_SYSTEM_CALL 0x404 ++#define NT_ARM_SVE 0x405 ++#define NT_ARM_PAC_MASK 0x406 ++#define NT_ARM_PACA_KEYS 0x407 ++#define NT_ARM_PACG_KEYS 0x408 ++#define NT_METAG_CBUF 0x500 ++#define NT_METAG_RPIPE 0x501 ++#define NT_METAG_TLS 0x502 ++#define NT_ARC_V2 0x600 ++#define NT_VMCOREDD 0x700 ++#define NT_MIPS_DSP 0x800 ++#define NT_MIPS_FP_MODE 0x801 ++#define NT_MIPS_MSA 0x802 ++#define NT_VERSION 1 ++ ++ ++ ++ ++typedef struct { ++ Elf32_Sword d_tag; ++ union { ++ Elf32_Word d_val; ++ Elf32_Addr d_ptr; ++ } d_un; ++} Elf32_Dyn; ++ ++typedef struct { ++ Elf64_Sxword d_tag; ++ union { ++ Elf64_Xword d_val; ++ Elf64_Addr d_ptr; ++ } d_un; ++} Elf64_Dyn; ++ ++ ++ ++#define DT_NULL 0 ++#define DT_NEEDED 1 ++#define DT_PLTRELSZ 2 ++#define DT_PLTGOT 3 ++#define DT_HASH 4 ++#define DT_STRTAB 5 ++#define DT_SYMTAB 6 ++#define DT_RELA 7 ++#define DT_RELASZ 8 ++#define DT_RELAENT 9 ++#define DT_STRSZ 10 ++#define DT_SYMENT 11 ++#define DT_INIT 12 ++#define DT_FINI 13 ++#define DT_SONAME 14 ++#define DT_RPATH 15 ++#define DT_SYMBOLIC 16 ++#define DT_REL 17 ++#define DT_RELSZ 18 ++#define DT_RELENT 19 ++#define DT_PLTREL 20 ++#define DT_DEBUG 21 ++#define DT_TEXTREL 22 ++#define DT_JMPREL 23 ++#define DT_BIND_NOW 24 ++#define DT_INIT_ARRAY 25 ++#define DT_FINI_ARRAY 26 ++#define DT_INIT_ARRAYSZ 27 ++#define DT_FINI_ARRAYSZ 28 ++#define DT_RUNPATH 29 ++#define DT_FLAGS 30 ++#define DT_ENCODING 32 ++#define DT_PREINIT_ARRAY 32 ++#define DT_PREINIT_ARRAYSZ 33 ++#define DT_SYMTAB_SHNDX 34 ++#define DT_NUM 35 ++#define DT_LOOS 0x6000000d ++#define DT_HIOS 0x6ffff000 ++#define DT_LOPROC 0x70000000 ++#define DT_HIPROC 0x7fffffff ++#define DT_PROCNUM DT_MIPS_NUM ++ ++#define DT_VALRNGLO 0x6ffffd00 ++#define DT_GNU_PRELINKED 0x6ffffdf5 ++#define DT_GNU_CONFLICTSZ 0x6ffffdf6 ++#define DT_GNU_LIBLISTSZ 0x6ffffdf7 ++#define DT_CHECKSUM 0x6ffffdf8 ++#define DT_PLTPADSZ 0x6ffffdf9 ++#define DT_MOVEENT 0x6ffffdfa ++#define DT_MOVESZ 0x6ffffdfb ++#define DT_FEATURE_1 0x6ffffdfc ++#define DT_POSFLAG_1 0x6ffffdfd ++ ++#define DT_SYMINSZ 0x6ffffdfe ++#define DT_SYMINENT 0x6ffffdff ++#define DT_VALRNGHI 0x6ffffdff ++#define DT_VALTAGIDX(tag) (DT_VALRNGHI - (tag)) ++#define DT_VALNUM 12 ++ ++#define DT_ADDRRNGLO 0x6ffffe00 ++#define DT_GNU_HASH 0x6ffffef5 ++#define DT_TLSDESC_PLT 0x6ffffef6 ++#define DT_TLSDESC_GOT 0x6ffffef7 ++#define DT_GNU_CONFLICT 0x6ffffef8 ++#define DT_GNU_LIBLIST 0x6ffffef9 ++#define DT_CONFIG 0x6ffffefa ++#define DT_DEPAUDIT 0x6ffffefb ++#define DT_AUDIT 0x6ffffefc ++#define DT_PLTPAD 0x6ffffefd ++#define DT_MOVETAB 0x6ffffefe ++#define DT_SYMINFO 0x6ffffeff ++#define DT_ADDRRNGHI 0x6ffffeff ++#define DT_ADDRTAGIDX(tag) (DT_ADDRRNGHI - (tag)) ++#define DT_ADDRNUM 11 ++ ++ ++ ++#define DT_VERSYM 0x6ffffff0 ++ ++#define DT_RELACOUNT 0x6ffffff9 ++#define DT_RELCOUNT 0x6ffffffa ++ ++ ++#define DT_FLAGS_1 0x6ffffffb ++#define DT_VERDEF 0x6ffffffc ++ ++#define DT_VERDEFNUM 0x6ffffffd ++#define DT_VERNEED 0x6ffffffe ++ ++#define DT_VERNEEDNUM 0x6fffffff ++#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) ++#define DT_VERSIONTAGNUM 16 ++ ++ ++ ++#define DT_AUXILIARY 0x7ffffffd ++#define DT_FILTER 0x7fffffff ++#define DT_EXTRATAGIDX(tag) ((Elf32_Word)-((Elf32_Sword) (tag) <<1>>1)-1) ++#define DT_EXTRANUM 3 ++ ++ ++#define DF_ORIGIN 0x00000001 ++#define DF_SYMBOLIC 0x00000002 ++#define DF_TEXTREL 0x00000004 ++#define DF_BIND_NOW 0x00000008 ++#define DF_STATIC_TLS 0x00000010 ++ ++ ++ ++#define DF_1_NOW 0x00000001 ++#define DF_1_GLOBAL 0x00000002 ++#define DF_1_GROUP 0x00000004 ++#define DF_1_NODELETE 0x00000008 ++#define DF_1_LOADFLTR 0x00000010 ++#define DF_1_INITFIRST 0x00000020 ++#define DF_1_NOOPEN 0x00000040 ++#define DF_1_ORIGIN 0x00000080 ++#define DF_1_DIRECT 0x00000100 ++#define DF_1_TRANS 0x00000200 ++#define DF_1_INTERPOSE 0x00000400 ++#define DF_1_NODEFLIB 0x00000800 ++#define DF_1_NODUMP 0x00001000 ++#define DF_1_CONFALT 0x00002000 ++#define DF_1_ENDFILTEE 0x00004000 ++#define DF_1_DISPRELDNE 0x00008000 ++#define DF_1_DISPRELPND 0x00010000 ++#define DF_1_NODIRECT 0x00020000 ++#define DF_1_IGNMULDEF 0x00040000 ++#define DF_1_NOKSYMS 0x00080000 ++#define DF_1_NOHDR 0x00100000 ++#define DF_1_EDITED 0x00200000 ++#define DF_1_NORELOC 0x00400000 ++#define DF_1_SYMINTPOSE 0x00800000 ++#define DF_1_GLOBAUDIT 0x01000000 ++#define DF_1_SINGLETON 0x02000000 ++#define DF_1_STUB 0x04000000 ++#define DF_1_PIE 0x08000000 ++ ++#define DTF_1_PARINIT 0x00000001 ++#define DTF_1_CONFEXP 0x00000002 ++ ++ ++#define DF_P1_LAZYLOAD 0x00000001 ++#define DF_P1_GROUPPERM 0x00000002 ++ ++ ++ ++ ++typedef struct { ++ Elf32_Half vd_version; ++ Elf32_Half vd_flags; ++ Elf32_Half vd_ndx; ++ Elf32_Half vd_cnt; ++ Elf32_Word vd_hash; ++ Elf32_Word vd_aux; ++ Elf32_Word vd_next; ++} Elf32_Verdef; ++ ++typedef struct { ++ Elf64_Half vd_version; ++ Elf64_Half vd_flags; ++ Elf64_Half vd_ndx; ++ Elf64_Half vd_cnt; ++ Elf64_Word vd_hash; ++ Elf64_Word vd_aux; ++ Elf64_Word vd_next; ++} Elf64_Verdef; ++ ++ ++ ++#define VER_DEF_NONE 0 ++#define VER_DEF_CURRENT 1 ++#define VER_DEF_NUM 2 ++ ++ ++#define VER_FLG_BASE 0x1 ++#define VER_FLG_WEAK 0x2 ++ ++ ++#define VER_NDX_LOCAL 0 ++#define VER_NDX_GLOBAL 1 ++#define VER_NDX_LORESERVE 0xff00 ++#define VER_NDX_ELIMINATE 0xff01 ++ ++ ++ ++typedef struct { ++ Elf32_Word vda_name; ++ Elf32_Word vda_next; ++} Elf32_Verdaux; ++ ++typedef struct { ++ Elf64_Word vda_name; ++ Elf64_Word vda_next; ++} Elf64_Verdaux; ++ ++ ++ ++ ++typedef struct { ++ Elf32_Half vn_version; ++ Elf32_Half vn_cnt; ++ Elf32_Word vn_file; ++ Elf32_Word vn_aux; ++ Elf32_Word vn_next; ++} Elf32_Verneed; ++ ++typedef struct { ++ Elf64_Half vn_version; ++ Elf64_Half vn_cnt; ++ Elf64_Word vn_file; ++ Elf64_Word vn_aux; ++ Elf64_Word vn_next; ++} Elf64_Verneed; ++ ++ ++ ++#define VER_NEED_NONE 0 ++#define VER_NEED_CURRENT 1 ++#define VER_NEED_NUM 2 ++ ++ ++ ++typedef struct { ++ Elf32_Word vna_hash; ++ Elf32_Half vna_flags; ++ Elf32_Half vna_other; ++ Elf32_Word vna_name; ++ Elf32_Word vna_next; ++} Elf32_Vernaux; ++ ++typedef struct { ++ Elf64_Word vna_hash; ++ Elf64_Half vna_flags; ++ Elf64_Half vna_other; ++ Elf64_Word vna_name; ++ Elf64_Word vna_next; ++} Elf64_Vernaux; ++ ++ ++ ++#define VER_FLG_WEAK 0x2 ++ ++ ++ ++typedef struct { ++ uint32_t a_type; ++ union { ++ uint32_t a_val; ++ } a_un; ++} Elf32_auxv_t; ++ ++typedef struct { ++ uint64_t a_type; ++ union { ++ uint64_t a_val; ++ } a_un; ++} Elf64_auxv_t; ++ ++ ++ ++#define AT_NULL 0 ++#define AT_IGNORE 1 ++#define AT_EXECFD 2 ++#define AT_PHDR 3 ++#define AT_PHENT 4 ++#define AT_PHNUM 5 ++#define AT_PAGESZ 6 ++#define AT_BASE 7 ++#define AT_FLAGS 8 ++#define AT_ENTRY 9 ++#define AT_NOTELF 10 ++#define AT_UID 11 ++#define AT_EUID 12 ++#define AT_GID 13 ++#define AT_EGID 14 ++#define AT_CLKTCK 17 ++ ++ ++#define AT_PLATFORM 15 ++#define AT_HWCAP 16 ++ ++ ++ ++ ++#define AT_FPUCW 18 ++ ++ ++#define AT_DCACHEBSIZE 19 ++#define AT_ICACHEBSIZE 20 ++#define AT_UCACHEBSIZE 21 ++ ++ ++ ++#define AT_IGNOREPPC 22 ++ ++#define AT_SECURE 23 ++ ++#define AT_BASE_PLATFORM 24 ++ ++#define AT_RANDOM 25 ++ ++#define AT_HWCAP2 26 ++ ++#define AT_EXECFN 31 ++ ++ ++ ++#define AT_SYSINFO 32 ++#define AT_SYSINFO_EHDR 33 ++ ++ ++ ++#define AT_L1I_CACHESHAPE 34 ++#define AT_L1D_CACHESHAPE 35 ++#define AT_L2_CACHESHAPE 36 ++#define AT_L3_CACHESHAPE 37 ++ ++#define AT_L1I_CACHESIZE 40 ++#define AT_L1I_CACHEGEOMETRY 41 ++#define AT_L1D_CACHESIZE 42 ++#define AT_L1D_CACHEGEOMETRY 43 ++#define AT_L2_CACHESIZE 44 ++#define AT_L2_CACHEGEOMETRY 45 ++#define AT_L3_CACHESIZE 46 ++#define AT_L3_CACHEGEOMETRY 47 ++ ++#define AT_MINSIGSTKSZ 51 ++ ++ ++typedef struct { ++ Elf32_Word n_namesz; ++ Elf32_Word n_descsz; ++ Elf32_Word n_type; ++} Elf32_Nhdr; ++ ++typedef struct { ++ Elf64_Word n_namesz; ++ Elf64_Word n_descsz; ++ Elf64_Word n_type; ++} Elf64_Nhdr; ++ ++ ++ ++ ++#define ELF_NOTE_SOLARIS "SUNW Solaris" ++ ++ ++#define ELF_NOTE_GNU "GNU" ++ ++ ++ ++ ++ ++#define ELF_NOTE_PAGESIZE_HINT 1 ++ ++ ++#define NT_GNU_ABI_TAG 1 ++#define ELF_NOTE_ABI NT_GNU_ABI_TAG ++ ++ ++ ++#define ELF_NOTE_OS_LINUX 0 ++#define ELF_NOTE_OS_GNU 1 ++#define ELF_NOTE_OS_SOLARIS2 2 ++#define ELF_NOTE_OS_FREEBSD 3 ++ ++#define NT_GNU_BUILD_ID 3 ++#define NT_GNU_GOLD_VERSION 4 ++ ++ ++ ++typedef struct { ++ Elf32_Xword m_value; ++ Elf32_Word m_info; ++ Elf32_Word m_poffset; ++ Elf32_Half m_repeat; ++ Elf32_Half m_stride; ++} Elf32_Move; ++ ++typedef struct { ++ Elf64_Xword m_value; ++ Elf64_Xword m_info; ++ Elf64_Xword m_poffset; ++ Elf64_Half m_repeat; ++ Elf64_Half m_stride; ++} Elf64_Move; ++ ++ ++#define ELF32_M_SYM(info) ((info) >> 8) ++#define ELF32_M_SIZE(info) ((unsigned char) (info)) ++#define ELF32_M_INFO(sym, size) (((sym) << 8) + (unsigned char) (size)) ++ ++#define ELF64_M_SYM(info) ELF32_M_SYM (info) ++#define ELF64_M_SIZE(info) ELF32_M_SIZE (info) ++#define ELF64_M_INFO(sym, size) ELF32_M_INFO (sym, size) ++ ++#define EF_CPU32 0x00810000 ++ ++#define R_68K_NONE 0 ++#define R_68K_32 1 ++#define R_68K_16 2 ++#define R_68K_8 3 ++#define R_68K_PC32 4 ++#define R_68K_PC16 5 ++#define R_68K_PC8 6 ++#define R_68K_GOT32 7 ++#define R_68K_GOT16 8 ++#define R_68K_GOT8 9 ++#define R_68K_GOT32O 10 ++#define R_68K_GOT16O 11 ++#define R_68K_GOT8O 12 ++#define R_68K_PLT32 13 ++#define R_68K_PLT16 14 ++#define R_68K_PLT8 15 ++#define R_68K_PLT32O 16 ++#define R_68K_PLT16O 17 ++#define R_68K_PLT8O 18 ++#define R_68K_COPY 19 ++#define R_68K_GLOB_DAT 20 ++#define R_68K_JMP_SLOT 21 ++#define R_68K_RELATIVE 22 ++#define R_68K_TLS_GD32 25 ++#define R_68K_TLS_GD16 26 ++#define R_68K_TLS_GD8 27 ++#define R_68K_TLS_LDM32 28 ++#define R_68K_TLS_LDM16 29 ++#define R_68K_TLS_LDM8 30 ++#define R_68K_TLS_LDO32 31 ++#define R_68K_TLS_LDO16 32 ++#define R_68K_TLS_LDO8 33 ++#define R_68K_TLS_IE32 34 ++#define R_68K_TLS_IE16 35 ++#define R_68K_TLS_IE8 36 ++#define R_68K_TLS_LE32 37 ++#define R_68K_TLS_LE16 38 ++#define R_68K_TLS_LE8 39 ++#define R_68K_TLS_DTPMOD32 40 ++#define R_68K_TLS_DTPREL32 41 ++#define R_68K_TLS_TPREL32 42 ++#define R_68K_NUM 43 ++ ++#define R_386_NONE 0 ++#define R_386_32 1 ++#define R_386_PC32 2 ++#define R_386_GOT32 3 ++#define R_386_PLT32 4 ++#define R_386_COPY 5 ++#define R_386_GLOB_DAT 6 ++#define R_386_JMP_SLOT 7 ++#define R_386_RELATIVE 8 ++#define R_386_GOTOFF 9 ++#define R_386_GOTPC 10 ++#define R_386_32PLT 11 ++#define R_386_TLS_TPOFF 14 ++#define R_386_TLS_IE 15 ++#define R_386_TLS_GOTIE 16 ++#define R_386_TLS_LE 17 ++#define R_386_TLS_GD 18 ++#define R_386_TLS_LDM 19 ++#define R_386_16 20 ++#define R_386_PC16 21 ++#define R_386_8 22 ++#define R_386_PC8 23 ++#define R_386_TLS_GD_32 24 ++#define R_386_TLS_GD_PUSH 25 ++#define R_386_TLS_GD_CALL 26 ++#define R_386_TLS_GD_POP 27 ++#define R_386_TLS_LDM_32 28 ++#define R_386_TLS_LDM_PUSH 29 ++#define R_386_TLS_LDM_CALL 30 ++#define R_386_TLS_LDM_POP 31 ++#define R_386_TLS_LDO_32 32 ++#define R_386_TLS_IE_32 33 ++#define R_386_TLS_LE_32 34 ++#define R_386_TLS_DTPMOD32 35 ++#define R_386_TLS_DTPOFF32 36 ++#define R_386_TLS_TPOFF32 37 ++#define R_386_SIZE32 38 ++#define R_386_TLS_GOTDESC 39 ++#define R_386_TLS_DESC_CALL 40 ++#define R_386_TLS_DESC 41 ++#define R_386_IRELATIVE 42 ++#define R_386_GOT32X 43 ++#define R_386_NUM 44 ++ ++ ++ ++ ++ ++#define STT_SPARC_REGISTER 13 ++ ++ ++ ++#define EF_SPARCV9_MM 3 ++#define EF_SPARCV9_TSO 0 ++#define EF_SPARCV9_PSO 1 ++#define EF_SPARCV9_RMO 2 ++#define EF_SPARC_LEDATA 0x800000 ++#define EF_SPARC_EXT_MASK 0xFFFF00 ++#define EF_SPARC_32PLUS 0x000100 ++#define EF_SPARC_SUN_US1 0x000200 ++#define EF_SPARC_HAL_R1 0x000400 ++#define EF_SPARC_SUN_US3 0x000800 ++ ++ ++ ++#define R_SPARC_NONE 0 ++#define R_SPARC_8 1 ++#define R_SPARC_16 2 ++#define R_SPARC_32 3 ++#define R_SPARC_DISP8 4 ++#define R_SPARC_DISP16 5 ++#define R_SPARC_DISP32 6 ++#define R_SPARC_WDISP30 7 ++#define R_SPARC_WDISP22 8 ++#define R_SPARC_HI22 9 ++#define R_SPARC_22 10 ++#define R_SPARC_13 11 ++#define R_SPARC_LO10 12 ++#define R_SPARC_GOT10 13 ++#define R_SPARC_GOT13 14 ++#define R_SPARC_GOT22 15 ++#define R_SPARC_PC10 16 ++#define R_SPARC_PC22 17 ++#define R_SPARC_WPLT30 18 ++#define R_SPARC_COPY 19 ++#define R_SPARC_GLOB_DAT 20 ++#define R_SPARC_JMP_SLOT 21 ++#define R_SPARC_RELATIVE 22 ++#define R_SPARC_UA32 23 ++ ++ ++ ++#define R_SPARC_PLT32 24 ++#define R_SPARC_HIPLT22 25 ++#define R_SPARC_LOPLT10 26 ++#define R_SPARC_PCPLT32 27 ++#define R_SPARC_PCPLT22 28 ++#define R_SPARC_PCPLT10 29 ++#define R_SPARC_10 30 ++#define R_SPARC_11 31 ++#define R_SPARC_64 32 ++#define R_SPARC_OLO10 33 ++#define R_SPARC_HH22 34 ++#define R_SPARC_HM10 35 ++#define R_SPARC_LM22 36 ++#define R_SPARC_PC_HH22 37 ++#define R_SPARC_PC_HM10 38 ++#define R_SPARC_PC_LM22 39 ++#define R_SPARC_WDISP16 40 ++#define R_SPARC_WDISP19 41 ++#define R_SPARC_GLOB_JMP 42 ++#define R_SPARC_7 43 ++#define R_SPARC_5 44 ++#define R_SPARC_6 45 ++#define R_SPARC_DISP64 46 ++#define R_SPARC_PLT64 47 ++#define R_SPARC_HIX22 48 ++#define R_SPARC_LOX10 49 ++#define R_SPARC_H44 50 ++#define R_SPARC_M44 51 ++#define R_SPARC_L44 52 ++#define R_SPARC_REGISTER 53 ++#define R_SPARC_UA64 54 ++#define R_SPARC_UA16 55 ++#define R_SPARC_TLS_GD_HI22 56 ++#define R_SPARC_TLS_GD_LO10 57 ++#define R_SPARC_TLS_GD_ADD 58 ++#define R_SPARC_TLS_GD_CALL 59 ++#define R_SPARC_TLS_LDM_HI22 60 ++#define R_SPARC_TLS_LDM_LO10 61 ++#define R_SPARC_TLS_LDM_ADD 62 ++#define R_SPARC_TLS_LDM_CALL 63 ++#define R_SPARC_TLS_LDO_HIX22 64 ++#define R_SPARC_TLS_LDO_LOX10 65 ++#define R_SPARC_TLS_LDO_ADD 66 ++#define R_SPARC_TLS_IE_HI22 67 ++#define R_SPARC_TLS_IE_LO10 68 ++#define R_SPARC_TLS_IE_LD 69 ++#define R_SPARC_TLS_IE_LDX 70 ++#define R_SPARC_TLS_IE_ADD 71 ++#define R_SPARC_TLS_LE_HIX22 72 ++#define R_SPARC_TLS_LE_LOX10 73 ++#define R_SPARC_TLS_DTPMOD32 74 ++#define R_SPARC_TLS_DTPMOD64 75 ++#define R_SPARC_TLS_DTPOFF32 76 ++#define R_SPARC_TLS_DTPOFF64 77 ++#define R_SPARC_TLS_TPOFF32 78 ++#define R_SPARC_TLS_TPOFF64 79 ++#define R_SPARC_GOTDATA_HIX22 80 ++#define R_SPARC_GOTDATA_LOX10 81 ++#define R_SPARC_GOTDATA_OP_HIX22 82 ++#define R_SPARC_GOTDATA_OP_LOX10 83 ++#define R_SPARC_GOTDATA_OP 84 ++#define R_SPARC_H34 85 ++#define R_SPARC_SIZE32 86 ++#define R_SPARC_SIZE64 87 ++#define R_SPARC_GNU_VTINHERIT 250 ++#define R_SPARC_GNU_VTENTRY 251 ++#define R_SPARC_REV32 252 ++ ++#define R_SPARC_NUM 253 ++ ++ ++ ++#define DT_SPARC_REGISTER 0x70000001 ++#define DT_SPARC_NUM 2 ++ ++ ++#define EF_MIPS_NOREORDER 1 ++#define EF_MIPS_PIC 2 ++#define EF_MIPS_CPIC 4 ++#define EF_MIPS_XGOT 8 ++#define EF_MIPS_64BIT_WHIRL 16 ++#define EF_MIPS_ABI2 32 ++#define EF_MIPS_ABI_ON32 64 ++#define EF_MIPS_FP64 512 ++#define EF_MIPS_NAN2008 1024 ++#define EF_MIPS_ARCH 0xf0000000 ++ ++ ++ ++#define EF_MIPS_ARCH_1 0x00000000 ++#define EF_MIPS_ARCH_2 0x10000000 ++#define EF_MIPS_ARCH_3 0x20000000 ++#define EF_MIPS_ARCH_4 0x30000000 ++#define EF_MIPS_ARCH_5 0x40000000 ++#define EF_MIPS_ARCH_32 0x50000000 ++#define EF_MIPS_ARCH_64 0x60000000 ++#define EF_MIPS_ARCH_32R2 0x70000000 ++#define EF_MIPS_ARCH_64R2 0x80000000 ++ ++ ++#define E_MIPS_ARCH_1 0x00000000 ++#define E_MIPS_ARCH_2 0x10000000 ++#define E_MIPS_ARCH_3 0x20000000 ++#define E_MIPS_ARCH_4 0x30000000 ++#define E_MIPS_ARCH_5 0x40000000 ++#define E_MIPS_ARCH_32 0x50000000 ++#define E_MIPS_ARCH_64 0x60000000 ++ ++ ++ ++#define SHN_MIPS_ACOMMON 0xff00 ++#define SHN_MIPS_TEXT 0xff01 ++#define SHN_MIPS_DATA 0xff02 ++#define SHN_MIPS_SCOMMON 0xff03 ++#define SHN_MIPS_SUNDEFINED 0xff04 ++ ++ ++ ++#define SHT_MIPS_LIBLIST 0x70000000 ++#define SHT_MIPS_MSYM 0x70000001 ++#define SHT_MIPS_CONFLICT 0x70000002 ++#define SHT_MIPS_GPTAB 0x70000003 ++#define SHT_MIPS_UCODE 0x70000004 ++#define SHT_MIPS_DEBUG 0x70000005 ++#define SHT_MIPS_REGINFO 0x70000006 ++#define SHT_MIPS_PACKAGE 0x70000007 ++#define SHT_MIPS_PACKSYM 0x70000008 ++#define SHT_MIPS_RELD 0x70000009 ++#define SHT_MIPS_IFACE 0x7000000b ++#define SHT_MIPS_CONTENT 0x7000000c ++#define SHT_MIPS_OPTIONS 0x7000000d ++#define SHT_MIPS_SHDR 0x70000010 ++#define SHT_MIPS_FDESC 0x70000011 ++#define SHT_MIPS_EXTSYM 0x70000012 ++#define SHT_MIPS_DENSE 0x70000013 ++#define SHT_MIPS_PDESC 0x70000014 ++#define SHT_MIPS_LOCSYM 0x70000015 ++#define SHT_MIPS_AUXSYM 0x70000016 ++#define SHT_MIPS_OPTSYM 0x70000017 ++#define SHT_MIPS_LOCSTR 0x70000018 ++#define SHT_MIPS_LINE 0x70000019 ++#define SHT_MIPS_RFDESC 0x7000001a ++#define SHT_MIPS_DELTASYM 0x7000001b ++#define SHT_MIPS_DELTAINST 0x7000001c ++#define SHT_MIPS_DELTACLASS 0x7000001d ++#define SHT_MIPS_DWARF 0x7000001e ++#define SHT_MIPS_DELTADECL 0x7000001f ++#define SHT_MIPS_SYMBOL_LIB 0x70000020 ++#define SHT_MIPS_EVENTS 0x70000021 ++#define SHT_MIPS_TRANSLATE 0x70000022 ++#define SHT_MIPS_PIXIE 0x70000023 ++#define SHT_MIPS_XLATE 0x70000024 ++#define SHT_MIPS_XLATE_DEBUG 0x70000025 ++#define SHT_MIPS_WHIRL 0x70000026 ++#define SHT_MIPS_EH_REGION 0x70000027 ++#define SHT_MIPS_XLATE_OLD 0x70000028 ++#define SHT_MIPS_PDR_EXCEPTION 0x70000029 ++ ++ ++ ++#define SHF_MIPS_GPREL 0x10000000 ++#define SHF_MIPS_MERGE 0x20000000 ++#define SHF_MIPS_ADDR 0x40000000 ++#define SHF_MIPS_STRINGS 0x80000000 ++#define SHF_MIPS_NOSTRIP 0x08000000 ++#define SHF_MIPS_LOCAL 0x04000000 ++#define SHF_MIPS_NAMES 0x02000000 ++#define SHF_MIPS_NODUPE 0x01000000 ++ ++ ++ ++ ++ ++#define STO_MIPS_DEFAULT 0x0 ++#define STO_MIPS_INTERNAL 0x1 ++#define STO_MIPS_HIDDEN 0x2 ++#define STO_MIPS_PROTECTED 0x3 ++#define STO_MIPS_PLT 0x8 ++#define STO_MIPS_SC_ALIGN_UNUSED 0xff ++ ++ ++#define STB_MIPS_SPLIT_COMMON 13 ++ ++ ++ ++typedef union { ++ struct { ++ Elf32_Word gt_current_g_value; ++ Elf32_Word gt_unused; ++ } gt_header; ++ struct { ++ Elf32_Word gt_g_value; ++ Elf32_Word gt_bytes; ++ } gt_entry; ++} Elf32_gptab; ++ ++ ++ ++typedef struct { ++ Elf32_Word ri_gprmask; ++ Elf32_Word ri_cprmask[4]; ++ Elf32_Sword ri_gp_value; ++} Elf32_RegInfo; ++ ++ ++ ++typedef struct { ++ unsigned char kind; ++ ++ unsigned char size; ++ Elf32_Section section; ++ ++ Elf32_Word info; ++} Elf_Options; ++ ++ ++ ++#define ODK_NULL 0 ++#define ODK_REGINFO 1 ++#define ODK_EXCEPTIONS 2 ++#define ODK_PAD 3 ++#define ODK_HWPATCH 4 ++#define ODK_FILL 5 ++#define ODK_TAGS 6 ++#define ODK_HWAND 7 ++#define ODK_HWOR 8 ++ ++ ++ ++#define OEX_FPU_MIN 0x1f ++#define OEX_FPU_MAX 0x1f00 ++#define OEX_PAGE0 0x10000 ++#define OEX_SMM 0x20000 ++#define OEX_FPDBUG 0x40000 ++#define OEX_PRECISEFP OEX_FPDBUG ++#define OEX_DISMISS 0x80000 ++ ++#define OEX_FPU_INVAL 0x10 ++#define OEX_FPU_DIV0 0x08 ++#define OEX_FPU_OFLO 0x04 ++#define OEX_FPU_UFLO 0x02 ++#define OEX_FPU_INEX 0x01 ++ ++ ++ ++#define OHW_R4KEOP 0x1 ++#define OHW_R8KPFETCH 0x2 ++#define OHW_R5KEOP 0x4 ++#define OHW_R5KCVTL 0x8 ++ ++#define OPAD_PREFIX 0x1 ++#define OPAD_POSTFIX 0x2 ++#define OPAD_SYMBOL 0x4 ++ ++ ++ ++typedef struct { ++ Elf32_Word hwp_flags1; ++ Elf32_Word hwp_flags2; ++} Elf_Options_Hw; ++ ++ ++ ++#define OHWA0_R4KEOP_CHECKED 0x00000001 ++#define OHWA1_R4KEOP_CLEAN 0x00000002 ++ ++ ++ ++#define R_MIPS_NONE 0 ++#define R_MIPS_16 1 ++#define R_MIPS_32 2 ++#define R_MIPS_REL32 3 ++#define R_MIPS_26 4 ++#define R_MIPS_HI16 5 ++#define R_MIPS_LO16 6 ++#define R_MIPS_GPREL16 7 ++#define R_MIPS_LITERAL 8 ++#define R_MIPS_GOT16 9 ++#define R_MIPS_PC16 10 ++#define R_MIPS_CALL16 11 ++#define R_MIPS_GPREL32 12 ++ ++#define R_MIPS_SHIFT5 16 ++#define R_MIPS_SHIFT6 17 ++#define R_MIPS_64 18 ++#define R_MIPS_GOT_DISP 19 ++#define R_MIPS_GOT_PAGE 20 ++#define R_MIPS_GOT_OFST 21 ++#define R_MIPS_GOT_HI16 22 ++#define R_MIPS_GOT_LO16 23 ++#define R_MIPS_SUB 24 ++#define R_MIPS_INSERT_A 25 ++#define R_MIPS_INSERT_B 26 ++#define R_MIPS_DELETE 27 ++#define R_MIPS_HIGHER 28 ++#define R_MIPS_HIGHEST 29 ++#define R_MIPS_CALL_HI16 30 ++#define R_MIPS_CALL_LO16 31 ++#define R_MIPS_SCN_DISP 32 ++#define R_MIPS_REL16 33 ++#define R_MIPS_ADD_IMMEDIATE 34 ++#define R_MIPS_PJUMP 35 ++#define R_MIPS_RELGOT 36 ++#define R_MIPS_JALR 37 ++#define R_MIPS_TLS_DTPMOD32 38 ++#define R_MIPS_TLS_DTPREL32 39 ++#define R_MIPS_TLS_DTPMOD64 40 ++#define R_MIPS_TLS_DTPREL64 41 ++#define R_MIPS_TLS_GD 42 ++#define R_MIPS_TLS_LDM 43 ++#define R_MIPS_TLS_DTPREL_HI16 44 ++#define R_MIPS_TLS_DTPREL_LO16 45 ++#define R_MIPS_TLS_GOTTPREL 46 ++#define R_MIPS_TLS_TPREL32 47 ++#define R_MIPS_TLS_TPREL64 48 ++#define R_MIPS_TLS_TPREL_HI16 49 ++#define R_MIPS_TLS_TPREL_LO16 50 ++#define R_MIPS_GLOB_DAT 51 ++#define R_MIPS_COPY 126 ++#define R_MIPS_JUMP_SLOT 127 ++ ++#define R_MIPS_NUM 128 ++ ++ ++ ++#define PT_MIPS_REGINFO 0x70000000 ++#define PT_MIPS_RTPROC 0x70000001 ++#define PT_MIPS_OPTIONS 0x70000002 ++#define PT_MIPS_ABIFLAGS 0x70000003 ++ ++ ++ ++#define PF_MIPS_LOCAL 0x10000000 ++ ++ ++ ++#define DT_MIPS_RLD_VERSION 0x70000001 ++#define DT_MIPS_TIME_STAMP 0x70000002 ++#define DT_MIPS_ICHECKSUM 0x70000003 ++#define DT_MIPS_IVERSION 0x70000004 ++#define DT_MIPS_FLAGS 0x70000005 ++#define DT_MIPS_BASE_ADDRESS 0x70000006 ++#define DT_MIPS_MSYM 0x70000007 ++#define DT_MIPS_CONFLICT 0x70000008 ++#define DT_MIPS_LIBLIST 0x70000009 ++#define DT_MIPS_LOCAL_GOTNO 0x7000000a ++#define DT_MIPS_CONFLICTNO 0x7000000b ++#define DT_MIPS_LIBLISTNO 0x70000010 ++#define DT_MIPS_SYMTABNO 0x70000011 ++#define DT_MIPS_UNREFEXTNO 0x70000012 ++#define DT_MIPS_GOTSYM 0x70000013 ++#define DT_MIPS_HIPAGENO 0x70000014 ++#define DT_MIPS_RLD_MAP 0x70000016 ++#define DT_MIPS_DELTA_CLASS 0x70000017 ++#define DT_MIPS_DELTA_CLASS_NO 0x70000018 ++ ++#define DT_MIPS_DELTA_INSTANCE 0x70000019 ++#define DT_MIPS_DELTA_INSTANCE_NO 0x7000001a ++ ++#define DT_MIPS_DELTA_RELOC 0x7000001b ++#define DT_MIPS_DELTA_RELOC_NO 0x7000001c ++ ++#define DT_MIPS_DELTA_SYM 0x7000001d ++ ++#define DT_MIPS_DELTA_SYM_NO 0x7000001e ++ ++#define DT_MIPS_DELTA_CLASSSYM 0x70000020 ++ ++#define DT_MIPS_DELTA_CLASSSYM_NO 0x70000021 ++ ++#define DT_MIPS_CXX_FLAGS 0x70000022 ++#define DT_MIPS_PIXIE_INIT 0x70000023 ++#define DT_MIPS_SYMBOL_LIB 0x70000024 ++#define DT_MIPS_LOCALPAGE_GOTIDX 0x70000025 ++#define DT_MIPS_LOCAL_GOTIDX 0x70000026 ++#define DT_MIPS_HIDDEN_GOTIDX 0x70000027 ++#define DT_MIPS_PROTECTED_GOTIDX 0x70000028 ++#define DT_MIPS_OPTIONS 0x70000029 ++#define DT_MIPS_INTERFACE 0x7000002a ++#define DT_MIPS_DYNSTR_ALIGN 0x7000002b ++#define DT_MIPS_INTERFACE_SIZE 0x7000002c ++#define DT_MIPS_RLD_TEXT_RESOLVE_ADDR 0x7000002d ++ ++#define DT_MIPS_PERF_SUFFIX 0x7000002e ++ ++#define DT_MIPS_COMPACT_SIZE 0x7000002f ++#define DT_MIPS_GP_VALUE 0x70000030 ++#define DT_MIPS_AUX_DYNAMIC 0x70000031 ++ ++#define DT_MIPS_PLTGOT 0x70000032 ++ ++#define DT_MIPS_RWPLT 0x70000034 ++#define DT_MIPS_RLD_MAP_REL 0x70000035 ++#define DT_MIPS_NUM 0x36 ++ ++ ++ ++#define RHF_NONE 0 ++#define RHF_QUICKSTART (1 << 0) ++#define RHF_NOTPOT (1 << 1) ++#define RHF_NO_LIBRARY_REPLACEMENT (1 << 2) ++#define RHF_NO_MOVE (1 << 3) ++#define RHF_SGI_ONLY (1 << 4) ++#define RHF_GUARANTEE_INIT (1 << 5) ++#define RHF_DELTA_C_PLUS_PLUS (1 << 6) ++#define RHF_GUARANTEE_START_INIT (1 << 7) ++#define RHF_PIXIE (1 << 8) ++#define RHF_DEFAULT_DELAY_LOAD (1 << 9) ++#define RHF_REQUICKSTART (1 << 10) ++#define RHF_REQUICKSTARTED (1 << 11) ++#define RHF_CORD (1 << 12) ++#define RHF_NO_UNRES_UNDEF (1 << 13) ++#define RHF_RLD_ORDER_SAFE (1 << 14) ++ ++ ++ ++typedef struct { ++ Elf32_Word l_name; ++ Elf32_Word l_time_stamp; ++ Elf32_Word l_checksum; ++ Elf32_Word l_version; ++ Elf32_Word l_flags; ++} Elf32_Lib; ++ ++typedef struct { ++ Elf64_Word l_name; ++ Elf64_Word l_time_stamp; ++ Elf64_Word l_checksum; ++ Elf64_Word l_version; ++ Elf64_Word l_flags; ++} Elf64_Lib; ++ ++ ++ ++ ++#define LL_NONE 0 ++#define LL_EXACT_MATCH (1 << 0) ++#define LL_IGNORE_INT_VER (1 << 1) ++#define LL_REQUIRE_MINOR (1 << 2) ++#define LL_EXPORTS (1 << 3) ++#define LL_DELAY_LOAD (1 << 4) ++#define LL_DELTA (1 << 5) ++ ++ ++ ++typedef Elf32_Addr Elf32_Conflict; ++ ++typedef struct { ++ Elf32_Half version; ++ unsigned char isa_level; ++ unsigned char isa_rev; ++ unsigned char gpr_size; ++ unsigned char cpr1_size; ++ unsigned char cpr2_size; ++ unsigned char fp_abi; ++ Elf32_Word isa_ext; ++ Elf32_Word ases; ++ Elf32_Word flags1; ++ Elf32_Word flags2; ++} Elf_MIPS_ABIFlags_v0; ++ ++#define MIPS_AFL_REG_NONE 0x00 ++#define MIPS_AFL_REG_32 0x01 ++#define MIPS_AFL_REG_64 0x02 ++#define MIPS_AFL_REG_128 0x03 ++ ++#define MIPS_AFL_ASE_DSP 0x00000001 ++#define MIPS_AFL_ASE_DSPR2 0x00000002 ++#define MIPS_AFL_ASE_EVA 0x00000004 ++#define MIPS_AFL_ASE_MCU 0x00000008 ++#define MIPS_AFL_ASE_MDMX 0x00000010 ++#define MIPS_AFL_ASE_MIPS3D 0x00000020 ++#define MIPS_AFL_ASE_MT 0x00000040 ++#define MIPS_AFL_ASE_SMARTMIPS 0x00000080 ++#define MIPS_AFL_ASE_VIRT 0x00000100 ++#define MIPS_AFL_ASE_MSA 0x00000200 ++#define MIPS_AFL_ASE_MIPS16 0x00000400 ++#define MIPS_AFL_ASE_MICROMIPS 0x00000800 ++#define MIPS_AFL_ASE_XPA 0x00001000 ++#define MIPS_AFL_ASE_MASK 0x00001fff ++ ++#define MIPS_AFL_EXT_XLR 1 ++#define MIPS_AFL_EXT_OCTEON2 2 ++#define MIPS_AFL_EXT_OCTEONP 3 ++#define MIPS_AFL_EXT_LOONGSON_3A 4 ++#define MIPS_AFL_EXT_OCTEON 5 ++#define MIPS_AFL_EXT_5900 6 ++#define MIPS_AFL_EXT_4650 7 ++#define MIPS_AFL_EXT_4010 8 ++#define MIPS_AFL_EXT_4100 9 ++#define MIPS_AFL_EXT_3900 10 ++#define MIPS_AFL_EXT_10000 11 ++#define MIPS_AFL_EXT_SB1 12 ++#define MIPS_AFL_EXT_4111 13 ++#define MIPS_AFL_EXT_4120 14 ++#define MIPS_AFL_EXT_5400 15 ++#define MIPS_AFL_EXT_5500 16 ++#define MIPS_AFL_EXT_LOONGSON_2E 17 ++#define MIPS_AFL_EXT_LOONGSON_2F 18 ++ ++#define MIPS_AFL_FLAGS1_ODDSPREG 1 ++ ++enum ++{ ++ Val_GNU_MIPS_ABI_FP_ANY = 0, ++ Val_GNU_MIPS_ABI_FP_DOUBLE = 1, ++ Val_GNU_MIPS_ABI_FP_SINGLE = 2, ++ Val_GNU_MIPS_ABI_FP_SOFT = 3, ++ Val_GNU_MIPS_ABI_FP_OLD_64 = 4, ++ Val_GNU_MIPS_ABI_FP_XX = 5, ++ Val_GNU_MIPS_ABI_FP_64 = 6, ++ Val_GNU_MIPS_ABI_FP_64A = 7, ++ Val_GNU_MIPS_ABI_FP_MAX = 7 ++}; ++ ++ ++ ++ ++#define EF_PARISC_TRAPNIL 0x00010000 ++#define EF_PARISC_EXT 0x00020000 ++#define EF_PARISC_LSB 0x00040000 ++#define EF_PARISC_WIDE 0x00080000 ++#define EF_PARISC_NO_KABP 0x00100000 ++ ++#define EF_PARISC_LAZYSWAP 0x00400000 ++#define EF_PARISC_ARCH 0x0000ffff ++ ++ ++ ++#define EFA_PARISC_1_0 0x020b ++#define EFA_PARISC_1_1 0x0210 ++#define EFA_PARISC_2_0 0x0214 ++ ++ ++ ++#define SHN_PARISC_ANSI_COMMON 0xff00 ++ ++#define SHN_PARISC_HUGE_COMMON 0xff01 ++ ++ ++ ++#define SHT_PARISC_EXT 0x70000000 ++#define SHT_PARISC_UNWIND 0x70000001 ++#define SHT_PARISC_DOC 0x70000002 ++ ++ ++ ++#define SHF_PARISC_SHORT 0x20000000 ++#define SHF_PARISC_HUGE 0x40000000 ++#define SHF_PARISC_SBP 0x80000000 ++ ++ ++ ++#define STT_PARISC_MILLICODE 13 ++ ++#define STT_HP_OPAQUE (STT_LOOS + 0x1) ++#define STT_HP_STUB (STT_LOOS + 0x2) ++ ++ ++ ++#define R_PARISC_NONE 0 ++#define R_PARISC_DIR32 1 ++#define R_PARISC_DIR21L 2 ++#define R_PARISC_DIR17R 3 ++#define R_PARISC_DIR17F 4 ++#define R_PARISC_DIR14R 6 ++#define R_PARISC_PCREL32 9 ++#define R_PARISC_PCREL21L 10 ++#define R_PARISC_PCREL17R 11 ++#define R_PARISC_PCREL17F 12 ++#define R_PARISC_PCREL14R 14 ++#define R_PARISC_DPREL21L 18 ++#define R_PARISC_DPREL14R 22 ++#define R_PARISC_GPREL21L 26 ++#define R_PARISC_GPREL14R 30 ++#define R_PARISC_LTOFF21L 34 ++#define R_PARISC_LTOFF14R 38 ++#define R_PARISC_SECREL32 41 ++#define R_PARISC_SEGBASE 48 ++#define R_PARISC_SEGREL32 49 ++#define R_PARISC_PLTOFF21L 50 ++#define R_PARISC_PLTOFF14R 54 ++#define R_PARISC_LTOFF_FPTR32 57 ++#define R_PARISC_LTOFF_FPTR21L 58 ++#define R_PARISC_LTOFF_FPTR14R 62 ++#define R_PARISC_FPTR64 64 ++#define R_PARISC_PLABEL32 65 ++#define R_PARISC_PLABEL21L 66 ++#define R_PARISC_PLABEL14R 70 ++#define R_PARISC_PCREL64 72 ++#define R_PARISC_PCREL22F 74 ++#define R_PARISC_PCREL14WR 75 ++#define R_PARISC_PCREL14DR 76 ++#define R_PARISC_PCREL16F 77 ++#define R_PARISC_PCREL16WF 78 ++#define R_PARISC_PCREL16DF 79 ++#define R_PARISC_DIR64 80 ++#define R_PARISC_DIR14WR 83 ++#define R_PARISC_DIR14DR 84 ++#define R_PARISC_DIR16F 85 ++#define R_PARISC_DIR16WF 86 ++#define R_PARISC_DIR16DF 87 ++#define R_PARISC_GPREL64 88 ++#define R_PARISC_GPREL14WR 91 ++#define R_PARISC_GPREL14DR 92 ++#define R_PARISC_GPREL16F 93 ++#define R_PARISC_GPREL16WF 94 ++#define R_PARISC_GPREL16DF 95 ++#define R_PARISC_LTOFF64 96 ++#define R_PARISC_LTOFF14WR 99 ++#define R_PARISC_LTOFF14DR 100 ++#define R_PARISC_LTOFF16F 101 ++#define R_PARISC_LTOFF16WF 102 ++#define R_PARISC_LTOFF16DF 103 ++#define R_PARISC_SECREL64 104 ++#define R_PARISC_SEGREL64 112 ++#define R_PARISC_PLTOFF14WR 115 ++#define R_PARISC_PLTOFF14DR 116 ++#define R_PARISC_PLTOFF16F 117 ++#define R_PARISC_PLTOFF16WF 118 ++#define R_PARISC_PLTOFF16DF 119 ++#define R_PARISC_LTOFF_FPTR64 120 ++#define R_PARISC_LTOFF_FPTR14WR 123 ++#define R_PARISC_LTOFF_FPTR14DR 124 ++#define R_PARISC_LTOFF_FPTR16F 125 ++#define R_PARISC_LTOFF_FPTR16WF 126 ++#define R_PARISC_LTOFF_FPTR16DF 127 ++#define R_PARISC_LORESERVE 128 ++#define R_PARISC_COPY 128 ++#define R_PARISC_IPLT 129 ++#define R_PARISC_EPLT 130 ++#define R_PARISC_TPREL32 153 ++#define R_PARISC_TPREL21L 154 ++#define R_PARISC_TPREL14R 158 ++#define R_PARISC_LTOFF_TP21L 162 ++#define R_PARISC_LTOFF_TP14R 166 ++#define R_PARISC_LTOFF_TP14F 167 ++#define R_PARISC_TPREL64 216 ++#define R_PARISC_TPREL14WR 219 ++#define R_PARISC_TPREL14DR 220 ++#define R_PARISC_TPREL16F 221 ++#define R_PARISC_TPREL16WF 222 ++#define R_PARISC_TPREL16DF 223 ++#define R_PARISC_LTOFF_TP64 224 ++#define R_PARISC_LTOFF_TP14WR 227 ++#define R_PARISC_LTOFF_TP14DR 228 ++#define R_PARISC_LTOFF_TP16F 229 ++#define R_PARISC_LTOFF_TP16WF 230 ++#define R_PARISC_LTOFF_TP16DF 231 ++#define R_PARISC_GNU_VTENTRY 232 ++#define R_PARISC_GNU_VTINHERIT 233 ++#define R_PARISC_TLS_GD21L 234 ++#define R_PARISC_TLS_GD14R 235 ++#define R_PARISC_TLS_GDCALL 236 ++#define R_PARISC_TLS_LDM21L 237 ++#define R_PARISC_TLS_LDM14R 238 ++#define R_PARISC_TLS_LDMCALL 239 ++#define R_PARISC_TLS_LDO21L 240 ++#define R_PARISC_TLS_LDO14R 241 ++#define R_PARISC_TLS_DTPMOD32 242 ++#define R_PARISC_TLS_DTPMOD64 243 ++#define R_PARISC_TLS_DTPOFF32 244 ++#define R_PARISC_TLS_DTPOFF64 245 ++#define R_PARISC_TLS_LE21L R_PARISC_TPREL21L ++#define R_PARISC_TLS_LE14R R_PARISC_TPREL14R ++#define R_PARISC_TLS_IE21L R_PARISC_LTOFF_TP21L ++#define R_PARISC_TLS_IE14R R_PARISC_LTOFF_TP14R ++#define R_PARISC_TLS_TPREL32 R_PARISC_TPREL32 ++#define R_PARISC_TLS_TPREL64 R_PARISC_TPREL64 ++#define R_PARISC_HIRESERVE 255 ++ ++ ++ ++#define PT_HP_TLS (PT_LOOS + 0x0) ++#define PT_HP_CORE_NONE (PT_LOOS + 0x1) ++#define PT_HP_CORE_VERSION (PT_LOOS + 0x2) ++#define PT_HP_CORE_KERNEL (PT_LOOS + 0x3) ++#define PT_HP_CORE_COMM (PT_LOOS + 0x4) ++#define PT_HP_CORE_PROC (PT_LOOS + 0x5) ++#define PT_HP_CORE_LOADABLE (PT_LOOS + 0x6) ++#define PT_HP_CORE_STACK (PT_LOOS + 0x7) ++#define PT_HP_CORE_SHM (PT_LOOS + 0x8) ++#define PT_HP_CORE_MMF (PT_LOOS + 0x9) ++#define PT_HP_PARALLEL (PT_LOOS + 0x10) ++#define PT_HP_FASTBIND (PT_LOOS + 0x11) ++#define PT_HP_OPT_ANNOT (PT_LOOS + 0x12) ++#define PT_HP_HSL_ANNOT (PT_LOOS + 0x13) ++#define PT_HP_STACK (PT_LOOS + 0x14) ++ ++#define PT_PARISC_ARCHEXT 0x70000000 ++#define PT_PARISC_UNWIND 0x70000001 ++ ++ ++ ++#define PF_PARISC_SBP 0x08000000 ++ ++#define PF_HP_PAGE_SIZE 0x00100000 ++#define PF_HP_FAR_SHARED 0x00200000 ++#define PF_HP_NEAR_SHARED 0x00400000 ++#define PF_HP_CODE 0x01000000 ++#define PF_HP_MODIFY 0x02000000 ++#define PF_HP_LAZYSWAP 0x04000000 ++#define PF_HP_SBP 0x08000000 ++ ++ ++ ++ ++ ++ ++#define EF_ALPHA_32BIT 1 ++#define EF_ALPHA_CANRELAX 2 ++ ++ ++ ++ ++#define SHT_ALPHA_DEBUG 0x70000001 ++#define SHT_ALPHA_REGINFO 0x70000002 ++ ++ ++ ++#define SHF_ALPHA_GPREL 0x10000000 ++ ++ ++#define STO_ALPHA_NOPV 0x80 ++#define STO_ALPHA_STD_GPLOAD 0x88 ++ ++ ++ ++#define R_ALPHA_NONE 0 ++#define R_ALPHA_REFLONG 1 ++#define R_ALPHA_REFQUAD 2 ++#define R_ALPHA_GPREL32 3 ++#define R_ALPHA_LITERAL 4 ++#define R_ALPHA_LITUSE 5 ++#define R_ALPHA_GPDISP 6 ++#define R_ALPHA_BRADDR 7 ++#define R_ALPHA_HINT 8 ++#define R_ALPHA_SREL16 9 ++#define R_ALPHA_SREL32 10 ++#define R_ALPHA_SREL64 11 ++#define R_ALPHA_GPRELHIGH 17 ++#define R_ALPHA_GPRELLOW 18 ++#define R_ALPHA_GPREL16 19 ++#define R_ALPHA_COPY 24 ++#define R_ALPHA_GLOB_DAT 25 ++#define R_ALPHA_JMP_SLOT 26 ++#define R_ALPHA_RELATIVE 27 ++#define R_ALPHA_TLS_GD_HI 28 ++#define R_ALPHA_TLSGD 29 ++#define R_ALPHA_TLS_LDM 30 ++#define R_ALPHA_DTPMOD64 31 ++#define R_ALPHA_GOTDTPREL 32 ++#define R_ALPHA_DTPREL64 33 ++#define R_ALPHA_DTPRELHI 34 ++#define R_ALPHA_DTPRELLO 35 ++#define R_ALPHA_DTPREL16 36 ++#define R_ALPHA_GOTTPREL 37 ++#define R_ALPHA_TPREL64 38 ++#define R_ALPHA_TPRELHI 39 ++#define R_ALPHA_TPRELLO 40 ++#define R_ALPHA_TPREL16 41 ++ ++#define R_ALPHA_NUM 46 ++ ++ ++#define LITUSE_ALPHA_ADDR 0 ++#define LITUSE_ALPHA_BASE 1 ++#define LITUSE_ALPHA_BYTOFF 2 ++#define LITUSE_ALPHA_JSR 3 ++#define LITUSE_ALPHA_TLS_GD 4 ++#define LITUSE_ALPHA_TLS_LDM 5 ++ ++ ++#define DT_ALPHA_PLTRO (DT_LOPROC + 0) ++#define DT_ALPHA_NUM 1 ++ ++ ++ ++ ++#define EF_PPC_EMB 0x80000000 ++ ++ ++#define EF_PPC_RELOCATABLE 0x00010000 ++#define EF_PPC_RELOCATABLE_LIB 0x00008000 ++ ++ ++ ++#define R_PPC_NONE 0 ++#define R_PPC_ADDR32 1 ++#define R_PPC_ADDR24 2 ++#define R_PPC_ADDR16 3 ++#define R_PPC_ADDR16_LO 4 ++#define R_PPC_ADDR16_HI 5 ++#define R_PPC_ADDR16_HA 6 ++#define R_PPC_ADDR14 7 ++#define R_PPC_ADDR14_BRTAKEN 8 ++#define R_PPC_ADDR14_BRNTAKEN 9 ++#define R_PPC_REL24 10 ++#define R_PPC_REL14 11 ++#define R_PPC_REL14_BRTAKEN 12 ++#define R_PPC_REL14_BRNTAKEN 13 ++#define R_PPC_GOT16 14 ++#define R_PPC_GOT16_LO 15 ++#define R_PPC_GOT16_HI 16 ++#define R_PPC_GOT16_HA 17 ++#define R_PPC_PLTREL24 18 ++#define R_PPC_COPY 19 ++#define R_PPC_GLOB_DAT 20 ++#define R_PPC_JMP_SLOT 21 ++#define R_PPC_RELATIVE 22 ++#define R_PPC_LOCAL24PC 23 ++#define R_PPC_UADDR32 24 ++#define R_PPC_UADDR16 25 ++#define R_PPC_REL32 26 ++#define R_PPC_PLT32 27 ++#define R_PPC_PLTREL32 28 ++#define R_PPC_PLT16_LO 29 ++#define R_PPC_PLT16_HI 30 ++#define R_PPC_PLT16_HA 31 ++#define R_PPC_SDAREL16 32 ++#define R_PPC_SECTOFF 33 ++#define R_PPC_SECTOFF_LO 34 ++#define R_PPC_SECTOFF_HI 35 ++#define R_PPC_SECTOFF_HA 36 ++ ++ ++#define R_PPC_TLS 67 ++#define R_PPC_DTPMOD32 68 ++#define R_PPC_TPREL16 69 ++#define R_PPC_TPREL16_LO 70 ++#define R_PPC_TPREL16_HI 71 ++#define R_PPC_TPREL16_HA 72 ++#define R_PPC_TPREL32 73 ++#define R_PPC_DTPREL16 74 ++#define R_PPC_DTPREL16_LO 75 ++#define R_PPC_DTPREL16_HI 76 ++#define R_PPC_DTPREL16_HA 77 ++#define R_PPC_DTPREL32 78 ++#define R_PPC_GOT_TLSGD16 79 ++#define R_PPC_GOT_TLSGD16_LO 80 ++#define R_PPC_GOT_TLSGD16_HI 81 ++#define R_PPC_GOT_TLSGD16_HA 82 ++#define R_PPC_GOT_TLSLD16 83 ++#define R_PPC_GOT_TLSLD16_LO 84 ++#define R_PPC_GOT_TLSLD16_HI 85 ++#define R_PPC_GOT_TLSLD16_HA 86 ++#define R_PPC_GOT_TPREL16 87 ++#define R_PPC_GOT_TPREL16_LO 88 ++#define R_PPC_GOT_TPREL16_HI 89 ++#define R_PPC_GOT_TPREL16_HA 90 ++#define R_PPC_GOT_DTPREL16 91 ++#define R_PPC_GOT_DTPREL16_LO 92 ++#define R_PPC_GOT_DTPREL16_HI 93 ++#define R_PPC_GOT_DTPREL16_HA 94 ++#define R_PPC_TLSGD 95 ++#define R_PPC_TLSLD 96 ++ ++ ++#define R_PPC_EMB_NADDR32 101 ++#define R_PPC_EMB_NADDR16 102 ++#define R_PPC_EMB_NADDR16_LO 103 ++#define R_PPC_EMB_NADDR16_HI 104 ++#define R_PPC_EMB_NADDR16_HA 105 ++#define R_PPC_EMB_SDAI16 106 ++#define R_PPC_EMB_SDA2I16 107 ++#define R_PPC_EMB_SDA2REL 108 ++#define R_PPC_EMB_SDA21 109 ++#define R_PPC_EMB_MRKREF 110 ++#define R_PPC_EMB_RELSEC16 111 ++#define R_PPC_EMB_RELST_LO 112 ++#define R_PPC_EMB_RELST_HI 113 ++#define R_PPC_EMB_RELST_HA 114 ++#define R_PPC_EMB_BIT_FLD 115 ++#define R_PPC_EMB_RELSDA 116 ++ ++ ++#define R_PPC_DIAB_SDA21_LO 180 ++#define R_PPC_DIAB_SDA21_HI 181 ++#define R_PPC_DIAB_SDA21_HA 182 ++#define R_PPC_DIAB_RELSDA_LO 183 ++#define R_PPC_DIAB_RELSDA_HI 184 ++#define R_PPC_DIAB_RELSDA_HA 185 ++ ++ ++#define R_PPC_IRELATIVE 248 ++ ++ ++#define R_PPC_REL16 249 ++#define R_PPC_REL16_LO 250 ++#define R_PPC_REL16_HI 251 ++#define R_PPC_REL16_HA 252 ++ ++ ++ ++#define R_PPC_TOC16 255 ++ ++ ++#define DT_PPC_GOT (DT_LOPROC + 0) ++#define DT_PPC_OPT (DT_LOPROC + 1) ++#define DT_PPC_NUM 2 ++ ++#define PPC_OPT_TLS 1 ++ ++ ++#define R_PPC64_NONE R_PPC_NONE ++#define R_PPC64_ADDR32 R_PPC_ADDR32 ++#define R_PPC64_ADDR24 R_PPC_ADDR24 ++#define R_PPC64_ADDR16 R_PPC_ADDR16 ++#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO ++#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI ++#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA ++#define R_PPC64_ADDR14 R_PPC_ADDR14 ++#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN ++#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN ++#define R_PPC64_REL24 R_PPC_REL24 ++#define R_PPC64_REL14 R_PPC_REL14 ++#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN ++#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN ++#define R_PPC64_GOT16 R_PPC_GOT16 ++#define R_PPC64_GOT16_LO R_PPC_GOT16_LO ++#define R_PPC64_GOT16_HI R_PPC_GOT16_HI ++#define R_PPC64_GOT16_HA R_PPC_GOT16_HA ++ ++#define R_PPC64_COPY R_PPC_COPY ++#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT ++#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT ++#define R_PPC64_RELATIVE R_PPC_RELATIVE ++ ++#define R_PPC64_UADDR32 R_PPC_UADDR32 ++#define R_PPC64_UADDR16 R_PPC_UADDR16 ++#define R_PPC64_REL32 R_PPC_REL32 ++#define R_PPC64_PLT32 R_PPC_PLT32 ++#define R_PPC64_PLTREL32 R_PPC_PLTREL32 ++#define R_PPC64_PLT16_LO R_PPC_PLT16_LO ++#define R_PPC64_PLT16_HI R_PPC_PLT16_HI ++#define R_PPC64_PLT16_HA R_PPC_PLT16_HA ++ ++#define R_PPC64_SECTOFF R_PPC_SECTOFF ++#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO ++#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI ++#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA ++#define R_PPC64_ADDR30 37 ++#define R_PPC64_ADDR64 38 ++#define R_PPC64_ADDR16_HIGHER 39 ++#define R_PPC64_ADDR16_HIGHERA 40 ++#define R_PPC64_ADDR16_HIGHEST 41 ++#define R_PPC64_ADDR16_HIGHESTA 42 ++#define R_PPC64_UADDR64 43 ++#define R_PPC64_REL64 44 ++#define R_PPC64_PLT64 45 ++#define R_PPC64_PLTREL64 46 ++#define R_PPC64_TOC16 47 ++#define R_PPC64_TOC16_LO 48 ++#define R_PPC64_TOC16_HI 49 ++#define R_PPC64_TOC16_HA 50 ++#define R_PPC64_TOC 51 ++#define R_PPC64_PLTGOT16 52 ++#define R_PPC64_PLTGOT16_LO 53 ++#define R_PPC64_PLTGOT16_HI 54 ++#define R_PPC64_PLTGOT16_HA 55 ++ ++#define R_PPC64_ADDR16_DS 56 ++#define R_PPC64_ADDR16_LO_DS 57 ++#define R_PPC64_GOT16_DS 58 ++#define R_PPC64_GOT16_LO_DS 59 ++#define R_PPC64_PLT16_LO_DS 60 ++#define R_PPC64_SECTOFF_DS 61 ++#define R_PPC64_SECTOFF_LO_DS 62 ++#define R_PPC64_TOC16_DS 63 ++#define R_PPC64_TOC16_LO_DS 64 ++#define R_PPC64_PLTGOT16_DS 65 ++#define R_PPC64_PLTGOT16_LO_DS 66 ++ ++ ++#define R_PPC64_TLS 67 ++#define R_PPC64_DTPMOD64 68 ++#define R_PPC64_TPREL16 69 ++#define R_PPC64_TPREL16_LO 70 ++#define R_PPC64_TPREL16_HI 71 ++#define R_PPC64_TPREL16_HA 72 ++#define R_PPC64_TPREL64 73 ++#define R_PPC64_DTPREL16 74 ++#define R_PPC64_DTPREL16_LO 75 ++#define R_PPC64_DTPREL16_HI 76 ++#define R_PPC64_DTPREL16_HA 77 ++#define R_PPC64_DTPREL64 78 ++#define R_PPC64_GOT_TLSGD16 79 ++#define R_PPC64_GOT_TLSGD16_LO 80 ++#define R_PPC64_GOT_TLSGD16_HI 81 ++#define R_PPC64_GOT_TLSGD16_HA 82 ++#define R_PPC64_GOT_TLSLD16 83 ++#define R_PPC64_GOT_TLSLD16_LO 84 ++#define R_PPC64_GOT_TLSLD16_HI 85 ++#define R_PPC64_GOT_TLSLD16_HA 86 ++#define R_PPC64_GOT_TPREL16_DS 87 ++#define R_PPC64_GOT_TPREL16_LO_DS 88 ++#define R_PPC64_GOT_TPREL16_HI 89 ++#define R_PPC64_GOT_TPREL16_HA 90 ++#define R_PPC64_GOT_DTPREL16_DS 91 ++#define R_PPC64_GOT_DTPREL16_LO_DS 92 ++#define R_PPC64_GOT_DTPREL16_HI 93 ++#define R_PPC64_GOT_DTPREL16_HA 94 ++#define R_PPC64_TPREL16_DS 95 ++#define R_PPC64_TPREL16_LO_DS 96 ++#define R_PPC64_TPREL16_HIGHER 97 ++#define R_PPC64_TPREL16_HIGHERA 98 ++#define R_PPC64_TPREL16_HIGHEST 99 ++#define R_PPC64_TPREL16_HIGHESTA 100 ++#define R_PPC64_DTPREL16_DS 101 ++#define R_PPC64_DTPREL16_LO_DS 102 ++#define R_PPC64_DTPREL16_HIGHER 103 ++#define R_PPC64_DTPREL16_HIGHERA 104 ++#define R_PPC64_DTPREL16_HIGHEST 105 ++#define R_PPC64_DTPREL16_HIGHESTA 106 ++#define R_PPC64_TLSGD 107 ++#define R_PPC64_TLSLD 108 ++#define R_PPC64_TOCSAVE 109 ++#define R_PPC64_ADDR16_HIGH 110 ++#define R_PPC64_ADDR16_HIGHA 111 ++#define R_PPC64_TPREL16_HIGH 112 ++#define R_PPC64_TPREL16_HIGHA 113 ++#define R_PPC64_DTPREL16_HIGH 114 ++#define R_PPC64_DTPREL16_HIGHA 115 ++ ++ ++#define R_PPC64_JMP_IREL 247 ++#define R_PPC64_IRELATIVE 248 ++#define R_PPC64_REL16 249 ++#define R_PPC64_REL16_LO 250 ++#define R_PPC64_REL16_HI 251 ++#define R_PPC64_REL16_HA 252 ++ ++#define EF_PPC64_ABI 3 ++ ++#define DT_PPC64_GLINK (DT_LOPROC + 0) ++#define DT_PPC64_OPD (DT_LOPROC + 1) ++#define DT_PPC64_OPDSZ (DT_LOPROC + 2) ++#define DT_PPC64_OPT (DT_LOPROC + 3) ++#define DT_PPC64_NUM 4 ++ ++#define PPC64_OPT_TLS 1 ++#define PPC64_OPT_MULTI_TOC 2 ++#define PPC64_OPT_LOCALENTRY 4 ++ ++#define STO_PPC64_LOCAL_BIT 5 ++#define STO_PPC64_LOCAL_MASK 0xe0 ++#define PPC64_LOCAL_ENTRY_OFFSET(x) (1 << (((x)&0xe0)>>5) & 0xfc) ++ ++ ++#define EF_ARM_RELEXEC 0x01 ++#define EF_ARM_HASENTRY 0x02 ++#define EF_ARM_INTERWORK 0x04 ++#define EF_ARM_APCS_26 0x08 ++#define EF_ARM_APCS_FLOAT 0x10 ++#define EF_ARM_PIC 0x20 ++#define EF_ARM_ALIGN8 0x40 ++#define EF_ARM_NEW_ABI 0x80 ++#define EF_ARM_OLD_ABI 0x100 ++#define EF_ARM_SOFT_FLOAT 0x200 ++#define EF_ARM_VFP_FLOAT 0x400 ++#define EF_ARM_MAVERICK_FLOAT 0x800 ++ ++#define EF_ARM_ABI_FLOAT_SOFT 0x200 ++#define EF_ARM_ABI_FLOAT_HARD 0x400 ++ ++ ++#define EF_ARM_SYMSARESORTED 0x04 ++#define EF_ARM_DYNSYMSUSESEGIDX 0x08 ++#define EF_ARM_MAPSYMSFIRST 0x10 ++#define EF_ARM_EABIMASK 0XFF000000 ++ ++ ++#define EF_ARM_BE8 0x00800000 ++#define EF_ARM_LE8 0x00400000 ++ ++#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK) ++#define EF_ARM_EABI_UNKNOWN 0x00000000 ++#define EF_ARM_EABI_VER1 0x01000000 ++#define EF_ARM_EABI_VER2 0x02000000 ++#define EF_ARM_EABI_VER3 0x03000000 ++#define EF_ARM_EABI_VER4 0x04000000 ++#define EF_ARM_EABI_VER5 0x05000000 ++ ++ ++#define STT_ARM_TFUNC STT_LOPROC ++#define STT_ARM_16BIT STT_HIPROC ++ ++ ++#define SHF_ARM_ENTRYSECT 0x10000000 ++#define SHF_ARM_COMDEF 0x80000000 ++ ++ ++ ++#define PF_ARM_SB 0x10000000 ++ ++#define PF_ARM_PI 0x20000000 ++#define PF_ARM_ABS 0x40000000 ++ ++ ++#define PT_ARM_EXIDX (PT_LOPROC + 1) ++ ++ ++#define SHT_ARM_EXIDX (SHT_LOPROC + 1) ++#define SHT_ARM_PREEMPTMAP (SHT_LOPROC + 2) ++#define SHT_ARM_ATTRIBUTES (SHT_LOPROC + 3) ++ ++#define R_AARCH64_NONE 0 ++#define R_AARCH64_P32_ABS32 1 ++#define R_AARCH64_P32_COPY 180 ++#define R_AARCH64_P32_GLOB_DAT 181 ++#define R_AARCH64_P32_JUMP_SLOT 182 ++#define R_AARCH64_P32_RELATIVE 183 ++#define R_AARCH64_P32_TLS_DTPMOD 184 ++#define R_AARCH64_P32_TLS_DTPREL 185 ++#define R_AARCH64_P32_TLS_TPREL 186 ++#define R_AARCH64_P32_TLSDESC 187 ++#define R_AARCH64_P32_IRELATIVE 188 ++#define R_AARCH64_ABS64 257 ++#define R_AARCH64_ABS32 258 ++#define R_AARCH64_ABS16 259 ++#define R_AARCH64_PREL64 260 ++#define R_AARCH64_PREL32 261 ++#define R_AARCH64_PREL16 262 ++#define R_AARCH64_MOVW_UABS_G0 263 ++#define R_AARCH64_MOVW_UABS_G0_NC 264 ++#define R_AARCH64_MOVW_UABS_G1 265 ++#define R_AARCH64_MOVW_UABS_G1_NC 266 ++#define R_AARCH64_MOVW_UABS_G2 267 ++#define R_AARCH64_MOVW_UABS_G2_NC 268 ++#define R_AARCH64_MOVW_UABS_G3 269 ++#define R_AARCH64_MOVW_SABS_G0 270 ++#define R_AARCH64_MOVW_SABS_G1 271 ++#define R_AARCH64_MOVW_SABS_G2 272 ++#define R_AARCH64_LD_PREL_LO19 273 ++#define R_AARCH64_ADR_PREL_LO21 274 ++#define R_AARCH64_ADR_PREL_PG_HI21 275 ++#define R_AARCH64_ADR_PREL_PG_HI21_NC 276 ++#define R_AARCH64_ADD_ABS_LO12_NC 277 ++#define R_AARCH64_LDST8_ABS_LO12_NC 278 ++#define R_AARCH64_TSTBR14 279 ++#define R_AARCH64_CONDBR19 280 ++#define R_AARCH64_JUMP26 282 ++#define R_AARCH64_CALL26 283 ++#define R_AARCH64_LDST16_ABS_LO12_NC 284 ++#define R_AARCH64_LDST32_ABS_LO12_NC 285 ++#define R_AARCH64_LDST64_ABS_LO12_NC 286 ++#define R_AARCH64_MOVW_PREL_G0 287 ++#define R_AARCH64_MOVW_PREL_G0_NC 288 ++#define R_AARCH64_MOVW_PREL_G1 289 ++#define R_AARCH64_MOVW_PREL_G1_NC 290 ++#define R_AARCH64_MOVW_PREL_G2 291 ++#define R_AARCH64_MOVW_PREL_G2_NC 292 ++#define R_AARCH64_MOVW_PREL_G3 293 ++#define R_AARCH64_LDST128_ABS_LO12_NC 299 ++#define R_AARCH64_MOVW_GOTOFF_G0 300 ++#define R_AARCH64_MOVW_GOTOFF_G0_NC 301 ++#define R_AARCH64_MOVW_GOTOFF_G1 302 ++#define R_AARCH64_MOVW_GOTOFF_G1_NC 303 ++#define R_AARCH64_MOVW_GOTOFF_G2 304 ++#define R_AARCH64_MOVW_GOTOFF_G2_NC 305 ++#define R_AARCH64_MOVW_GOTOFF_G3 306 ++#define R_AARCH64_GOTREL64 307 ++#define R_AARCH64_GOTREL32 308 ++#define R_AARCH64_GOT_LD_PREL19 309 ++#define R_AARCH64_LD64_GOTOFF_LO15 310 ++#define R_AARCH64_ADR_GOT_PAGE 311 ++#define R_AARCH64_LD64_GOT_LO12_NC 312 ++#define R_AARCH64_LD64_GOTPAGE_LO15 313 ++#define R_AARCH64_TLSGD_ADR_PREL21 512 ++#define R_AARCH64_TLSGD_ADR_PAGE21 513 ++#define R_AARCH64_TLSGD_ADD_LO12_NC 514 ++#define R_AARCH64_TLSGD_MOVW_G1 515 ++#define R_AARCH64_TLSGD_MOVW_G0_NC 516 ++#define R_AARCH64_TLSLD_ADR_PREL21 517 ++#define R_AARCH64_TLSLD_ADR_PAGE21 518 ++#define R_AARCH64_TLSLD_ADD_LO12_NC 519 ++#define R_AARCH64_TLSLD_MOVW_G1 520 ++#define R_AARCH64_TLSLD_MOVW_G0_NC 521 ++#define R_AARCH64_TLSLD_LD_PREL19 522 ++#define R_AARCH64_TLSLD_MOVW_DTPREL_G2 523 ++#define R_AARCH64_TLSLD_MOVW_DTPREL_G1 524 ++#define R_AARCH64_TLSLD_MOVW_DTPREL_G1_NC 525 ++#define R_AARCH64_TLSLD_MOVW_DTPREL_G0 526 ++#define R_AARCH64_TLSLD_MOVW_DTPREL_G0_NC 527 ++#define R_AARCH64_TLSLD_ADD_DTPREL_HI12 528 ++#define R_AARCH64_TLSLD_ADD_DTPREL_LO12 529 ++#define R_AARCH64_TLSLD_ADD_DTPREL_LO12_NC 530 ++#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12 531 ++#define R_AARCH64_TLSLD_LDST8_DTPREL_LO12_NC 532 ++#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12 533 ++#define R_AARCH64_TLSLD_LDST16_DTPREL_LO12_NC 534 ++#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12 535 ++#define R_AARCH64_TLSLD_LDST32_DTPREL_LO12_NC 536 ++#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12 537 ++#define R_AARCH64_TLSLD_LDST64_DTPREL_LO12_NC 538 ++#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G1 539 ++#define R_AARCH64_TLSIE_MOVW_GOTTPREL_G0_NC 540 ++#define R_AARCH64_TLSIE_ADR_GOTTPREL_PAGE21 541 ++#define R_AARCH64_TLSIE_LD64_GOTTPREL_LO12_NC 542 ++#define R_AARCH64_TLSIE_LD_GOTTPREL_PREL19 543 ++#define R_AARCH64_TLSLE_MOVW_TPREL_G2 544 ++#define R_AARCH64_TLSLE_MOVW_TPREL_G1 545 ++#define R_AARCH64_TLSLE_MOVW_TPREL_G1_NC 546 ++#define R_AARCH64_TLSLE_MOVW_TPREL_G0 547 ++#define R_AARCH64_TLSLE_MOVW_TPREL_G0_NC 548 ++#define R_AARCH64_TLSLE_ADD_TPREL_HI12 549 ++#define R_AARCH64_TLSLE_ADD_TPREL_LO12 550 ++#define R_AARCH64_TLSLE_ADD_TPREL_LO12_NC 551 ++#define R_AARCH64_TLSLE_LDST8_TPREL_LO12 552 ++#define R_AARCH64_TLSLE_LDST8_TPREL_LO12_NC 553 ++#define R_AARCH64_TLSLE_LDST16_TPREL_LO12 554 ++#define R_AARCH64_TLSLE_LDST16_TPREL_LO12_NC 555 ++#define R_AARCH64_TLSLE_LDST32_TPREL_LO12 556 ++#define R_AARCH64_TLSLE_LDST32_TPREL_LO12_NC 557 ++#define R_AARCH64_TLSLE_LDST64_TPREL_LO12 558 ++#define R_AARCH64_TLSLE_LDST64_TPREL_LO12_NC 559 ++#define R_AARCH64_TLSDESC_LD_PREL19 560 ++#define R_AARCH64_TLSDESC_ADR_PREL21 561 ++#define R_AARCH64_TLSDESC_ADR_PAGE21 562 ++#define R_AARCH64_TLSDESC_LD64_LO12 563 ++#define R_AARCH64_TLSDESC_ADD_LO12 564 ++#define R_AARCH64_TLSDESC_OFF_G1 565 ++#define R_AARCH64_TLSDESC_OFF_G0_NC 566 ++#define R_AARCH64_TLSDESC_LDR 567 ++#define R_AARCH64_TLSDESC_ADD 568 ++#define R_AARCH64_TLSDESC_CALL 569 ++#define R_AARCH64_TLSLE_LDST128_TPREL_LO12 570 ++#define R_AARCH64_TLSLE_LDST128_TPREL_LO12_NC 571 ++#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12 572 ++#define R_AARCH64_TLSLD_LDST128_DTPREL_LO12_NC 573 ++#define R_AARCH64_COPY 1024 ++#define R_AARCH64_GLOB_DAT 1025 ++#define R_AARCH64_JUMP_SLOT 1026 ++#define R_AARCH64_RELATIVE 1027 ++#define R_AARCH64_TLS_DTPMOD 1028 ++#define R_AARCH64_TLS_DTPMOD64 1028 ++#define R_AARCH64_TLS_DTPREL 1029 ++#define R_AARCH64_TLS_DTPREL64 1029 ++#define R_AARCH64_TLS_TPREL 1030 ++#define R_AARCH64_TLS_TPREL64 1030 ++#define R_AARCH64_TLSDESC 1031 ++ ++ ++#define R_ARM_NONE 0 ++#define R_ARM_PC24 1 ++#define R_ARM_ABS32 2 ++#define R_ARM_REL32 3 ++#define R_ARM_PC13 4 ++#define R_ARM_ABS16 5 ++#define R_ARM_ABS12 6 ++#define R_ARM_THM_ABS5 7 ++#define R_ARM_ABS8 8 ++#define R_ARM_SBREL32 9 ++#define R_ARM_THM_PC22 10 ++#define R_ARM_THM_PC8 11 ++#define R_ARM_AMP_VCALL9 12 ++#define R_ARM_TLS_DESC 13 ++#define R_ARM_THM_SWI8 14 ++#define R_ARM_XPC25 15 ++#define R_ARM_THM_XPC22 16 ++#define R_ARM_TLS_DTPMOD32 17 ++#define R_ARM_TLS_DTPOFF32 18 ++#define R_ARM_TLS_TPOFF32 19 ++#define R_ARM_COPY 20 ++#define R_ARM_GLOB_DAT 21 ++#define R_ARM_JUMP_SLOT 22 ++#define R_ARM_RELATIVE 23 ++#define R_ARM_GOTOFF 24 ++#define R_ARM_GOTPC 25 ++#define R_ARM_GOT32 26 ++#define R_ARM_PLT32 27 ++#define R_ARM_CALL 28 ++#define R_ARM_JUMP24 29 ++#define R_ARM_THM_JUMP24 30 ++#define R_ARM_BASE_ABS 31 ++#define R_ARM_ALU_PCREL_7_0 32 ++#define R_ARM_ALU_PCREL_15_8 33 ++#define R_ARM_ALU_PCREL_23_15 34 ++#define R_ARM_LDR_SBREL_11_0 35 ++#define R_ARM_ALU_SBREL_19_12 36 ++#define R_ARM_ALU_SBREL_27_20 37 ++#define R_ARM_TARGET1 38 ++#define R_ARM_SBREL31 39 ++#define R_ARM_V4BX 40 ++#define R_ARM_TARGET2 41 ++#define R_ARM_PREL31 42 ++#define R_ARM_MOVW_ABS_NC 43 ++#define R_ARM_MOVT_ABS 44 ++#define R_ARM_MOVW_PREL_NC 45 ++#define R_ARM_MOVT_PREL 46 ++#define R_ARM_THM_MOVW_ABS_NC 47 ++#define R_ARM_THM_MOVT_ABS 48 ++#define R_ARM_THM_MOVW_PREL_NC 49 ++#define R_ARM_THM_MOVT_PREL 50 ++#define R_ARM_THM_JUMP19 51 ++#define R_ARM_THM_JUMP6 52 ++#define R_ARM_THM_ALU_PREL_11_0 53 ++#define R_ARM_THM_PC12 54 ++#define R_ARM_ABS32_NOI 55 ++#define R_ARM_REL32_NOI 56 ++#define R_ARM_ALU_PC_G0_NC 57 ++#define R_ARM_ALU_PC_G0 58 ++#define R_ARM_ALU_PC_G1_NC 59 ++#define R_ARM_ALU_PC_G1 60 ++#define R_ARM_ALU_PC_G2 61 ++#define R_ARM_LDR_PC_G1 62 ++#define R_ARM_LDR_PC_G2 63 ++#define R_ARM_LDRS_PC_G0 64 ++#define R_ARM_LDRS_PC_G1 65 ++#define R_ARM_LDRS_PC_G2 66 ++#define R_ARM_LDC_PC_G0 67 ++#define R_ARM_LDC_PC_G1 68 ++#define R_ARM_LDC_PC_G2 69 ++#define R_ARM_ALU_SB_G0_NC 70 ++#define R_ARM_ALU_SB_G0 71 ++#define R_ARM_ALU_SB_G1_NC 72 ++#define R_ARM_ALU_SB_G1 73 ++#define R_ARM_ALU_SB_G2 74 ++#define R_ARM_LDR_SB_G0 75 ++#define R_ARM_LDR_SB_G1 76 ++#define R_ARM_LDR_SB_G2 77 ++#define R_ARM_LDRS_SB_G0 78 ++#define R_ARM_LDRS_SB_G1 79 ++#define R_ARM_LDRS_SB_G2 80 ++#define R_ARM_LDC_SB_G0 81 ++#define R_ARM_LDC_SB_G1 82 ++#define R_ARM_LDC_SB_G2 83 ++#define R_ARM_MOVW_BREL_NC 84 ++#define R_ARM_MOVT_BREL 85 ++#define R_ARM_MOVW_BREL 86 ++#define R_ARM_THM_MOVW_BREL_NC 87 ++#define R_ARM_THM_MOVT_BREL 88 ++#define R_ARM_THM_MOVW_BREL 89 ++#define R_ARM_TLS_GOTDESC 90 ++#define R_ARM_TLS_CALL 91 ++#define R_ARM_TLS_DESCSEQ 92 ++#define R_ARM_THM_TLS_CALL 93 ++#define R_ARM_PLT32_ABS 94 ++#define R_ARM_GOT_ABS 95 ++#define R_ARM_GOT_PREL 96 ++#define R_ARM_GOT_BREL12 97 ++#define R_ARM_GOTOFF12 98 ++#define R_ARM_GOTRELAX 99 ++#define R_ARM_GNU_VTENTRY 100 ++#define R_ARM_GNU_VTINHERIT 101 ++#define R_ARM_THM_PC11 102 ++#define R_ARM_THM_PC9 103 ++#define R_ARM_TLS_GD32 104 ++ ++#define R_ARM_TLS_LDM32 105 ++ ++#define R_ARM_TLS_LDO32 106 ++ ++#define R_ARM_TLS_IE32 107 ++ ++#define R_ARM_TLS_LE32 108 ++#define R_ARM_TLS_LDO12 109 ++#define R_ARM_TLS_LE12 110 ++#define R_ARM_TLS_IE12GP 111 ++#define R_ARM_ME_TOO 128 ++#define R_ARM_THM_TLS_DESCSEQ 129 ++#define R_ARM_THM_TLS_DESCSEQ16 129 ++#define R_ARM_THM_TLS_DESCSEQ32 130 ++#define R_ARM_THM_GOT_BREL12 131 ++#define R_ARM_IRELATIVE 160 ++#define R_ARM_RXPC25 249 ++#define R_ARM_RSBREL32 250 ++#define R_ARM_THM_RPC22 251 ++#define R_ARM_RREL32 252 ++#define R_ARM_RABS22 253 ++#define R_ARM_RPC24 254 ++#define R_ARM_RBASE 255 ++ ++#define R_ARM_NUM 256 ++ ++ ++#define R_CKCORE_NONE 0 ++#define R_CKCORE_ADDR32 1 ++#define R_CKCORE_PCRELIMM8BY4 2 ++#define R_CKCORE_PCRELIMM11BY2 3 ++#define R_CKCORE_PCREL32 5 ++#define R_CKCORE_PCRELJSR_IMM11BY2 6 ++#define R_CKCORE_RELATIVE 9 ++#define R_CKCORE_COPY 10 ++#define R_CKCORE_GLOB_DAT 11 ++#define R_CKCORE_JUMP_SLOT 12 ++#define R_CKCORE_GOTOFF 13 ++#define R_CKCORE_GOTPC 14 ++#define R_CKCORE_GOT32 15 ++#define R_CKCORE_PLT32 16 ++#define R_CKCORE_ADDRGOT 17 ++#define R_CKCORE_ADDRPLT 18 ++#define R_CKCORE_PCREL_IMM26BY2 19 ++#define R_CKCORE_PCREL_IMM16BY2 20 ++#define R_CKCORE_PCREL_IMM16BY4 21 ++#define R_CKCORE_PCREL_IMM10BY2 22 ++#define R_CKCORE_PCREL_IMM10BY4 23 ++#define R_CKCORE_ADDR_HI16 24 ++#define R_CKCORE_ADDR_LO16 25 ++#define R_CKCORE_GOTPC_HI16 26 ++#define R_CKCORE_GOTPC_LO16 27 ++#define R_CKCORE_GOTOFF_HI16 28 ++#define R_CKCORE_GOTOFF_LO16 29 ++#define R_CKCORE_GOT12 30 ++#define R_CKCORE_GOT_HI16 31 ++#define R_CKCORE_GOT_LO16 32 ++#define R_CKCORE_PLT12 33 ++#define R_CKCORE_PLT_HI16 34 ++#define R_CKCORE_PLT_LO16 35 ++#define R_CKCORE_ADDRGOT_HI16 36 ++#define R_CKCORE_ADDRGOT_LO16 37 ++#define R_CKCORE_ADDRPLT_HI16 38 ++#define R_CKCORE_ADDRPLT_LO16 39 ++#define R_CKCORE_PCREL_JSR_IMM26BY2 40 ++#define R_CKCORE_TOFFSET_LO16 41 ++#define R_CKCORE_DOFFSET_LO16 42 ++#define R_CKCORE_PCREL_IMM18BY2 43 ++#define R_CKCORE_DOFFSET_IMM18 44 ++#define R_CKCORE_DOFFSET_IMM18BY2 45 ++#define R_CKCORE_DOFFSET_IMM18BY4 46 ++#define R_CKCORE_GOT_IMM18BY4 48 ++#define R_CKCORE_PLT_IMM18BY4 49 ++#define R_CKCORE_PCREL_IMM7BY4 50 ++#define R_CKCORE_TLS_LE32 51 ++#define R_CKCORE_TLS_IE32 52 ++#define R_CKCORE_TLS_GD32 53 ++#define R_CKCORE_TLS_LDM32 54 ++#define R_CKCORE_TLS_LDO32 55 ++#define R_CKCORE_TLS_DTPMOD32 56 ++#define R_CKCORE_TLS_DTPOFF32 57 ++#define R_CKCORE_TLS_TPOFF32 58 ++ ++ ++#define EF_IA_64_MASKOS 0x0000000f ++#define EF_IA_64_ABI64 0x00000010 ++#define EF_IA_64_ARCH 0xff000000 ++ ++ ++#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) ++#define PT_IA_64_UNWIND (PT_LOPROC + 1) ++#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12) ++#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13) ++#define PT_IA_64_HP_STACK (PT_LOOS + 0x14) ++ ++ ++#define PF_IA_64_NORECOV 0x80000000 ++ ++ ++#define SHT_IA_64_EXT (SHT_LOPROC + 0) ++#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) ++ ++ ++#define SHF_IA_64_SHORT 0x10000000 ++#define SHF_IA_64_NORECOV 0x20000000 ++ ++ ++#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0) ++#define DT_IA_64_NUM 1 ++ ++ ++#define R_IA64_NONE 0x00 ++#define R_IA64_IMM14 0x21 ++#define R_IA64_IMM22 0x22 ++#define R_IA64_IMM64 0x23 ++#define R_IA64_DIR32MSB 0x24 ++#define R_IA64_DIR32LSB 0x25 ++#define R_IA64_DIR64MSB 0x26 ++#define R_IA64_DIR64LSB 0x27 ++#define R_IA64_GPREL22 0x2a ++#define R_IA64_GPREL64I 0x2b ++#define R_IA64_GPREL32MSB 0x2c ++#define R_IA64_GPREL32LSB 0x2d ++#define R_IA64_GPREL64MSB 0x2e ++#define R_IA64_GPREL64LSB 0x2f ++#define R_IA64_LTOFF22 0x32 ++#define R_IA64_LTOFF64I 0x33 ++#define R_IA64_PLTOFF22 0x3a ++#define R_IA64_PLTOFF64I 0x3b ++#define R_IA64_PLTOFF64MSB 0x3e ++#define R_IA64_PLTOFF64LSB 0x3f ++#define R_IA64_FPTR64I 0x43 ++#define R_IA64_FPTR32MSB 0x44 ++#define R_IA64_FPTR32LSB 0x45 ++#define R_IA64_FPTR64MSB 0x46 ++#define R_IA64_FPTR64LSB 0x47 ++#define R_IA64_PCREL60B 0x48 ++#define R_IA64_PCREL21B 0x49 ++#define R_IA64_PCREL21M 0x4a ++#define R_IA64_PCREL21F 0x4b ++#define R_IA64_PCREL32MSB 0x4c ++#define R_IA64_PCREL32LSB 0x4d ++#define R_IA64_PCREL64MSB 0x4e ++#define R_IA64_PCREL64LSB 0x4f ++#define R_IA64_LTOFF_FPTR22 0x52 ++#define R_IA64_LTOFF_FPTR64I 0x53 ++#define R_IA64_LTOFF_FPTR32MSB 0x54 ++#define R_IA64_LTOFF_FPTR32LSB 0x55 ++#define R_IA64_LTOFF_FPTR64MSB 0x56 ++#define R_IA64_LTOFF_FPTR64LSB 0x57 ++#define R_IA64_SEGREL32MSB 0x5c ++#define R_IA64_SEGREL32LSB 0x5d ++#define R_IA64_SEGREL64MSB 0x5e ++#define R_IA64_SEGREL64LSB 0x5f ++#define R_IA64_SECREL32MSB 0x64 ++#define R_IA64_SECREL32LSB 0x65 ++#define R_IA64_SECREL64MSB 0x66 ++#define R_IA64_SECREL64LSB 0x67 ++#define R_IA64_REL32MSB 0x6c ++#define R_IA64_REL32LSB 0x6d ++#define R_IA64_REL64MSB 0x6e ++#define R_IA64_REL64LSB 0x6f ++#define R_IA64_LTV32MSB 0x74 ++#define R_IA64_LTV32LSB 0x75 ++#define R_IA64_LTV64MSB 0x76 ++#define R_IA64_LTV64LSB 0x77 ++#define R_IA64_PCREL21BI 0x79 ++#define R_IA64_PCREL22 0x7a ++#define R_IA64_PCREL64I 0x7b ++#define R_IA64_IPLTMSB 0x80 ++#define R_IA64_IPLTLSB 0x81 ++#define R_IA64_COPY 0x84 ++#define R_IA64_SUB 0x85 ++#define R_IA64_LTOFF22X 0x86 ++#define R_IA64_LDXMOV 0x87 ++#define R_IA64_TPREL14 0x91 ++#define R_IA64_TPREL22 0x92 ++#define R_IA64_TPREL64I 0x93 ++#define R_IA64_TPREL64MSB 0x96 ++#define R_IA64_TPREL64LSB 0x97 ++#define R_IA64_LTOFF_TPREL22 0x9a ++#define R_IA64_DTPMOD64MSB 0xa6 ++#define R_IA64_DTPMOD64LSB 0xa7 ++#define R_IA64_LTOFF_DTPMOD22 0xaa ++#define R_IA64_DTPREL14 0xb1 ++#define R_IA64_DTPREL22 0xb2 ++#define R_IA64_DTPREL64I 0xb3 ++#define R_IA64_DTPREL32MSB 0xb4 ++#define R_IA64_DTPREL32LSB 0xb5 ++#define R_IA64_DTPREL64MSB 0xb6 ++#define R_IA64_DTPREL64LSB 0xb7 ++#define R_IA64_LTOFF_DTPREL22 0xba ++ ++ ++#define EF_SH_MACH_MASK 0x1f ++#define EF_SH_UNKNOWN 0x0 ++#define EF_SH1 0x1 ++#define EF_SH2 0x2 ++#define EF_SH3 0x3 ++#define EF_SH_DSP 0x4 ++#define EF_SH3_DSP 0x5 ++#define EF_SH4AL_DSP 0x6 ++#define EF_SH3E 0x8 ++#define EF_SH4 0x9 ++#define EF_SH2E 0xb ++#define EF_SH4A 0xc ++#define EF_SH2A 0xd ++#define EF_SH4_NOFPU 0x10 ++#define EF_SH4A_NOFPU 0x11 ++#define EF_SH4_NOMMU_NOFPU 0x12 ++#define EF_SH2A_NOFPU 0x13 ++#define EF_SH3_NOMMU 0x14 ++#define EF_SH2A_SH4_NOFPU 0x15 ++#define EF_SH2A_SH3_NOFPU 0x16 ++#define EF_SH2A_SH4 0x17 ++#define EF_SH2A_SH3E 0x18 ++ ++#define R_SH_NONE 0 ++#define R_SH_DIR32 1 ++#define R_SH_REL32 2 ++#define R_SH_DIR8WPN 3 ++#define R_SH_IND12W 4 ++#define R_SH_DIR8WPL 5 ++#define R_SH_DIR8WPZ 6 ++#define R_SH_DIR8BP 7 ++#define R_SH_DIR8W 8 ++#define R_SH_DIR8L 9 ++#define R_SH_SWITCH16 25 ++#define R_SH_SWITCH32 26 ++#define R_SH_USES 27 ++#define R_SH_COUNT 28 ++#define R_SH_ALIGN 29 ++#define R_SH_CODE 30 ++#define R_SH_DATA 31 ++#define R_SH_LABEL 32 ++#define R_SH_SWITCH8 33 ++#define R_SH_GNU_VTINHERIT 34 ++#define R_SH_GNU_VTENTRY 35 ++#define R_SH_TLS_GD_32 144 ++#define R_SH_TLS_LD_32 145 ++#define R_SH_TLS_LDO_32 146 ++#define R_SH_TLS_IE_32 147 ++#define R_SH_TLS_LE_32 148 ++#define R_SH_TLS_DTPMOD32 149 ++#define R_SH_TLS_DTPOFF32 150 ++#define R_SH_TLS_TPOFF32 151 ++#define R_SH_GOT32 160 ++#define R_SH_PLT32 161 ++#define R_SH_COPY 162 ++#define R_SH_GLOB_DAT 163 ++#define R_SH_JMP_SLOT 164 ++#define R_SH_RELATIVE 165 ++#define R_SH_GOTOFF 166 ++#define R_SH_GOTPC 167 ++#define R_SH_GOT20 201 ++#define R_SH_GOTOFF20 202 ++#define R_SH_GOTFUNCDESC 203 ++#define R_SH_GOTFUNCDEST20 204 ++#define R_SH_GOTOFFFUNCDESC 205 ++#define R_SH_GOTOFFFUNCDEST20 206 ++#define R_SH_FUNCDESC 207 ++#define R_SH_FUNCDESC_VALUE 208 ++ ++#define R_SH_NUM 256 ++ ++ ++ ++#define R_390_NONE 0 ++#define R_390_8 1 ++#define R_390_12 2 ++#define R_390_16 3 ++#define R_390_32 4 ++#define R_390_PC32 5 ++#define R_390_GOT12 6 ++#define R_390_GOT32 7 ++#define R_390_PLT32 8 ++#define R_390_COPY 9 ++#define R_390_GLOB_DAT 10 ++#define R_390_JMP_SLOT 11 ++#define R_390_RELATIVE 12 ++#define R_390_GOTOFF32 13 ++#define R_390_GOTPC 14 ++#define R_390_GOT16 15 ++#define R_390_PC16 16 ++#define R_390_PC16DBL 17 ++#define R_390_PLT16DBL 18 ++#define R_390_PC32DBL 19 ++#define R_390_PLT32DBL 20 ++#define R_390_GOTPCDBL 21 ++#define R_390_64 22 ++#define R_390_PC64 23 ++#define R_390_GOT64 24 ++#define R_390_PLT64 25 ++#define R_390_GOTENT 26 ++#define R_390_GOTOFF16 27 ++#define R_390_GOTOFF64 28 ++#define R_390_GOTPLT12 29 ++#define R_390_GOTPLT16 30 ++#define R_390_GOTPLT32 31 ++#define R_390_GOTPLT64 32 ++#define R_390_GOTPLTENT 33 ++#define R_390_PLTOFF16 34 ++#define R_390_PLTOFF32 35 ++#define R_390_PLTOFF64 36 ++#define R_390_TLS_LOAD 37 ++#define R_390_TLS_GDCALL 38 ++ ++#define R_390_TLS_LDCALL 39 ++ ++#define R_390_TLS_GD32 40 ++ ++#define R_390_TLS_GD64 41 ++ ++#define R_390_TLS_GOTIE12 42 ++ ++#define R_390_TLS_GOTIE32 43 ++ ++#define R_390_TLS_GOTIE64 44 ++ ++#define R_390_TLS_LDM32 45 ++ ++#define R_390_TLS_LDM64 46 ++ ++#define R_390_TLS_IE32 47 ++ ++#define R_390_TLS_IE64 48 ++ ++#define R_390_TLS_IEENT 49 ++ ++#define R_390_TLS_LE32 50 ++ ++#define R_390_TLS_LE64 51 ++ ++#define R_390_TLS_LDO32 52 ++ ++#define R_390_TLS_LDO64 53 ++ ++#define R_390_TLS_DTPMOD 54 ++#define R_390_TLS_DTPOFF 55 ++#define R_390_TLS_TPOFF 56 ++ ++#define R_390_20 57 ++#define R_390_GOT20 58 ++#define R_390_GOTPLT20 59 ++#define R_390_TLS_GOTIE20 60 ++ ++ ++#define R_390_NUM 61 ++ ++ ++ ++#define R_CRIS_NONE 0 ++#define R_CRIS_8 1 ++#define R_CRIS_16 2 ++#define R_CRIS_32 3 ++#define R_CRIS_8_PCREL 4 ++#define R_CRIS_16_PCREL 5 ++#define R_CRIS_32_PCREL 6 ++#define R_CRIS_GNU_VTINHERIT 7 ++#define R_CRIS_GNU_VTENTRY 8 ++#define R_CRIS_COPY 9 ++#define R_CRIS_GLOB_DAT 10 ++#define R_CRIS_JUMP_SLOT 11 ++#define R_CRIS_RELATIVE 12 ++#define R_CRIS_16_GOT 13 ++#define R_CRIS_32_GOT 14 ++#define R_CRIS_16_GOTPLT 15 ++#define R_CRIS_32_GOTPLT 16 ++#define R_CRIS_32_GOTREL 17 ++#define R_CRIS_32_PLT_GOTREL 18 ++#define R_CRIS_32_PLT_PCREL 19 ++ ++#define R_CRIS_NUM 20 ++ ++ ++ ++#define R_X86_64_NONE 0 ++#define R_X86_64_64 1 ++#define R_X86_64_PC32 2 ++#define R_X86_64_GOT32 3 ++#define R_X86_64_PLT32 4 ++#define R_X86_64_COPY 5 ++#define R_X86_64_GLOB_DAT 6 ++#define R_X86_64_JUMP_SLOT 7 ++#define R_X86_64_RELATIVE 8 ++#define R_X86_64_GOTPCREL 9 ++ ++#define R_X86_64_32 10 ++#define R_X86_64_32S 11 ++#define R_X86_64_16 12 ++#define R_X86_64_PC16 13 ++#define R_X86_64_8 14 ++#define R_X86_64_PC8 15 ++#define R_X86_64_DTPMOD64 16 ++#define R_X86_64_DTPOFF64 17 ++#define R_X86_64_TPOFF64 18 ++#define R_X86_64_TLSGD 19 ++ ++#define R_X86_64_TLSLD 20 ++ ++#define R_X86_64_DTPOFF32 21 ++#define R_X86_64_GOTTPOFF 22 ++ ++#define R_X86_64_TPOFF32 23 ++#define R_X86_64_PC64 24 ++#define R_X86_64_GOTOFF64 25 ++#define R_X86_64_GOTPC32 26 ++#define R_X86_64_GOT64 27 ++#define R_X86_64_GOTPCREL64 28 ++#define R_X86_64_GOTPC64 29 ++#define R_X86_64_GOTPLT64 30 ++#define R_X86_64_PLTOFF64 31 ++#define R_X86_64_SIZE32 32 ++#define R_X86_64_SIZE64 33 ++ ++#define R_X86_64_GOTPC32_TLSDESC 34 ++#define R_X86_64_TLSDESC_CALL 35 ++ ++#define R_X86_64_TLSDESC 36 ++#define R_X86_64_IRELATIVE 37 ++#define R_X86_64_RELATIVE64 38 ++#define R_X86_64_GOTPCRELX 41 ++#define R_X86_64_REX_GOTPCRELX 42 ++#define R_X86_64_NUM 43 ++ ++ ++ ++#define R_MN10300_NONE 0 ++#define R_MN10300_32 1 ++#define R_MN10300_16 2 ++#define R_MN10300_8 3 ++#define R_MN10300_PCREL32 4 ++#define R_MN10300_PCREL16 5 ++#define R_MN10300_PCREL8 6 ++#define R_MN10300_GNU_VTINHERIT 7 ++#define R_MN10300_GNU_VTENTRY 8 ++#define R_MN10300_24 9 ++#define R_MN10300_GOTPC32 10 ++#define R_MN10300_GOTPC16 11 ++#define R_MN10300_GOTOFF32 12 ++#define R_MN10300_GOTOFF24 13 ++#define R_MN10300_GOTOFF16 14 ++#define R_MN10300_PLT32 15 ++#define R_MN10300_PLT16 16 ++#define R_MN10300_GOT32 17 ++#define R_MN10300_GOT24 18 ++#define R_MN10300_GOT16 19 ++#define R_MN10300_COPY 20 ++#define R_MN10300_GLOB_DAT 21 ++#define R_MN10300_JMP_SLOT 22 ++#define R_MN10300_RELATIVE 23 ++ ++#define R_MN10300_NUM 24 ++ ++ ++ ++#define R_M32R_NONE 0 ++#define R_M32R_16 1 ++#define R_M32R_32 2 ++#define R_M32R_24 3 ++#define R_M32R_10_PCREL 4 ++#define R_M32R_18_PCREL 5 ++#define R_M32R_26_PCREL 6 ++#define R_M32R_HI16_ULO 7 ++#define R_M32R_HI16_SLO 8 ++#define R_M32R_LO16 9 ++#define R_M32R_SDA16 10 ++#define R_M32R_GNU_VTINHERIT 11 ++#define R_M32R_GNU_VTENTRY 12 ++ ++#define R_M32R_16_RELA 33 ++#define R_M32R_32_RELA 34 ++#define R_M32R_24_RELA 35 ++#define R_M32R_10_PCREL_RELA 36 ++#define R_M32R_18_PCREL_RELA 37 ++#define R_M32R_26_PCREL_RELA 38 ++#define R_M32R_HI16_ULO_RELA 39 ++#define R_M32R_HI16_SLO_RELA 40 ++#define R_M32R_LO16_RELA 41 ++#define R_M32R_SDA16_RELA 42 ++#define R_M32R_RELA_GNU_VTINHERIT 43 ++#define R_M32R_RELA_GNU_VTENTRY 44 ++#define R_M32R_REL32 45 ++ ++#define R_M32R_GOT24 48 ++#define R_M32R_26_PLTREL 49 ++#define R_M32R_COPY 50 ++#define R_M32R_GLOB_DAT 51 ++#define R_M32R_JMP_SLOT 52 ++#define R_M32R_RELATIVE 53 ++#define R_M32R_GOTOFF 54 ++#define R_M32R_GOTPC24 55 ++#define R_M32R_GOT16_HI_ULO 56 ++ ++#define R_M32R_GOT16_HI_SLO 57 ++ ++#define R_M32R_GOT16_LO 58 ++#define R_M32R_GOTPC_HI_ULO 59 ++ ++#define R_M32R_GOTPC_HI_SLO 60 ++ ++#define R_M32R_GOTPC_LO 61 ++ ++#define R_M32R_GOTOFF_HI_ULO 62 ++ ++#define R_M32R_GOTOFF_HI_SLO 63 ++ ++#define R_M32R_GOTOFF_LO 64 ++#define R_M32R_NUM 256 ++ ++#define R_MICROBLAZE_NONE 0 ++#define R_MICROBLAZE_32 1 ++#define R_MICROBLAZE_32_PCREL 2 ++#define R_MICROBLAZE_64_PCREL 3 ++#define R_MICROBLAZE_32_PCREL_LO 4 ++#define R_MICROBLAZE_64 5 ++#define R_MICROBLAZE_32_LO 6 ++#define R_MICROBLAZE_SRO32 7 ++#define R_MICROBLAZE_SRW32 8 ++#define R_MICROBLAZE_64_NONE 9 ++#define R_MICROBLAZE_32_SYM_OP_SYM 10 ++#define R_MICROBLAZE_GNU_VTINHERIT 11 ++#define R_MICROBLAZE_GNU_VTENTRY 12 ++#define R_MICROBLAZE_GOTPC_64 13 ++#define R_MICROBLAZE_GOT_64 14 ++#define R_MICROBLAZE_PLT_64 15 ++#define R_MICROBLAZE_REL 16 ++#define R_MICROBLAZE_JUMP_SLOT 17 ++#define R_MICROBLAZE_GLOB_DAT 18 ++#define R_MICROBLAZE_GOTOFF_64 19 ++#define R_MICROBLAZE_GOTOFF_32 20 ++#define R_MICROBLAZE_COPY 21 ++#define R_MICROBLAZE_TLS 22 ++#define R_MICROBLAZE_TLSGD 23 ++#define R_MICROBLAZE_TLSLD 24 ++#define R_MICROBLAZE_TLSDTPMOD32 25 ++#define R_MICROBLAZE_TLSDTPREL32 26 ++#define R_MICROBLAZE_TLSDTPREL64 27 ++#define R_MICROBLAZE_TLSGOTTPREL32 28 ++#define R_MICROBLAZE_TLSTPREL32 29 ++ ++#define DT_NIOS2_GP 0x70000002 ++ ++#define R_NIOS2_NONE 0 ++#define R_NIOS2_S16 1 ++#define R_NIOS2_U16 2 ++#define R_NIOS2_PCREL16 3 ++#define R_NIOS2_CALL26 4 ++#define R_NIOS2_IMM5 5 ++#define R_NIOS2_CACHE_OPX 6 ++#define R_NIOS2_IMM6 7 ++#define R_NIOS2_IMM8 8 ++#define R_NIOS2_HI16 9 ++#define R_NIOS2_LO16 10 ++#define R_NIOS2_HIADJ16 11 ++#define R_NIOS2_BFD_RELOC_32 12 ++#define R_NIOS2_BFD_RELOC_16 13 ++#define R_NIOS2_BFD_RELOC_8 14 ++#define R_NIOS2_GPREL 15 ++#define R_NIOS2_GNU_VTINHERIT 16 ++#define R_NIOS2_GNU_VTENTRY 17 ++#define R_NIOS2_UJMP 18 ++#define R_NIOS2_CJMP 19 ++#define R_NIOS2_CALLR 20 ++#define R_NIOS2_ALIGN 21 ++#define R_NIOS2_GOT16 22 ++#define R_NIOS2_CALL16 23 ++#define R_NIOS2_GOTOFF_LO 24 ++#define R_NIOS2_GOTOFF_HA 25 ++#define R_NIOS2_PCREL_LO 26 ++#define R_NIOS2_PCREL_HA 27 ++#define R_NIOS2_TLS_GD16 28 ++#define R_NIOS2_TLS_LDM16 29 ++#define R_NIOS2_TLS_LDO16 30 ++#define R_NIOS2_TLS_IE16 31 ++#define R_NIOS2_TLS_LE16 32 ++#define R_NIOS2_TLS_DTPMOD 33 ++#define R_NIOS2_TLS_DTPREL 34 ++#define R_NIOS2_TLS_TPREL 35 ++#define R_NIOS2_COPY 36 ++#define R_NIOS2_GLOB_DAT 37 ++#define R_NIOS2_JUMP_SLOT 38 ++#define R_NIOS2_RELATIVE 39 ++#define R_NIOS2_GOTOFF 40 ++#define R_NIOS2_CALL26_NOAT 41 ++#define R_NIOS2_GOT_LO 42 ++#define R_NIOS2_GOT_HA 43 ++#define R_NIOS2_CALL_LO 44 ++#define R_NIOS2_CALL_HA 45 ++ ++#define R_OR1K_NONE 0 ++#define R_OR1K_32 1 ++#define R_OR1K_16 2 ++#define R_OR1K_8 3 ++#define R_OR1K_LO_16_IN_INSN 4 ++#define R_OR1K_HI_16_IN_INSN 5 ++#define R_OR1K_INSN_REL_26 6 ++#define R_OR1K_GNU_VTENTRY 7 ++#define R_OR1K_GNU_VTINHERIT 8 ++#define R_OR1K_32_PCREL 9 ++#define R_OR1K_16_PCREL 10 ++#define R_OR1K_8_PCREL 11 ++#define R_OR1K_GOTPC_HI16 12 ++#define R_OR1K_GOTPC_LO16 13 ++#define R_OR1K_GOT16 14 ++#define R_OR1K_PLT26 15 ++#define R_OR1K_GOTOFF_HI16 16 ++#define R_OR1K_GOTOFF_LO16 17 ++#define R_OR1K_COPY 18 ++#define R_OR1K_GLOB_DAT 19 ++#define R_OR1K_JMP_SLOT 20 ++#define R_OR1K_RELATIVE 21 ++#define R_OR1K_TLS_GD_HI16 22 ++#define R_OR1K_TLS_GD_LO16 23 ++#define R_OR1K_TLS_LDM_HI16 24 ++#define R_OR1K_TLS_LDM_LO16 25 ++#define R_OR1K_TLS_LDO_HI16 26 ++#define R_OR1K_TLS_LDO_LO16 27 ++#define R_OR1K_TLS_IE_HI16 28 ++#define R_OR1K_TLS_IE_LO16 29 ++#define R_OR1K_TLS_LE_HI16 30 ++#define R_OR1K_TLS_LE_LO16 31 ++#define R_OR1K_TLS_TPOFF 32 ++#define R_OR1K_TLS_DTPOFF 33 ++#define R_OR1K_TLS_DTPMOD 34 ++ ++#define R_BPF_NONE 0 ++#define R_BPF_MAP_FD 1 ++ ++#define R_RISCV_NONE 0 ++#define R_RISCV_32 1 ++#define R_RISCV_64 2 ++#define R_RISCV_RELATIVE 3 ++#define R_RISCV_COPY 4 ++#define R_RISCV_JUMP_SLOT 5 ++#define R_RISCV_TLS_DTPMOD32 6 ++#define R_RISCV_TLS_DTPMOD64 7 ++#define R_RISCV_TLS_DTPREL32 8 ++#define R_RISCV_TLS_DTPREL64 9 ++#define R_RISCV_TLS_TPREL32 10 ++#define R_RISCV_TLS_TPREL64 11 ++ ++#define R_RISCV_BRANCH 16 ++#define R_RISCV_JAL 17 ++#define R_RISCV_CALL 18 ++#define R_RISCV_CALL_PLT 19 ++#define R_RISCV_GOT_HI20 20 ++#define R_RISCV_TLS_GOT_HI20 21 ++#define R_RISCV_TLS_GD_HI20 22 ++#define R_RISCV_PCREL_HI20 23 ++#define R_RISCV_PCREL_LO12_I 24 ++#define R_RISCV_PCREL_LO12_S 25 ++#define R_RISCV_HI20 26 ++#define R_RISCV_LO12_I 27 ++#define R_RISCV_LO12_S 28 ++#define R_RISCV_TPREL_HI20 29 ++#define R_RISCV_TPREL_LO12_I 30 ++#define R_RISCV_TPREL_LO12_S 31 ++#define R_RISCV_TPREL_ADD 32 ++#define R_RISCV_ADD8 33 ++#define R_RISCV_ADD16 34 ++#define R_RISCV_ADD32 35 ++#define R_RISCV_ADD64 36 ++#define R_RISCV_SUB8 37 ++#define R_RISCV_SUB16 38 ++#define R_RISCV_SUB32 39 ++#define R_RISCV_SUB64 40 ++#define R_RISCV_GNU_VTINHERIT 41 ++#define R_RISCV_GNU_VTENTRY 42 ++#define R_RISCV_ALIGN 43 ++#define R_RISCV_RVC_BRANCH 44 ++#define R_RISCV_RVC_JUMP 45 ++#define R_RISCV_RVC_LUI 46 ++#define R_RISCV_GPREL_I 47 ++#define R_RISCV_GPREL_S 48 ++#define R_RISCV_TPREL_I 49 ++#define R_RISCV_TPREL_S 50 ++#define R_RISCV_RELAX 51 ++#define R_RISCV_SUB6 52 ++#define R_RISCV_SET6 53 ++#define R_RISCV_SET8 54 ++#define R_RISCV_SET16 55 ++#define R_RISCV_SET32 56 ++#define R_RISCV_32_PCREL 57 ++ ++#ifdef __cplusplus ++} ++#endif ++ ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/endian.h b/build/ohos/ohos-sysroot/usr/include/endian.h +new file mode 100644 +index 0000000..172c432 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/endian.h +@@ -0,0 +1,80 @@ ++#ifndef _ENDIAN_H ++#define _ENDIAN_H ++ ++#include ++ ++#define __NEED_uint16_t ++#define __NEED_uint32_t ++#define __NEED_uint64_t ++ ++#include ++ ++#define __PDP_ENDIAN 3412 ++ ++#define BIG_ENDIAN __BIG_ENDIAN ++#define LITTLE_ENDIAN __LITTLE_ENDIAN ++#define PDP_ENDIAN __PDP_ENDIAN ++#define BYTE_ORDER __BYTE_ORDER ++ ++static __inline uint16_t __bswap16(uint16_t __x) ++{ ++ return __x<<8 | __x>>8; ++} ++ ++static __inline uint32_t __bswap32(uint32_t __x) ++{ ++ return __x>>24 | __x>>8&0xff00 | __x<<8&0xff0000 | __x<<24; ++} ++ ++static __inline uint64_t __bswap64(uint64_t __x) ++{ ++ return __bswap32(__x)+0ULL<<32 | __bswap32(__x>>32); ++} ++ ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define htobe16(x) __bswap16(x) ++#define be16toh(x) __bswap16(x) ++#define htobe32(x) __bswap32(x) ++#define be32toh(x) __bswap32(x) ++#define htobe64(x) __bswap64(x) ++#define be64toh(x) __bswap64(x) ++#define htole16(x) (uint16_t)(x) ++#define le16toh(x) (uint16_t)(x) ++#define htole32(x) (uint32_t)(x) ++#define le32toh(x) (uint32_t)(x) ++#define htole64(x) (uint64_t)(x) ++#define le64toh(x) (uint64_t)(x) ++#else ++#define htobe16(x) (uint16_t)(x) ++#define be16toh(x) (uint16_t)(x) ++#define htobe32(x) (uint32_t)(x) ++#define be32toh(x) (uint32_t)(x) ++#define htobe64(x) (uint64_t)(x) ++#define be64toh(x) (uint64_t)(x) ++#define htole16(x) __bswap16(x) ++#define le16toh(x) __bswap16(x) ++#define htole32(x) __bswap32(x) ++#define le32toh(x) __bswap32(x) ++#define htole64(x) __bswap64(x) ++#define le64toh(x) __bswap64(x) ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#if __BYTE_ORDER == __LITTLE_ENDIAN ++#define betoh16(x) __bswap16(x) ++#define betoh32(x) __bswap32(x) ++#define betoh64(x) __bswap64(x) ++#define letoh16(x) (uint16_t)(x) ++#define letoh32(x) (uint32_t)(x) ++#define letoh64(x) (uint64_t)(x) ++#else ++#define betoh16(x) (uint16_t)(x) ++#define betoh32(x) (uint32_t)(x) ++#define betoh64(x) (uint64_t)(x) ++#define letoh16(x) __bswap16(x) ++#define letoh32(x) __bswap32(x) ++#define letoh64(x) __bswap64(x) ++#endif ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/err.h b/build/ohos/ohos-sysroot/usr/include/err.h +new file mode 100644 +index 0000000..9f5cb6b +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/err.h +@@ -0,0 +1,25 @@ ++#ifndef _ERR_H ++#define _ERR_H ++ ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++void warn(const char *, ...); ++void vwarn(const char *, va_list); ++void warnx(const char *, ...); ++void vwarnx(const char *, va_list); ++ ++_Noreturn void err(int, const char *, ...); ++_Noreturn void verr(int, const char *, va_list); ++_Noreturn void errx(int, const char *, ...); ++_Noreturn void verrx(int, const char *, va_list); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/errno.h b/build/ohos/ohos-sysroot/usr/include/errno.h +new file mode 100644 +index 0000000..0361b33 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/errno.h +@@ -0,0 +1,27 @@ ++#ifndef _ERRNO_H ++#define _ERRNO_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#include ++ ++#ifdef __GNUC__ ++__attribute__((const)) ++#endif ++int *__errno_location(void); ++#define errno (*__errno_location()) ++ ++#ifdef _GNU_SOURCE ++extern char *program_invocation_short_name, *program_invocation_name; ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif ++ +diff --git a/build/ohos/ohos-sysroot/usr/include/fcntl.h b/build/ohos/ohos-sysroot/usr/include/fcntl.h +new file mode 100644 +index 0000000..b664cdc +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/fcntl.h +@@ -0,0 +1,216 @@ ++#ifndef _FCNTL_H ++#define _FCNTL_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#define __NEED_off_t ++#define __NEED_pid_t ++#define __NEED_mode_t ++ ++#ifdef _GNU_SOURCE ++#define __NEED_size_t ++#define __NEED_ssize_t ++#define __NEED_struct_iovec ++#endif ++ ++#include ++ ++#include ++ ++struct flock { ++ short l_type; ++ short l_whence; ++ off_t l_start; ++ off_t l_len; ++ pid_t l_pid; ++}; ++ ++int creat(const char *, mode_t); ++int fcntl(int, int, ...); ++int open(const char *, int, ...); ++int openat(int, const char *, int, ...); ++int posix_fadvise(int, off_t, off_t, int); ++int posix_fallocate(int, off_t, off_t); ++ ++#define O_SEARCH O_PATH ++#define O_EXEC O_PATH ++#define O_TTY_INIT 0 ++ ++#define O_ACCMODE (03|O_SEARCH) ++#define O_RDONLY 00 ++#define O_WRONLY 01 ++#define O_RDWR 02 ++ ++#define F_OFD_GETLK 36 ++#define F_OFD_SETLK 37 ++#define F_OFD_SETLKW 38 ++ ++#define F_DUPFD_CLOEXEC 1030 ++ ++#define F_RDLCK 0 ++#define F_WRLCK 1 ++#define F_UNLCK 2 ++ ++#define FD_CLOEXEC 1 ++ ++#define AT_FDCWD (-100) ++#define AT_SYMLINK_NOFOLLOW 0x100 ++#define AT_REMOVEDIR 0x200 ++#define AT_SYMLINK_FOLLOW 0x400 ++#define AT_EACCESS 0x200 ++ ++#define POSIX_FADV_NORMAL 0 ++#define POSIX_FADV_RANDOM 1 ++#define POSIX_FADV_SEQUENTIAL 2 ++#define POSIX_FADV_WILLNEED 3 ++#ifndef POSIX_FADV_DONTNEED ++#define POSIX_FADV_DONTNEED 4 ++#define POSIX_FADV_NOREUSE 5 ++#endif ++ ++#undef SEEK_SET ++#undef SEEK_CUR ++#undef SEEK_END ++#define SEEK_SET 0 ++#define SEEK_CUR 1 ++#define SEEK_END 2 ++ ++#ifndef S_IRUSR ++#define S_ISUID 04000 ++#define S_ISGID 02000 ++#define S_ISVTX 01000 ++#define S_IRUSR 0400 ++#define S_IWUSR 0200 ++#define S_IXUSR 0100 ++#define S_IRWXU 0700 ++#define S_IRGRP 0040 ++#define S_IWGRP 0020 ++#define S_IXGRP 0010 ++#define S_IRWXG 0070 ++#define S_IROTH 0004 ++#define S_IWOTH 0002 ++#define S_IXOTH 0001 ++#define S_IRWXO 0007 ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++#define AT_NO_AUTOMOUNT 0x800 ++#define AT_EMPTY_PATH 0x1000 ++#define AT_STATX_SYNC_TYPE 0x6000 ++#define AT_STATX_SYNC_AS_STAT 0x0000 ++#define AT_STATX_FORCE_SYNC 0x2000 ++#define AT_STATX_DONT_SYNC 0x4000 ++#define AT_RECURSIVE 0x8000 ++ ++#define FAPPEND O_APPEND ++#define FFSYNC O_SYNC ++#define FASYNC O_ASYNC ++#define FNONBLOCK O_NONBLOCK ++#define FNDELAY O_NDELAY ++ ++#define F_OK 0 ++#define R_OK 4 ++#define W_OK 2 ++#define X_OK 1 ++#define F_ULOCK 0 ++#define F_LOCK 1 ++#define F_TLOCK 2 ++#define F_TEST 3 ++ ++#define F_SETLEASE 1024 ++#define F_GETLEASE 1025 ++#define F_NOTIFY 1026 ++#define F_CANCELLK 1029 ++#define F_SETPIPE_SZ 1031 ++#define F_GETPIPE_SZ 1032 ++#define F_ADD_SEALS 1033 ++#define F_GET_SEALS 1034 ++ ++#define F_SEAL_SEAL 0x0001 ++#define F_SEAL_SHRINK 0x0002 ++#define F_SEAL_GROW 0x0004 ++#define F_SEAL_WRITE 0x0008 ++#define F_SEAL_FUTURE_WRITE 0x0010 ++ ++#define F_GET_RW_HINT 1035 ++#define F_SET_RW_HINT 1036 ++#define F_GET_FILE_RW_HINT 1037 ++#define F_SET_FILE_RW_HINT 1038 ++ ++#define RWF_WRITE_LIFE_NOT_SET 0 ++#define RWH_WRITE_LIFE_NONE 1 ++#define RWH_WRITE_LIFE_SHORT 2 ++#define RWH_WRITE_LIFE_MEDIUM 3 ++#define RWH_WRITE_LIFE_LONG 4 ++#define RWH_WRITE_LIFE_EXTREME 5 ++ ++#define DN_ACCESS 0x00000001 ++#define DN_MODIFY 0x00000002 ++#define DN_CREATE 0x00000004 ++#define DN_DELETE 0x00000008 ++#define DN_RENAME 0x00000010 ++#define DN_ATTRIB 0x00000020 ++#define DN_MULTISHOT 0x80000000 ++ ++int lockf(int, int, off_t); ++#endif ++ ++#if defined(_GNU_SOURCE) ++#define F_OWNER_TID 0 ++#define F_OWNER_PID 1 ++#define F_OWNER_PGRP 2 ++#define F_OWNER_GID 2 ++struct file_handle { ++ unsigned handle_bytes; ++ int handle_type; ++ unsigned char f_handle[]; ++}; ++struct f_owner_ex { ++ int type; ++ pid_t pid; ++}; ++#define FALLOC_FL_KEEP_SIZE 1 ++#define FALLOC_FL_PUNCH_HOLE 2 ++#define MAX_HANDLE_SZ 128 ++#define SYNC_FILE_RANGE_WAIT_BEFORE 1 ++#define SYNC_FILE_RANGE_WRITE 2 ++#define SYNC_FILE_RANGE_WAIT_AFTER 4 ++#define SPLICE_F_MOVE 1 ++#define SPLICE_F_NONBLOCK 2 ++#define SPLICE_F_MORE 4 ++#define SPLICE_F_GIFT 8 ++int fallocate(int, int, off_t, off_t); ++#define fallocate64 fallocate ++int name_to_handle_at(int, const char *, struct file_handle *, int *, int); ++int open_by_handle_at(int, struct file_handle *, int); ++ssize_t readahead(int, off_t, size_t); ++int sync_file_range(int, off_t, off_t, unsigned); ++ssize_t vmsplice(int, const struct iovec *, size_t, unsigned); ++ssize_t splice(int, off_t *, int, off_t *, size_t, unsigned); ++ssize_t tee(int, int, size_t, unsigned); ++#define loff_t off_t ++#endif ++ ++#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) ++#define F_GETLK64 F_GETLK ++#define F_SETLK64 F_SETLK ++#define F_SETLKW64 F_SETLKW ++#define flock64 flock ++#define open64 open ++#define openat64 openat ++#define creat64 creat ++#define lockf64 lockf ++#define posix_fadvise64 posix_fadvise ++#define posix_fallocate64 posix_fallocate ++#define off64_t off_t ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/features.h b/build/ohos/ohos-sysroot/usr/include/features.h +new file mode 100644 +index 0000000..85cfb72 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/features.h +@@ -0,0 +1,40 @@ ++#ifndef _FEATURES_H ++#define _FEATURES_H ++ ++#if defined(_ALL_SOURCE) && !defined(_GNU_SOURCE) ++#define _GNU_SOURCE 1 ++#endif ++ ++#if defined(_DEFAULT_SOURCE) && !defined(_BSD_SOURCE) ++#define _BSD_SOURCE 1 ++#endif ++ ++#if !defined(_POSIX_SOURCE) && !defined(_POSIX_C_SOURCE) \ ++ && !defined(_XOPEN_SOURCE) && !defined(_GNU_SOURCE) \ ++ && !defined(_BSD_SOURCE) && !defined(__STRICT_ANSI__) ++#define _BSD_SOURCE 1 ++#define _XOPEN_SOURCE 700 ++#endif ++ ++#if __STDC_VERSION__ >= 199901L ++#define __restrict restrict ++#elif !defined(__GNUC__) ++#define __restrict ++#endif ++ ++#if __STDC_VERSION__ >= 199901L || defined(__cplusplus) ++#define __inline inline ++#elif !defined(__GNUC__) ++#define __inline ++#endif ++ ++#if __STDC_VERSION__ >= 201112L ++#elif defined(__GNUC__) ++#define _Noreturn __attribute__((__noreturn__)) ++#else ++#define _Noreturn ++#endif ++ ++#define __REDIR(x,y) __typeof__(x) x __asm__(#y) ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/fenv.h b/build/ohos/ohos-sysroot/usr/include/fenv.h +new file mode 100644 +index 0000000..05de990 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/fenv.h +@@ -0,0 +1,28 @@ ++#ifndef _FENV_H ++#define _FENV_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++int feclearexcept(int); ++int fegetexceptflag(fexcept_t *, int); ++int feraiseexcept(int); ++int fesetexceptflag(const fexcept_t *, int); ++int fetestexcept(int); ++ ++int fegetround(void); ++int fesetround(int); ++ ++int fegetenv(fenv_t *); ++int feholdexcept(fenv_t *); ++int fesetenv(const fenv_t *); ++int feupdateenv(const fenv_t *); ++ ++#ifdef __cplusplus ++} ++#endif ++#endif ++ +diff --git a/build/ohos/ohos-sysroot/usr/include/float.h b/build/ohos/ohos-sysroot/usr/include/float.h +new file mode 100644 +index 0000000..713aadb +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/float.h +@@ -0,0 +1,52 @@ ++#ifndef _FLOAT_H ++#define _FLOAT_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int __flt_rounds(void); ++#define FLT_ROUNDS (__flt_rounds()) ++ ++#define FLT_RADIX 2 ++ ++#define FLT_TRUE_MIN 1.40129846432481707092e-45F ++#define FLT_MIN 1.17549435082228750797e-38F ++#define FLT_MAX 3.40282346638528859812e+38F ++#define FLT_EPSILON 1.1920928955078125e-07F ++ ++#define FLT_MANT_DIG 24 ++#define FLT_MIN_EXP (-125) ++#define FLT_MAX_EXP 128 ++#define FLT_HAS_SUBNORM 1 ++ ++#define FLT_DIG 6 ++#define FLT_DECIMAL_DIG 9 ++#define FLT_MIN_10_EXP (-37) ++#define FLT_MAX_10_EXP 38 ++ ++#define DBL_TRUE_MIN 4.94065645841246544177e-324 ++#define DBL_MIN 2.22507385850720138309e-308 ++#define DBL_MAX 1.79769313486231570815e+308 ++#define DBL_EPSILON 2.22044604925031308085e-16 ++ ++#define DBL_MANT_DIG 53 ++#define DBL_MIN_EXP (-1021) ++#define DBL_MAX_EXP 1024 ++#define DBL_HAS_SUBNORM 1 ++ ++#define DBL_DIG 15 ++#define DBL_DECIMAL_DIG 17 ++#define DBL_MIN_10_EXP (-307) ++#define DBL_MAX_10_EXP 308 ++ ++#define LDBL_HAS_SUBNORM 1 ++#define LDBL_DECIMAL_DIG DECIMAL_DIG ++ ++#include ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/fmtmsg.h b/build/ohos/ohos-sysroot/usr/include/fmtmsg.h +new file mode 100644 +index 0000000..fd151de +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/fmtmsg.h +@@ -0,0 +1,45 @@ ++#ifndef _FMTMSG_H ++#define _FMTMSG_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define MM_HARD 1 ++#define MM_SOFT 2 ++#define MM_FIRM 4 ++ ++#define MM_APPL 8 ++#define MM_UTIL 16 ++#define MM_OPSYS 32 ++ ++#define MM_RECOVER 64 ++#define MM_NRECOV 128 ++ ++#define MM_PRINT 256 ++#define MM_CONSOLE 512 ++ ++#define MM_NULLMC 0L ++ ++#define MM_HALT 1 ++#define MM_ERROR 2 ++#define MM_WARNING 3 ++#define MM_INFO 4 ++#define MM_NOSEV 0 ++ ++#define MM_OK 0 ++#define MM_NOTOK (-1) ++#define MM_NOMSG 1 ++#define MM_NOCON 4 ++ ++#define MM_NULLLBL ((char*)0) ++#define MM_NULLTXT ((char*)0) ++#define MM_NULLACT ((char*)0) ++#define MM_NULLTAG ((char*)0) ++#define MM_NULLSEV 0 ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/fnmatch.h b/build/ohos/ohos-sysroot/usr/include/fnmatch.h +new file mode 100644 +index 0000000..f959321 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/fnmatch.h +@@ -0,0 +1,24 @@ ++#ifndef _FNMATCH_H ++#define _FNMATCH_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define FNM_PATHNAME 0x1 ++#define FNM_NOESCAPE 0x2 ++#define FNM_PERIOD 0x4 ++#define FNM_LEADING_DIR 0x8 ++#define FNM_CASEFOLD 0x10 ++#define FNM_FILE_NAME FNM_PATHNAME ++ ++#define FNM_NOMATCH 1 ++#define FNM_NOSYS (-1) ++ ++int fnmatch(const char *, const char *, int); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/ftw.h b/build/ohos/ohos-sysroot/usr/include/ftw.h +new file mode 100644 +index 0000000..b15c062 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/ftw.h +@@ -0,0 +1,41 @@ ++#ifndef _FTW_H ++#define _FTW_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++#include ++ ++#define FTW_F 1 ++#define FTW_D 2 ++#define FTW_DNR 3 ++#define FTW_NS 4 ++#define FTW_SL 5 ++#define FTW_DP 6 ++#define FTW_SLN 7 ++ ++#define FTW_PHYS 1 ++#define FTW_MOUNT 2 ++#define FTW_CHDIR 4 ++#define FTW_DEPTH 8 ++ ++struct FTW { ++ int base; ++ int level; ++}; ++ ++int ftw(const char *, int (*)(const char *, const struct stat *, int), int); ++int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int); ++ ++#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) ++#define ftw64 ftw ++#define nftw64 nftw ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/getopt.h b/build/ohos/ohos-sysroot/usr/include/getopt.h +new file mode 100644 +index 0000000..35cbd35 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/getopt.h +@@ -0,0 +1,30 @@ ++#ifndef _GETOPT_H ++#define _GETOPT_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++int getopt(int, char * const [], const char *); ++extern char *optarg; ++extern int optind, opterr, optopt, optreset; ++ ++struct option { ++ const char *name; ++ int has_arg; ++ int *flag; ++ int val; ++}; ++ ++int getopt_long(int, char *const *, const char *, const struct option *, int *); ++int getopt_long_only(int, char *const *, const char *, const struct option *, int *); ++ ++#define no_argument 0 ++#define required_argument 1 ++#define optional_argument 2 ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/glob.h b/build/ohos/ohos-sysroot/usr/include/glob.h +new file mode 100644 +index 0000000..2bd279c +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/glob.h +@@ -0,0 +1,50 @@ ++#ifndef _GLOB_H ++#define _GLOB_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#define __NEED_size_t ++ ++#include ++ ++typedef struct { ++ size_t gl_pathc; ++ char **gl_pathv; ++ size_t gl_offs; ++ int __dummy1; ++ void *__dummy2[5]; ++} glob_t; ++ ++int glob(const char *__restrict, int, int (*)(const char *, int), glob_t *__restrict); ++void globfree(glob_t *); ++ ++#define GLOB_ERR 0x01 ++#define GLOB_MARK 0x02 ++#define GLOB_NOSORT 0x04 ++#define GLOB_DOOFFS 0x08 ++#define GLOB_NOCHECK 0x10 ++#define GLOB_APPEND 0x20 ++#define GLOB_NOESCAPE 0x40 ++#define GLOB_PERIOD 0x80 ++ ++#define GLOB_TILDE 0x1000 ++#define GLOB_TILDE_CHECK 0x4000 ++ ++#define GLOB_NOSPACE 1 ++#define GLOB_ABORTED 2 ++#define GLOB_NOMATCH 3 ++#define GLOB_NOSYS 4 ++ ++#if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) ++#define glob64_t glob_t ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/grp.h b/build/ohos/ohos-sysroot/usr/include/grp.h +new file mode 100644 +index 0000000..4a94596 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/grp.h +@@ -0,0 +1,48 @@ ++#ifndef _GRP_H ++#define _GRP_H ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#include ++ ++#define __NEED_size_t ++#define __NEED_gid_t ++ ++#ifdef _GNU_SOURCE ++#define __NEED_FILE ++#endif ++ ++#include ++ ++struct group { ++ char *gr_name; ++ char *gr_passwd; ++ gid_t gr_gid; ++ char **gr_mem; ++}; ++ ++struct group *getgrgid(gid_t); ++struct group *getgrnam(const char *); ++ ++int getgrgid_r(gid_t, struct group *, char *, size_t, struct group **); ++int getgrnam_r(const char *, struct group *, char *, size_t, struct group **); ++ ++#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++struct group *getgrent(void); ++void endgrent(void); ++void setgrent(void); ++#endif ++ ++#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) ++int getgrouplist(const char *, gid_t, gid_t *, int *); ++int setgroups(size_t, const gid_t *); ++int initgroups(const char *, gid_t); ++#endif ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent.h b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent.h +new file mode 100644 +index 0000000..2b3d363 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent.h +@@ -0,0 +1,374 @@ ++/* ++ * Copyright (c) 2021 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef HIVIEWDFX_HIAPPEVENT_H ++#define HIVIEWDFX_HIAPPEVENT_H ++/** ++ * @addtogroup HiAppEvent ++ * @{ ++ * ++ * @brief Provides application event logging functions. ++ * ++ * Provides the event logging function for applications to log the fault, statistical, security, and user behavior ++ * events reported during running. Based on event information, you will be able to analyze the running status of ++ * applications. ++ * ++ * @syscap SystemCapability.HiviewDFX.HiAppEvent ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file hiappevent.h ++ * ++ * @brief Defines the application event logging functions of the HiAppEvent module. ++ * ++ * Before performing application event logging, you must construct a ParamList object to store the input ++ * event parameters and specify the event domain, event name, and event type. ++ * ++ *

Event domain: a string used to identify the domain of event logging. ++ *

Event name: a string used to identify the event name of event logging. ++ *

Event type: FAULT, STATISTIC, SECURITY, BEHAVIOR. ++ *

ParamList: a linked list used to store event parameters, each of which is comprised of the parameter name and ++ * parameter value. ++ * ++ * Sample code: ++ * 00 Including the header file: ++ *

++ *     #include "hiappevent/hiappevent.h"
++ * 
++ * 01 create a ParamList pointer. ++ *
++ *     ParamList list = OH_HiAppEvent_CreateParamList();
++ * 
++ * 02 add params to the ParamList. ++ *
++ *     bool boolean = true;
++ *     OH_HiAppEvent_AddBoolParam(list, "bool_key", boolean);
++ *     int32_t nums[] = {1, 2, 3};
++ *     OH_HiAppEvent_AddInt32ArrayParam(list, "int32_arr_key", nums, sizeof(nums) / sizeof(nums[0]));
++ * 
++ * 03 performing event logging. ++ *
++ *     int res = OH_HiAppEvent_Write("test_domain", "test_event", BEHAVIOR, list);
++ * 
++ * 04 destroy the ParamList pointer. ++ *
++ *     OH_HiAppEvent_DestroyParamList(list);
++ * 
++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++#include ++#include ++ ++#include "hiappevent_cfg.h" ++#include "hiappevent_event.h" ++#include "hiappevent_param.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Event types. ++ * ++ * You are advised to select event types based on their respective usage scenarios. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++enum EventType { ++ /* Fault event type */ ++ FAULT = 1, ++ ++ /* Statistic event type */ ++ STATISTIC = 2, ++ ++ /* Security event type */ ++ SECURITY = 3, ++ ++ /* Behavior event type */ ++ BEHAVIOR = 4 ++}; ++ ++/** ++ * @brief Event param list node. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++typedef struct ParamListNode* ParamList; ++ ++/** ++ * @brief Create a pointer to the ParamList. ++ * ++ * @return Pointer to the ParamList. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_CreateParamList(void); ++ ++/** ++ * @brief Destroy a pointer to the ParamList. ++ * ++ * @param list Event param list. ++ * @since 8 ++ * @version 1.0 ++ */ ++void OH_HiAppEvent_DestroyParamList(ParamList list); ++ ++/** ++ * @brief Add bool param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param boolean The bool value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddBoolParam(ParamList list, const char* name, bool boolean); ++ ++/** ++ * @brief Add bool array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param booleans The bool array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddBoolArrayParam(ParamList list, const char* name, const bool* booleans, int arrSize); ++ ++/** ++ * @brief Add int8_t param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The int8_t value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt8Param(ParamList list, const char* name, int8_t num); ++ ++/** ++ * @brief Add int8_t array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The int8_t array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt8ArrayParam(ParamList list, const char* name, const int8_t* nums, int arrSize); ++ ++/** ++ * @brief Add int16_t param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The int16_t value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt16Param(ParamList list, const char* name, int16_t num); ++ ++/** ++ * @brief Add int16_t array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The int16_t array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt16ArrayParam(ParamList list, const char* name, const int16_t* nums, int arrSize); ++ ++/** ++ * @brief Add int32_t param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The int32_t value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt32Param(ParamList list, const char* name, int32_t num); ++ ++/** ++ * @brief Add int32_t array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The int32_t array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt32ArrayParam(ParamList list, const char* name, const int32_t* nums, int arrSize); ++ ++/** ++ * @brief Add int64_t param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The int64_t value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt64Param(ParamList list, const char* name, int64_t num); ++ ++/** ++ * @brief Add int64_t array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The int64_t array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddInt64ArrayParam(ParamList list, const char* name, const int64_t* nums, int arrSize); ++ ++/** ++ * @brief Add float param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The float value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddFloatParam(ParamList list, const char* name, float num); ++ ++/** ++ * @brief Add float array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The float array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddFloatArrayParam(ParamList list, const char* name, const float* nums, int arrSize); ++ ++/** ++ * @brief Add double param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param num The double value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddDoubleParam(ParamList list, const char* name, double num); ++ ++/** ++ * @brief Add double array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param nums The double array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddDoubleArrayParam(ParamList list, const char* name, const double* nums, int arrSize); ++ ++/** ++ * @brief Add string param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param str The string value of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddStringParam(ParamList list, const char* name, const char* str); ++ ++/** ++ * @brief Add string array param to the ParamList. ++ * ++ * @param list The ParamList of params to be added. ++ * @param name The name of the param to be added. ++ * @param strs The string array value of the param to be added. ++ * @param arrSize The array size of the param to be added. ++ * @return ParamList after the param is added. ++ * @since 8 ++ * @version 1.0 ++ */ ++ParamList OH_HiAppEvent_AddStringArrayParam(ParamList list, const char* name, const char * const *strs, int arrSize); ++ ++/** ++ * @brief Implements logging of application events whose parameters are of the list type. ++ * ++ * Before logging an application event, this API will first verify parameters of this event. ++ * If the verification is successful, the API will write the event to the event file. ++ * ++ * @param domain Indicates the event domain. You can customize the event domain as needed. ++ * @param name Indicates the event name. You can customize the event name as needed. ++ * @param type Indicates the event type, which is defined in {@link EventType}. ++ * @param list Indicates a linked list of event parameters, each of which is comprised of the parameter name and ++ * parameter value. ++ * @return Returns {@code 0} if the event parameter verification is successful, and the event will be written to ++ * the event file; returns a positive integer if invalid parameters are present in the event, and ++ * the event will be written to the event file after the invalid parameters are ignored; returns a ++ * negative integer if the event parameter verification fails, and the event will not be written to the event file. ++ * @since 8 ++ * @version 1.0 ++ */ ++int OH_HiAppEvent_Write(const char* domain, const char* name, enum EventType type, const ParamList list); ++ ++/** ++ * @brief Implements the configuration function of application events logging. ++ * ++ * Application event logging configuration interface, which is used to configure event logging switch, ++ * event file directory storage quota size and other functions. ++ * ++ * @param name Configuration item name. ++ * @param value Configuration item value. ++ * @return Configuration result. ++ * @since 8 ++ * @version 1.0 ++ */ ++bool OH_HiAppEvent_Configure(const char* name, const char* value); ++ ++#ifdef __cplusplus ++} ++#endif ++/** @} */ ++#endif // HIVIEWDFX_HIAPPEVENT_H +\ No newline at end of file +diff --git a/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_cfg.h b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_cfg.h +new file mode 100644 +index 0000000..e2a6fbe +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_cfg.h +@@ -0,0 +1,75 @@ ++/* ++ * Copyright (c) 2021 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef HIVIEWDFX_HIAPPEVENT_CONFIG_H ++#define HIVIEWDFX_HIAPPEVENT_CONFIG_H ++ ++/** ++ * @addtogroup HiAppEvent ++ * @{ ++ * ++ * @brief Provides application event logging functions. ++ * ++ * Provides the event logging function for applications to log the fault, statistical, security, and user behavior ++ * events reported during running. Based on event information, you will be able to analyze the running status of ++ * applications. ++ * ++ * @syscap SystemCapability.HiviewDFX.HiAppEvent ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file hiappevent_cfg.h ++ * ++ * @brief Defines the names of all the configuration items of the event logging configuration function. ++ * ++ * If you want to configure the event logging function, you can directly use the configuration item constants. ++ * ++ * Sample code: ++ *
++ *     bool res = OH_HiAppEvent_Configure(MAX_STORAGE, "100M");
++ * 
++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Event logging switch. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define DISABLE "disable" ++ ++/** ++ * @brief Event file directory storage quota size. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define MAX_STORAGE "max_storage" ++ ++#ifdef __cplusplus ++} ++#endif ++/** @} */ ++#endif // HIVIEWDFX_HIAPPEVENT_CONFIG_H +\ No newline at end of file +diff --git a/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_event.h b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_event.h +new file mode 100644 +index 0000000..66aa520 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_event.h +@@ -0,0 +1,86 @@ ++/* ++ * Copyright (c) 2021 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef HIVIEWDFX_HIAPPEVENT_EVENT_H ++#define HIVIEWDFX_HIAPPEVENT_EVENT_H ++ ++/** ++ * @addtogroup HiAppEvent ++ * @{ ++ * ++ * @brief Provides application event logging functions. ++ * ++ * Provides the event logging function for applications to log the fault, statistical, security, and user behavior ++ * events reported during running. Based on event information, you will be able to analyze the running status of ++ * applications. ++ * ++ * @syscap SystemCapability.HiviewDFX.HiAppEvent ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file hiappevent_event.h ++ * ++ * @brief Defines the event names of all predefined events. ++ * ++ * In addition to custom events associated with specific apps, you can also use predefined events for logging. ++ * ++ * Sample code: ++ *
++ *     ParamList list = OH_HiAppEvent_CreateParamList();
++ *     OH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123);
++ *     int res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list);
++ *     OH_HiAppEvent_DestroyParamList(list);
++ * 
++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief user login event. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define EVENT_USER_LOGIN "hiappevent.user_login" ++ ++/** ++ * @brief user logout event. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define EVENT_USER_LOGOUT "hiappevent.user_logout" ++ ++/** ++ * @brief distributed service event. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define EVENT_DISTRIBUTED_SERVICE_START "hiappevent.distributed_service_start" ++ ++#ifdef __cplusplus ++} ++#endif ++/** @} */ ++#endif // HIVIEWDFX_HIAPPEVENT_EVENT_H +\ No newline at end of file +diff --git a/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_param.h b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_param.h +new file mode 100644 +index 0000000..f47972e +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/hiappevent/hiappevent_param.h +@@ -0,0 +1,85 @@ ++/* ++ * Copyright (c) 2021 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef HIVIEWDFX_HIAPPEVENT_PARAM_H ++#define HIVIEWDFX_HIAPPEVENT_PARAM_H ++ ++/** ++ * @addtogroup HiAppEvent ++ * @{ ++ * ++ * @brief Provides application event logging functions. ++ * ++ * Provides the event logging function for applications to log the fault, statistical, security, and user behavior ++ * events reported during running. Based on event information, you will be able to analyze the running status of ++ * applications. ++ * ++ * @syscap SystemCapability.HiviewDFX.HiAppEvent ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file hiappevent_param.h ++ * ++ * @brief Defines the param names of all predefined events. ++ * ++ * In addition to custom events associated with specific apps, you can also use predefined events for logging. ++ * ++ * Sample code: ++ *
++ *     ParamList list = OH_HiAppEvent_CreateParamList();
++ *     OH_HiAppEvent_AddInt32Param(list, PARAM_USER_ID, 123);
++ *     int res = OH_HiAppEvent_Write("user_domain", EVENT_USER_LOGIN, BEHAVIOR, list);
++ *     OH_HiAppEvent_DestroyParamList(list);
++ * 
++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Preset param name, user id param. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define PARAM_USER_ID "user_id" ++ ++/** ++ * @brief Preset param name, distributed service name param. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define PARAM_DISTRIBUTED_SERVICE_NAME "ds_name" ++ ++/** ++ * @brief Preset param name, distributed service instance id param. ++ * ++ * @since 8 ++ * @version 1.0 ++ */ ++#define PARAM_DISTRIBUTED_SERVICE_INSTANCE_ID "ds_instance_id" ++ ++#ifdef __cplusplus ++} ++#endif ++/** @} */ ++#endif // HIVIEWDFX_HIAPPEVENT_PARAM_H +\ No newline at end of file +diff --git a/build/ohos/ohos-sysroot/usr/include/hilog/log.h b/build/ohos/ohos-sysroot/usr/include/hilog/log.h +new file mode 100644 +index 0000000..26049d9 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/hilog/log.h +@@ -0,0 +1,258 @@ ++/* ++ * Copyright (c) 2021-2022 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef HIVIEWDFX_HILOG_H ++#define HIVIEWDFX_HILOG_H ++/** ++ * @addtogroup HiLog ++ * @{ ++ * ++ * @brief Provides logging functions. ++ * ++ * For example, you can use these functions to output logs of the specified log type, service domain, log tag, ++ * and log level. ++ * ++ * @syscap SystemCapability.HiviewDFX.HiLog ++ * ++ * @since 8 ++ */ ++ ++/** ++ * @file log.h ++ * ++ * @brief Defines the logging functions of the HiLog module. ++ * ++ * Before outputting logs, you must define the service domain, and log tag, use the function with ++ * the specified log type and level, and specify the privacy identifier.\n ++ *
  • Service domain: used to identify the subsystem and module of a service. Its value is a hexadecimal ++ * integer ranging from 0x0 to 0xFFFF. \n ++ *
  • Log tag: a string used to identify the class, file, or service.
  • \n ++ *
  • Log level: DEBUG, INFO, WARN, ERROR, and FATAL
  • \n ++ *
  • Parameter format: a printf format string that starts with a % character, including format specifiers ++ * and variable parameters.
  • \n ++ *
  • Privacy identifier: {public} or {private} added between the % character and the format specifier in ++ * each parameter. Note that each parameter has a privacy identifier. If no privacy identifier is added, ++ * the parameter is considered to be private.
\n ++ * ++ * Sample code:\n ++ * Defining the service domain and log tag:\n ++ * #include \n ++ * #define LOG_DOMAIN 0x0201\n ++ * #define LOG_TAG "MY_TAG"\n ++ * Outputting logs:\n ++ * HILOG_WARN({@link LOG_APP}, "Failed to visit %{private}s, reason:%{public}d.", url, errno);\n ++ * Output result:\n ++ * 05-06 15:01:06.870 1051 1051 W 0201/MY_TAG: Failed to visit , reason:503.\n ++ * ++ * @since 8 ++ */ ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Defines the service domain for a log file. ++ * ++ * The service domain is used to identify the subsystem and module of a service. Its value is a hexadecimal integer ++ * ranging from 0x0 to 0xFFFF. If the value is beyond the range, its significant bits are automatically truncated. \n ++ * ++ * @since 8 ++ */ ++#ifndef LOG_DOMAIN ++#define LOG_DOMAIN 0 ++#endif ++ ++/** ++ * @brief Defines a string constant used to identify the class, file, or service. ++ * ++ * @since 8 ++ */ ++#ifndef LOG_TAG ++#define LOG_TAG NULL ++#endif ++ ++/** ++ * @brief Enumerates log types. ++ * ++ * Currently, LOG_APP is available. \n ++ * ++ * @since 8 ++ */ ++typedef enum { ++ /** Third-party application logs */ ++ LOG_APP = 0, ++} LogType; ++ ++/** ++ * @brief Enumerates log levels. ++ * ++ * You are advised to select log levels based on their respective usage scenarios:\n ++ *
  • DEBUG: used for debugging and disabled from commercial releases
  • \n ++ *
  • INFO: used for logging important system running status and steps in key processes
  • \n ++ *
  • WARN: used for logging unexpected exceptions that have little impact on user experience and can ++ * automatically recover. Logs at this level are generally output when such exceptions are detected and ++ * captured.
  • \n ++ *
  • ERROR: used for logging malfunction that affects user experience and cannot automatically ++ * recover
  • \n ++ *
  • FATAL: used for logging major exceptions that have severely affected user experience and should ++ * not occur.
\n ++ * ++ * @since 8 ++ */ ++typedef enum { ++ /** Debug level to be used by {@link OH_LOG_DEBUG} */ ++ LOG_DEBUG = 3, ++ /** Informational level to be used by {@link OH_LOG_INFO} */ ++ LOG_INFO = 4, ++ /** Warning level to be used by {@link OH_LOG_WARN} */ ++ LOG_WARN = 5, ++ /** Error level to be used by {@link OH_LOG_ERROR} */ ++ LOG_ERROR = 6, ++ /** Fatal level to be used by {@link OH_LOG_FATAL} */ ++ LOG_FATAL = 7, ++} LogLevel; ++ ++/** ++ * @brief Outputs logs. ++ * ++ * You can use this function to output logs based on the specified log type, log level, service domain, log tag, ++ * and variable parameters determined by the format specifier and privacy identifier in the printf format. ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param level Indicates the log level, which can be LOG_DEBUG, LOG_INFO, LOG_WARN, ++ * LOG_ERROR, and LOG_FATAL. ++ * @param domain Indicates the service domain of logs. Its value is a hexadecimal integer ranging from 0x0 to 0xFFFF. ++ * @param tag Indicates the log tag, which is a string used to identify the class, file, or service behavior. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy ++ * identifier. Specifically, {public} or {private} is added between the % character and the format specifier ++ * in each parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @return Returns 0 or a larger value if the operation is successful; returns a value smaller ++ * than 0 otherwise. ++ * @since 8 ++ */ ++int OH_LOG_Print(LogType type, LogLevel level, unsigned int domain, const char *tag, const char *fmt, ...) ++ __attribute__((__format__(os_log, 5, 6))); ++ ++/** ++ * @brief Checks whether logs of the specified service domain, log tag, and log level can be output. ++ * ++ * @param domain Indicates the service domain of logs. ++ * @param tag Indicates the log tag. ++ * @param level Indicates the log level. ++ * @return Returns true if the specified logs can be output; returns false otherwise. ++ * @since 8 ++ */ ++bool OH_LOG_IsLoggable(unsigned int domain, const char *tag, LogLevel level); ++ ++/** ++ * @brief Outputs debug logs. This is a function-like macro. ++ * ++ * Before calling this function, define the log service domain and log tag. Generally, you need to define them at ++ * the beginning of the source file. \n ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the ++ * privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier ++ * in each parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @see OH_LOG_Print ++ * @since 8 ++ */ ++#define OH_LOG_DEBUG(type, ...) ((void)OH_LOG_Print((type), LOG_DEBUG, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) ++ ++/** ++ * @brief Outputs informational logs. This is a function-like macro. ++ * ++ * Before calling this function, define the log service domain and log tag. Generally, you need to define them ++ * at the beginning of the source file. \n ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy ++ * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in ++ * each parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @see OH_LOG_Print ++ * @since 8 ++ */ ++#define OH_LOG_INFO(type, ...) ((void)OH_LOG_Print((type), LOG_INFO, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) ++ ++/** ++ * @brief Outputs warning logs. This is a function-like macro. ++ * ++ * Before calling this function, define the log service domain and log tag. Generally, you need to define them ++ * at the beginning of the source file. \n ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the ++ * privacy identifier. Specifically, {public} or {private} is added between the % character and the format specifier ++ * in each parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @see OH_LOG_Print ++ * @since 8 ++ */ ++#define OH_LOG_WARN(type, ...) ((void)OH_LOG_Print((type), LOG_WARN, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) ++ ++/** ++ * @brief Outputs error logs. This is a function-like macro. ++ * ++ * Before calling this function, define the log service domain and log tag. Generally, you need to define ++ * them at the beginning of the source file. \n ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy ++ * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in each ++ * parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @see OH_LOG_Print ++ * @since 8 ++ */ ++#define OH_LOG_ERROR(type, ...) ((void)OH_LOG_Print((type), LOG_ERROR, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) ++ ++/** ++ * @brief Outputs fatal logs. This is a function-like macro. ++ * ++ * Before calling this function, define the log service domain and log tag. Generally, you need to define them at ++ * the beginning of the source file. \n ++ * ++ * @param type Indicates the log type. The type for third-party applications is defined by {@link LOG_APP}. ++ * @param fmt Indicates the format string, which is an enhancement of a printf format string and supports the privacy ++ * identifier. Specifically, {public} or {private} is added between the % character and the format specifier in ++ * each parameter. \n ++ * @param ... Indicates a list of parameters. The number and type of parameters must map onto the format specifiers ++ * in the format string. ++ * @see OH_LOG_Print ++ * @since 8 ++ */ ++#define OH_LOG_FATAL(type, ...) ((void)OH_LOG_Print((type), LOG_FATAL, LOG_DOMAIN, LOG_TAG, __VA_ARGS__)) ++ ++#ifdef __cplusplus ++} ++#endif ++/** @} */ ++ ++#ifdef HILOG_RAWFORMAT ++#include "hilog/log_inner.h" ++#endif ++ ++#endif // HIVIEWDFX_HILOG_C_H +diff --git a/build/ohos/ohos-sysroot/usr/include/huks/native_huks_api.h b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_api.h +new file mode 100755 +index 0000000..485ba14 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_api.h +@@ -0,0 +1,263 @@ ++/* ++ * Copyright (c) 2022 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef NATIVE_HUKS_API_H ++#define NATIVE_HUKS_API_H ++ ++/** ++ * @addtogroup HuksKeyApi ++ * @{ ++ * ++ * @brief Describes the OpenHarmony Universal KeyStore (HUKS) capabilities, including key management and ++ * cryptography operations, provided for applications. ++ * The keys managed by HUKS can be imported by applications or generated by calling the HUKS APIs. ++ * ++ * @syscap SystemCapability.Security.Huks ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file native_huks_api.h ++ * ++ * @brief Declares the APIs used to access the HUKS. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++#include "native_huks_type.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Obtains the current HUKS SDK version. ++ * ++ * @param sdkVersion Indicates the pointer to the SDK version (in string format) obtained. ++ * return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_GetSdkVersion(struct OH_Huks_Blob *sdkVersion); ++ ++/** ++ * @brief Generates a key. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the key to generate. ++ * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. ++ * @param paramSetIn Indicates the pointer to the parameter set for generating the key. ++ * @param paramSetOut Indicates the pointer to a temporary key generated. If the generated key is ++ * not of a temporary type, this parameter is a null pointer. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_GenerateKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut); ++ ++/** ++ * @brief Imports a key in plaintext. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the key to import. ++ * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. ++ * @param paramSet Indicates the pointer to the parameters of the key to import. ++ * @param key Indicates the pointer to the key to import. The key must be in the format required by the HUKS. ++ * For details, see {@link HuksTypeApi}. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_ImportKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *key); ++ ++/** ++ * @brief Imports a wrapped key. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the key to import. ++ * The alias must be unique in the process of the service. Otherwise, the key will be overwritten. ++ * @param wrappingKeyAlias Indicates the pointer to the alias of the wrapping key, ++ * which is obtained through key agreement and used to decrypt the key to import. ++ * @param paramSet Indicates the pointer to the parameters of the wrapped key to import. ++ * @param wrappedKeyData Indicates the pointer to the wrapped key to import. ++ * The key must be in the format required by the HUKS. For details, see {@link OH_Huks_AlgSuite}. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_ImportWrappedKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_Blob *wrappingKeyAlias, const struct OH_Huks_ParamSet *paramSet, ++ const struct OH_Huks_Blob *wrappedKeyData); ++ ++/** ++ * @brief Exports a public key. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the public key to export. ++ * The alias must be the same as the alias for the key generated. ++ * @param paramSet Indicates the pointer to the parameters required for exporting the public key. ++ * @param key Indicates the pointer to the public key exported. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_ExportPublicKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *key); ++ ++/** ++ * @brief Deletes a key. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the key to delete. ++ * The alias must be the same as the alias for the key generated. ++ * @param paramSet Indicates the pointer to the parameters required for deleting the key. ++ * By default, this parameter is a null pointer. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_DeleteKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet); ++ ++/** ++ * @brief Obtains the attributes of a key. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the target key. ++ * @param paramSetIn Indicates the pointer to the attribute tag required for ++ * obtaining the attributes. By default, this parameter is a null pointer. ++ * @param paramSetOut Indicates the pointer to the attributes obtained. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_GetKeyItemParamSet(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSetIn, struct OH_Huks_ParamSet *paramSetOut); ++ ++/** ++ * @brief Checks whether a key exists. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the target key. ++ * @param paramSet Indicates the pointer to the attribute tag required for checking the key. ++ * By default, this parameter is a null pointer. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the key exists. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_ERR_CODE_ITEM_NOT_EXIST} if the key does not exist. ++ * @return Returns any other error code for other cases. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_IsKeyItemExist(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet); ++ ++/** ++ * @brief Obtain the key certificate chain. ++ * ++ * @param keyAlias Indicates the pointer to the alias of the target key. ++ * @param paramSet Indicates the pointer to the parameters required for obtaining the key certificate. ++ * @param certChain Indicates the pointer to the key certificate chain obtained. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_AttestKeyItem(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_CertChain *certChain); ++ ++/** ++ * @brief Initializes the key session interface and obtains a handle (mandatory) and challenge value (optional). ++ * ++ * @param keyAlias Indicates the pointer to the alias of the target key. ++ * @param paramSet Indicates the pointer to the parameters for the initialization operation. ++ * @param handle Indicates the pointer to the handle of the key session obtained. ++ * This handle is required for subsequent operations, including {@link OH_Huks_UpdateSession}, ++ * {@link OH_Huks_FinishSession}, and {@link OH_Huks_AbortSession}. ++ * @param challenge Indicates the pointer to the challenge value obtained. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ * @see OH_Huks_UpdateSession ++ * @see OH_Huks_FinishSession ++ * @see OH_Huks_AbortSession ++ */ ++struct OH_Huks_Result OH_Huks_InitSession(const struct OH_Huks_Blob *keyAlias, ++ const struct OH_Huks_ParamSet *paramSet, struct OH_Huks_Blob *handle, struct OH_Huks_Blob *token); ++ ++/** ++ * @brief Adds data by segment for the key operation, performs the related key operation, ++ * and outputs the processed data. ++ * ++ * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. ++ * @param paramSet Indicates the pointer to the parameters required for the key operation. ++ * @param inData Indicates the pointer to the data to be processed. ++ * This API can be called multiples time to process large data by segment. ++ * @param outData Indicates the pointer to the output data. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ * @see OH_Huks_InitSession ++ * @see OH_Huks_FinishSession ++ * @see OH_Huks_AbortSession ++ */ ++struct OH_Huks_Result OH_Huks_UpdateSession(const struct OH_Huks_Blob *handle, ++ const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData); ++ ++/** ++ * @brief Ends the key session. ++ * ++ * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. ++ * @param paramSet Indicates the pointer to the parameters required for the key operation. ++ * @param inData Indicates the pointer to the data to be processed. ++ * @param outData Indicates the pointer to the output data. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ * @see OH_Huks_InitSession ++ * @see OH_Huks_UpdateSession ++ * @see OH_Huks_AbortSession ++ */ ++struct OH_Huks_Result OH_Huks_FinishSession(const struct OH_Huks_Blob *handle, ++ const struct OH_Huks_ParamSet *paramSet, const struct OH_Huks_Blob *inData, struct OH_Huks_Blob *outData); ++ ++/** ++ * @brief Aborts a key session. ++ * ++ * @param handle Indicates the pointer to the key session handle, which is generated by {@link OH_Huks_InitSession}. ++ * @param paramSet Indicates the pointer to the parameters required for aborting the key session. ++ * By default, this parameter is a null pointer. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ * @see OH_Huks_InitSession ++ * @see OH_Huks_UpdateSession ++ * @see OH_Huks_FinishSession ++ */ ++struct OH_Huks_Result OH_Huks_AbortSession(const struct OH_Huks_Blob *handle, ++ const struct OH_Huks_ParamSet *paramSet); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/** @} */ ++#endif /* NATIVE_HUKS_API_H */ +diff --git a/build/ohos/ohos-sysroot/usr/include/huks/native_huks_param.h b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_param.h +new file mode 100755 +index 0000000..a82e185 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_param.h +@@ -0,0 +1,176 @@ ++/* ++ * Copyright (c) 2022 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef NATIVE_HUKS_PARAM_H ++#define NATIVE_HUKS_PARAM_H ++ ++/** ++ * @addtogroup HuksParamSetApi ++ * @{ ++ * ++ * @brief Defines the capabilities of OpenHarmony Universal KeyStore (HUKS) parameter sets. ++ * The HUKS APIs can be used to perform parameter set lifecycle management, ++ * including initializing a parameter set, adding parameters to a parameter set, constructing ++ * a parameter set, and destroying a parameter set. ++ * They can also be used to obtain parameters, copy parameter sets, and check parameter validity. ++ * ++ * @syscap SystemCapability.Security.Huks ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file native_huks_param.h ++ * ++ * @brief Provides APIs for constructing, using, and destroying parameter sets. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++#include "native_huks_type.h" ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++/** ++ * @brief Initializes a parameter set. ++ * ++ * @param paramSet Indicates the double pointer to the parameter set to initialize. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the initialization is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_InitParamSet(struct OH_Huks_ParamSet **paramSet); ++ ++/** ++ * @brief Adds parameters to a parameter set. ++ * ++ * @param paramSet Indicates the pointer to the parameter set to which parameters are to be added. ++ * @param params Indicates the pointer to the array of parameters to add. ++ * @param paramCnt Indicates the number of parameters to add. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_AddParams(struct OH_Huks_ParamSet *paramSet, ++ const struct OH_Huks_Param *params, uint32_t paramCnt); ++ ++/** ++ * @brief Constructs a parameter set. ++ * ++ * @param paramSet Indicates the double pointer to the parameter set to construct. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_BuildParamSet(struct OH_Huks_ParamSet **paramSet); ++ ++/** ++ * @brief Destroys a parameter set. ++ * ++ * @param paramSet Indicates the double pointer to the parameter set to destroy. ++ * @since 9 ++ * @version 1.0 ++ */ ++void OH_Huks_FreeParamSet(struct OH_Huks_ParamSet **paramSet); ++ ++/** ++ * @brief Copies a parameter set (deep copy). ++ * ++ * @param fromParamSet Indicates the pointer to the parameter set to copy. ++ * @param fromParamSetSize Indicates the memory size occupied by the source parameter set. ++ * @param paramSet Indicates the double pointer to the new parameter set generated. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_CopyParamSet(const struct OH_Huks_ParamSet *fromParamSet, ++ uint32_t fromParamSetSize, struct OH_Huks_ParamSet **paramSet); ++ ++/** ++ * @brief Obtains parameters from a parameter set. ++ * ++ * @param paramSet Indicates the pointer to the target parameter set. ++ * @param tag Indicates the value of the parameter to be obtained. ++ * @param param Indicates the double pointer to the parameter obtained. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the operation is successful, ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_GetParam(const struct OH_Huks_ParamSet *paramSet, uint32_t tag, ++ struct OH_Huks_Param **param); ++ ++/** ++ * @brief Refreshes data of the Blob type in a parameter set. ++ * ++ * @param paramSet Indicates the pointer to the target parameter set. ++ * @param isCopy Specifies whether to copy the data of the Blob type to the parameter set. ++ * If yes, the data of the Blob type will be copied to the parameter set. ++ * Otherwise, only the address of the Blob data will be refreshed. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if operation is successful; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_FreshParamSet(struct OH_Huks_ParamSet *paramSet, bool isCopy); ++ ++/** ++ * @brief Checks whether the parameters in a parameter set are valid. ++ * ++ * @param paramSet Indicates the pointer to the parameter set to check. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the parameters in the parameter set are valid; ++ * returns other values if the parameter set has invalid, duplicate, or incorrect parameters. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_IsParamSetTagValid(const struct OH_Huks_ParamSet *paramSet); ++ ++/** ++ * @brief Checks whether a parameter set is of the valid size. ++ * ++ * @param paramSet Indicates the pointer to the parameter set to check. ++ * @param size Indicates the memory size occupied by the parameter set. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the parameter set is of the valid size; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_IsParamSetValid(const struct OH_Huks_ParamSet *paramSet, uint32_t size); ++ ++/** ++ * @brief Checks whether two parameters are the same. ++ * ++ * @param baseParam Indicates the pointer to the first parameter. ++ * @param param Indicates the pointer to the second parameter. ++ * @return Returns {@link OH_Huks_ErrCode#OH_HUKS_SUCCESS} if the two parameters are the same; ++ * returns an error code otherwise. ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result OH_Huks_CheckParamMatch(const struct OH_Huks_Param *baseParam, const struct OH_Huks_Param *param); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/** @} */ ++#endif /* NATIVE_HUKS_PARAM_H */ +diff --git a/build/ohos/ohos-sysroot/usr/include/huks/native_huks_type.h b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_type.h +new file mode 100755 +index 0000000..77217f4 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/huks/native_huks_type.h +@@ -0,0 +1,861 @@ ++/* ++ * Copyright (c) 2022-2023 Huawei Device Co., Ltd. ++ * Licensed under the Apache License, Version 2.0 (the "License"); ++ * you may not use this file except in compliance with the License. ++ * You may obtain a copy of the License at ++ * ++ * http://www.apache.org/licenses/LICENSE-2.0 ++ * ++ * Unless required by applicable law or agreed to in writing, software ++ * distributed under the License is distributed on an "AS IS" BASIS, ++ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ++ * See the License for the specific language governing permissions and ++ * limitations under the License. ++ */ ++ ++#ifndef NATIVE_OH_HUKS_TYPE_H ++#define NATIVE_OH_HUKS_TYPE_H ++ ++/** ++ * @addtogroup HuksTypeApi ++ * @{ ++ * ++ * @brief Defines the macros, enumerated values, data structures, ++ * and error codes used by OpenHarmony Universal KeyStore (HUKS) APIs. ++ * ++ * @syscap SystemCapability.Security.Huks ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++/** ++ * @file native_huks_type.h ++ * ++ * @brief Defines the enumerated variables, structures, and macros used in the HUKS APIs. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++ ++#include ++#include ++#include ++ ++#ifdef __cplusplus ++extern "C" { ++#endif ++ ++#define OH_HUKS_AE_TAG_LEN 16 ++#define OH_HUKS_BITS_PER_BYTE 8 ++#define OH_HUKS_MAX_KEY_SIZE 2048 ++#define OH_HUKS_AE_NONCE_LEN 12 ++#define OH_HUKS_MAX_KEY_ALIAS_LEN 64 ++#define OH_HUKS_MAX_PROCESS_NAME_LEN 50 ++#define OH_HUKS_MAX_RANDOM_LEN 1024 ++#define OH_HUKS_SIGNATURE_MIN_SIZE 64 ++#define OH_HUKS_MAX_OUT_BLOB_SIZE (5 * 1024 * 1024) ++#define OH_HUKS_WRAPPED_FORMAT_MAX_SIZE (1024 * 1024) ++#define OH_HUKS_IMPORT_WRAPPED_KEY_TOTAL_BLOBS 10 ++#define TOKEN_CHALLENGE_LEN 32 ++#define SHA256_SIGN_LEN 32 ++#define TOKEN_SIZE 32 ++#define MAX_AUTH_TIMEOUT_SECOND 60 ++#define SECURE_SIGN_VERSION 0x01000001 ++ ++/** ++ * @brief Enumerates the key purposes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyPurpose { ++ /** Used to encrypt the plaintext. */ ++ OH_HUKS_KEY_PURPOSE_ENCRYPT = 1, ++ /** Used to decrypt the cipher text. */ ++ OH_HUKS_KEY_PURPOSE_DECRYPT = 2, ++ /** Used to sign data. */ ++ OH_HUKS_KEY_PURPOSE_SIGN = 4, ++ /** Used to verify the signature. */ ++ OH_HUKS_KEY_PURPOSE_VERIFY = 8, ++ /** Used to derive a key. */ ++ OH_HUKS_KEY_PURPOSE_DERIVE = 16, ++ /** Used for an encrypted export. */ ++ OH_HUKS_KEY_PURPOSE_WRAP = 32, ++ /** Used for an encrypted import. */ ++ OH_HUKS_KEY_PURPOSE_UNWRAP = 64, ++ /** Used to generate a message authentication code (MAC). */ ++ OH_HUKS_KEY_PURPOSE_MAC = 128, ++ /** Used for key agreement. */ ++ OH_HUKS_KEY_PURPOSE_AGREE = 256, ++}; ++ ++/** ++ * @brief Enumerates the digest algorithms. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyDigest { ++ /** No digest algorithm. */ ++ OH_HUKS_DIGEST_NONE = 0, ++ /** MD5. */ ++ OH_HUKS_DIGEST_MD5 = 1, ++ /** SM3. */ ++ OH_HUKS_DIGEST_SM3 = 2, ++ /** SHA-1. */ ++ OH_HUKS_DIGEST_SHA1 = 10, ++ /** SHA-224. */ ++ OH_HUKS_DIGEST_SHA224 = 11, ++ /** SHA-256. */ ++ OH_HUKS_DIGEST_SHA256 = 12, ++ /** SHA-384. */ ++ OH_HUKS_DIGEST_SHA384 = 13, ++ /** SHA-512. */ ++ OH_HUKS_DIGEST_SHA512 = 14, ++}; ++ ++/** ++ * @brief Enumerates the padding algorithms. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyPadding { ++ /** No padding algorithm. */ ++ OH_HUKS_PADDING_NONE = 0, ++ /** Optimal Asymmetric Encryption Padding (OAEP). */ ++ OH_HUKS_PADDING_OAEP = 1, ++ /** Probabilistic Signature Scheme (PSS). */ ++ OH_HUKS_PADDING_PSS = 2, ++ /** Public Key Cryptography Standards (PKCS) #1 v1.5. */ ++ OH_HUKS_PADDING_PKCS1_V1_5 = 3, ++ /** PKCS #5. */ ++ OH_HUKS_PADDING_PKCS5 = 4, ++ /** PKCS #7. */ ++ OH_HUKS_PADDING_PKCS7 = 5, ++}; ++ ++/** ++ * @brief Enumerates the cipher modes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_CipherMode { ++ /** Electronic Code Block (ECB) mode. */ ++ OH_HUKS_MODE_ECB = 1, ++ /** Cipher Block Chaining (CBC) mode. */ ++ OH_HUKS_MODE_CBC = 2, ++ /** Counter (CTR) mode. */ ++ OH_HUKS_MODE_CTR = 3, ++ /** Output Feedback (OFB) mode. */ ++ OH_HUKS_MODE_OFB = 4, ++ /** Counter with CBC-MAC (CCM) mode. */ ++ OH_HUKS_MODE_CCM = 31, ++ /** Galois/Counter (GCM) mode. */ ++ OH_HUKS_MODE_GCM = 32, ++}; ++ ++/** ++ * @brief Enumerates the key sizes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeySize { ++ /** Rivest-Shamir-Adleman (RSA) key of 512 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_512 = 512, ++ /** RSA key of 768 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_768 = 768, ++ /** RSA key of 1024 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_1024 = 1024, ++ /** RSA key of 2048 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_2048 = 2048, ++ /** RSA key of 3072 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_3072 = 3072, ++ /** RSA key of 4096 bits. */ ++ OH_HUKS_RSA_KEY_SIZE_4096 = 4096, ++ ++ /** Elliptic Curve Cryptography (ECC) key of 224 bits. */ ++ OH_HUKS_ECC_KEY_SIZE_224 = 224, ++ /** ECC key of 256 bits. */ ++ OH_HUKS_ECC_KEY_SIZE_256 = 256, ++ /** ECC key of 384 bits. */ ++ OH_HUKS_ECC_KEY_SIZE_384 = 384, ++ /** ECC key of 521 bits. */ ++ OH_HUKS_ECC_KEY_SIZE_521 = 521, ++ ++ /** Advanced Encryption Standard (AES) key of 128 bits. */ ++ OH_HUKS_AES_KEY_SIZE_128 = 128, ++ /** AES key of 192 bits. */ ++ OH_HUKS_AES_KEY_SIZE_192 = 192, ++ /** AES key of 256 bits. */ ++ OH_HUKS_AES_KEY_SIZE_256 = 256, ++ /** AES key of 512 bits. */ ++ OH_HUKS_AES_KEY_SIZE_512 = 512, ++ ++ /** Curve25519 key of 256 bits. */ ++ OH_HUKS_CURVE25519_KEY_SIZE_256 = 256, ++ ++ /** Diffie-Hellman (DH) key of 2048 bits. */ ++ OH_HUKS_DH_KEY_SIZE_2048 = 2048, ++ /** DH key of 3072 bits. */ ++ OH_HUKS_DH_KEY_SIZE_3072 = 3072, ++ /** DH key of 4096 bits. */ ++ OH_HUKS_DH_KEY_SIZE_4096 = 4096, ++ ++ /** ShangMi2 (SM2) key of 256 bits. */ ++ OH_HUKS_SM2_KEY_SIZE_256 = 256, ++ /** ShangMi4 (SM4) key of 128 bits. */ ++ OH_HUKS_SM4_KEY_SIZE_128 = 128, ++}; ++ ++/** ++ * @brief Enumerates the key algorithms. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyAlg { ++ /** RSA. */ ++ OH_HUKS_ALG_RSA = 1, ++ /** ECC. */ ++ OH_HUKS_ALG_ECC = 2, ++ /** DSA. */ ++ OH_HUKS_ALG_DSA = 3, ++ ++ /** AES. */ ++ OH_HUKS_ALG_AES = 20, ++ /** HMAC. */ ++ OH_HUKS_ALG_HMAC = 50, ++ /** HKDF. */ ++ OH_HUKS_ALG_HKDF = 51, ++ /** PBKDF2. */ ++ OH_HUKS_ALG_PBKDF2 = 52, ++ ++ /** ECDH. */ ++ OH_HUKS_ALG_ECDH = 100, ++ /** X25519. */ ++ OH_HUKS_ALG_X25519 = 101, ++ /** Ed25519. */ ++ OH_HUKS_ALG_ED25519 = 102, ++ /** DH. */ ++ OH_HUKS_ALG_DH = 103, ++ ++ /** SM2. */ ++ OH_HUKS_ALG_SM2 = 150, ++ /** SM3. */ ++ OH_HUKS_ALG_SM3 = 151, ++ /** SM4. */ ++ OH_HUKS_ALG_SM4 = 152, ++}; ++ ++/** ++ * @brief Enumerates the algorithm suites required for ciphertext imports. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_AlgSuite { ++ /** Key material format (Length-Value format), X25519 key agreement, and AES-256-GCM encryption and decryption. ++ * | x25519_plain_pubkey_length (4 Byte) | x25519_plain_pubkey | agreekey_aad_length (4 Byte) | agreekey_aad ++ * | agreekey_nonce_length (4 Byte) | agreekey_nonce | ++ * | agreekey_aead_tag_len (4 Byte) | agreekey_aead_tag | ++ * | kek_enc_data_length (4 Byte) | kek_enc_data | kek_aad_length (4 Byte) | kek_aad ++ * | kek_nonce_length (4 Byte) | kek_nonce | kek_aead_tag_len (4 Byte) | kek_aead_tag ++ * | key_material_size_len (4 Byte) | key_material_size | key_mat_enc_length (4 Byte) | key_mat_enc_data ++ */ ++ OH_HUKS_UNWRAP_SUITE_X25519_AES_256_GCM_NOPADDING = 1, ++ ++ /** Key material format (Length-Value format), ECDH-p256 key agreement, and AES-256-GCM encryption and decryption. ++ * | ECC_plain_pubkey_length (4 Byte) | ECC_plain_pubkey | agreekey_aad_length (4 Byte) | agreekey_aad ++ * | agreekey_nonce_length (4 Byte) | agreekey_nonce | ++ * | agreekey_aead_tag_len (4 Byte) | agreekey_aead_tag | ++ * | kek_enc_data_length (4 Byte) | kek_enc_data | kek_aad_length (4 Byte) | kek_aad ++ * | kek_nonce_length (4 Byte) | kek_nonce | kek_aead_tag_len (4 Byte) | kek_aead_tag ++ * | key_material_size_len (4 Byte) | key_material_size | key_mat_enc_length (4 Byte) | key_mat_enc_data ++ */ ++ OH_HUKS_UNWRAP_SUITE_ECDH_AES_256_GCM_NOPADDING = 2, ++}; ++ ++/** ++ * @brief Enumerates the key generation types. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyGenerateType { ++ /** Key generated by default. */ ++ OH_HUKS_KEY_GENERATE_TYPE_DEFAULT = 0, ++ /** Derived key. */ ++ OH_HUKS_KEY_GENERATE_TYPE_DERIVE = 1, ++ /** Key obtained by key agreement. */ ++ OH_HUKS_KEY_GENERATE_TYPE_AGREE = 2, ++}; ++ ++/** ++ * @brief Enumerates the key generation modes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyFlag { ++ /** Import a public key using an API. */ ++ OH_HUKS_KEY_FLAG_IMPORT_KEY = 1, ++ /** Generate a key by using an API. */ ++ OH_HUKS_KEY_FLAG_GENERATE_KEY = 2, ++ /** Generate a key by using a key agreement API. */ ++ OH_HUKS_KEY_FLAG_AGREE_KEY = 3, ++ /** Derive a key by using an API. */ ++ OH_HUKS_KEY_FLAG_DERIVE_KEY = 4, ++}; ++ ++/** ++ * @brief Enumerates the key storage modes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_KeyStorageType { ++ /** The key is managed locally. */ ++ OH_HUKS_STORAGE_TEMP = 0, ++ /** The key is managed by the HUKS service. */ ++ OH_HUKS_STORAGE_PERSISTENT = 1, ++ /** The key is only used in huks. */ ++ OH_HUKS_STORAGE_ONLY_USED_IN_HUKS = 2, ++ /** The key can be allowed to export. */ ++ OH_HUKS_STORAGE_KEY_EXPORT_ALLOWED = 3, ++}; ++ ++/** ++ * @brief Enumerates the types of keys to import. By default, ++ * a public key is imported. This field is not required when a symmetric key is imported. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_ImportKeyType { ++ /** Public key. */ ++ OH_HUKS_KEY_TYPE_PUBLIC_KEY = 0, ++ /** Private key. */ ++ OH_HUKS_KEY_TYPE_PRIVATE_KEY = 1, ++ /** Public and private key pair. */ ++ OH_HUKS_KEY_TYPE_KEY_PAIR = 2, ++}; ++ ++/** ++ * @brief Enumerates the key storage modes. ++ * ++ * @since 10 ++ * @version 1.0 ++ */ ++enum OH_Huks_RsaPssSaltLenType { ++ /** Salt length matches digest. */ ++ OH_HUKS_RSA_PSS_SALT_LEN_DIGEST = 0, ++ /** Set salt length to maximum possible, default type. */ ++ OH_HUKS_RSA_PSS_SALT_LEN_MAX = 1, ++}; ++ ++/** ++ * @brief Enumerates the error codes. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_ErrCode { ++ /** The operation is successful. */ ++ OH_HUKS_SUCCESS = 0, ++ /** Permission verification failed. */ ++ OH_HUKS_ERR_CODE_PERMISSION_FAIL = 201, ++ /** Invalid parameters are detected. */ ++ OH_HUKS_ERR_CODE_ILLEGAL_ARGUMENT = 401, ++ /** The API is not supported. */ ++ OH_HUKS_ERR_CODE_NOT_SUPPORTED_API = 801, ++ ++ /** The feature is not supported. */ ++ OH_HUKS_ERR_CODE_FEATURE_NOT_SUPPORTED = 12000001, ++ /** Key algorithm parameters are missing. */ ++ OH_HUKS_ERR_CODE_MISSING_CRYPTO_ALG_ARGUMENT = 12000002, ++ /** Invalid key algorithm parameters are detected. */ ++ OH_HUKS_ERR_CODE_INVALID_CRYPTO_ALG_ARGUMENT = 12000003, ++ /** Failed to operate the file. */ ++ OH_HUKS_ERR_CODE_FILE_OPERATION_FAIL = 12000004, ++ /** The process communication failed. */ ++ OH_HUKS_ERR_CODE_COMMUNICATION_FAIL = 12000005, ++ /** Failed to operate the algorithm library. */ ++ OH_HUKS_ERR_CODE_CRYPTO_FAIL = 12000006, ++ /** Failed to access the key because the key has expired. */ ++ OH_HUKS_ERR_CODE_KEY_AUTH_PERMANENTLY_INVALIDATED = 12000007, ++ /** Failed to access the key because the authentication has failed. */ ++ OH_HUKS_ERR_CODE_KEY_AUTH_VERIFY_FAILED = 12000008, ++ /** Key access timed out. */ ++ OH_HUKS_ERR_CODE_KEY_AUTH_TIME_OUT = 12000009, ++ /** The number of key operation sessions has reached the limit. */ ++ OH_HUKS_ERR_CODE_SESSION_LIMIT = 12000010, ++ /** The entity does not exist. */ ++ OH_HUKS_ERR_CODE_ITEM_NOT_EXIST = 12000011, ++ /** Internal error. */ ++ OH_HUKS_ERR_CODE_INTERNAL_ERROR = 12000012, ++ /** The authentication credential does not exist. */ ++ OH_HUKS_ERR_CODE_CREDENTIAL_NOT_EXIST = 12000013, ++}; ++ ++/** ++ * @brief Enumerates the tag types. ++ * @see OH_Huks_Param ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_TagType { ++ /** Invalid tag type. */ ++ OH_HUKS_TAG_TYPE_INVALID = 0 << 28, ++ /** int32_t. */ ++ OH_HUKS_TAG_TYPE_INT = 1 << 28, ++ /** uin32_t. */ ++ OH_HUKS_TAG_TYPE_UINT = 2 << 28, ++ /** uin64_t. */ ++ OH_HUKS_TAG_TYPE_ULONG = 3 << 28, ++ /** Boolean. */ ++ OH_HUKS_TAG_TYPE_BOOL = 4 << 28, ++ /** OH_Huks_Blob. */ ++ OH_HUKS_TAG_TYPE_BYTES = 5 << 28, ++}; ++ ++/** ++ * @brief Enumerates the user authentication types. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_UserAuthType { ++ /** Fingerprint authentication. */ ++ OH_HUKS_USER_AUTH_TYPE_FINGERPRINT = 1 << 0, ++ /** Facial authentication. */ ++ OH_HUKS_USER_AUTH_TYPE_FACE = 1 << 1, ++ /** PIN authentication. */ ++ OH_HUKS_USER_AUTH_TYPE_PIN = 1 << 2, ++}; ++ ++/** ++ * @brief Enumerates the access control types. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_AuthAccessType { ++ /** The key is invalid after the password is cleared. */ ++ OH_HUKS_AUTH_ACCESS_INVALID_CLEAR_PASSWORD = 1 << 0, ++ /** The key is invalid after a new biometric feature is enrolled. */ ++ OH_HUKS_AUTH_ACCESS_INVALID_NEW_BIO_ENROLL = 1 << 1, ++}; ++ ++/** ++ * @brief Enumerates the types of the challenges generated when a key is used. ++ * @see OH_Huks_ChallengePosition ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_ChallengeType { ++ /** Normal challenge, which is of 32 bytes by default. */ ++ OH_HUKS_CHALLENGE_TYPE_NORMAL = 0, ++ /** Custom challenge, which supports only one authentication for multiple keys. ++ * The valid value of a custom challenge is of 8 bytes. ++ */ ++ OH_HUKS_CHALLENGE_TYPE_CUSTOM = 1, ++ /** Challenge is not required. */ ++ OH_HUKS_CHALLENGE_TYPE_NONE = 2, ++}; ++ ++/** ++ * @brief Enumerates the positions of the 8-byte valid value in a custom challenge generated. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_ChallengePosition { ++ /** Bytes 0 to 7. */ ++ OH_HUKS_CHALLENGE_POS_0 = 0, ++ /** Bytes 8 to 15. */ ++ OH_HUKS_CHALLENGE_POS_1, ++ /** Bytes 16 to 23. */ ++ OH_HUKS_CHALLENGE_POS_2, ++ /** Bytes 24 to 31. */ ++ OH_HUKS_CHALLENGE_POS_3, ++}; ++ ++/** ++ * @brief Enumerates the signature types of the keys generated or imported. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_SecureSignType { ++ /** ++ * The signature carries authentication information. This field is specified when a key ++ * is generated or imported. When the key is used to sign data, the data will be added with ++ * the authentication information and then be signed. ++ */ ++ OH_HUKS_SECURE_SIGN_WITH_AUTHINFO = 1, ++}; ++ ++/** ++ * @brief Enumerates the tag values used in parameter sets. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++enum OH_Huks_Tag { ++ /** Tags for key parameters. The value range is 1 to 200. */ ++ /** Algorithm. */ ++ OH_HUKS_TAG_ALGORITHM = OH_HUKS_TAG_TYPE_UINT | 1, ++ /** Key purpose. */ ++ OH_HUKS_TAG_PURPOSE = OH_HUKS_TAG_TYPE_UINT | 2, ++ /** Key size. */ ++ OH_HUKS_TAG_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT | 3, ++ /** Digest algorithm. */ ++ OH_HUKS_TAG_DIGEST = OH_HUKS_TAG_TYPE_UINT | 4, ++ /** Padding algorithm. */ ++ OH_HUKS_TAG_PADDING = OH_HUKS_TAG_TYPE_UINT | 5, ++ /** Cipher mode. */ ++ OH_HUKS_TAG_BLOCK_MODE = OH_HUKS_TAG_TYPE_UINT | 6, ++ /** Key type. */ ++ OH_HUKS_TAG_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT | 7, ++ /** Associated authentication data. */ ++ OH_HUKS_TAG_ASSOCIATED_DATA = OH_HUKS_TAG_TYPE_BYTES | 8, ++ /** Field for key encryption and decryption. */ ++ OH_HUKS_TAG_NONCE = OH_HUKS_TAG_TYPE_BYTES | 9, ++ /** Initialized vector (IV). */ ++ OH_HUKS_TAG_IV = OH_HUKS_TAG_TYPE_BYTES | 10, ++ ++ /** Information generated during key derivation. */ ++ OH_HUKS_TAG_INFO = OH_HUKS_TAG_TYPE_BYTES | 11, ++ /** Salt value used for key derivation. */ ++ OH_HUKS_TAG_SALT = OH_HUKS_TAG_TYPE_BYTES | 12, ++ /** Number of iterations for key derivation. */ ++ OH_HUKS_TAG_ITERATION = OH_HUKS_TAG_TYPE_UINT | 14, ++ ++ /** Type of the generated key. For details, see {@link OH_Huks_KeyGenerateType}. */ ++ OH_HUKS_TAG_KEY_GENERATE_TYPE = OH_HUKS_TAG_TYPE_UINT | 15, ++ /** Algorithm used in key agreement. */ ++ OH_HUKS_TAG_AGREE_ALG = OH_HUKS_TAG_TYPE_UINT | 19, ++ /** Alias of the public key used for key agreement. */ ++ OH_HUKS_TAG_AGREE_PUBLIC_KEY_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL | 20, ++ /** Alias of the private key used for key agreement. */ ++ OH_HUKS_TAG_AGREE_PRIVATE_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES | 21, ++ /** Public key used for key agreement. */ ++ OH_HUKS_TAG_AGREE_PUBLIC_KEY = OH_HUKS_TAG_TYPE_BYTES | 22, ++ /** Alias of the key. */ ++ OH_HUKS_TAG_KEY_ALIAS = OH_HUKS_TAG_TYPE_BYTES | 23, ++ /** Size of the derived key. */ ++ OH_HUKS_TAG_DERIVE_KEY_SIZE = OH_HUKS_TAG_TYPE_UINT | 24, ++ /** Type of the key to import. For details, see {@link OH_Huks_ImportKeyType}. */ ++ OH_HUKS_TAG_IMPORT_KEY_TYPE = OH_HUKS_TAG_TYPE_UINT | 25, ++ /** Algorithm suite required for encrypted imports. */ ++ OH_HUKS_TAG_UNWRAP_ALGORITHM_SUITE = OH_HUKS_TAG_TYPE_UINT | 26, ++ /** Storage mode of derived or agree keys. For details, see {@link OH_Huks_KeyStorageType}. */ ++ OH_HUKS_TAG_DERIVED_AGREED_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT | 29, ++ /** Type of rsa pss salt length. */ ++ OH_HUKS_TAG_RSA_PSS_SALT_LEN_TYPE = OH_HUKS_TAG_TYPE_UINT | 30, ++ ++ /** Tags for access control and user authentication. The value range is 301 to 500. */ ++ /** All users in the multi-user scenario. */ ++ OH_HUKS_TAG_ALL_USERS = OH_HUKS_TAG_TYPE_BOOL | 301, ++ /** Multi-user ID. */ ++ OH_HUKS_TAG_USER_ID = OH_HUKS_TAG_TYPE_UINT | 302, ++ /** Specifies whether key access control is required. */ ++ OH_HUKS_TAG_NO_AUTH_REQUIRED = OH_HUKS_TAG_TYPE_BOOL | 303, ++ /** User authentication type in key access control. */ ++ OH_HUKS_TAG_USER_AUTH_TYPE = OH_HUKS_TAG_TYPE_UINT | 304, ++ /** Timeout duration for key access. */ ++ OH_HUKS_TAG_AUTH_TIMEOUT = OH_HUKS_TAG_TYPE_UINT | 305, ++ /** Authentication token for the key. */ ++ OH_HUKS_TAG_AUTH_TOKEN = OH_HUKS_TAG_TYPE_BYTES | 306, ++ /** ++ * Access control type. For details, see {@link OH_Huks_AuthAccessType}. ++ * This parameter must be set together with the user authentication type. ++ */ ++ OH_HUKS_TAG_KEY_AUTH_ACCESS_TYPE = OH_HUKS_TAG_TYPE_UINT | 307, ++ /** Signature type for the key to be generated or imported. */ ++ OH_HUKS_TAG_KEY_SECURE_SIGN_TYPE = OH_HUKS_TAG_TYPE_UINT | 308, ++ /** Challenge type. For details, see {@link OH_Huks_ChallengeType}. */ ++ OH_HUKS_TAG_CHALLENGE_TYPE = OH_HUKS_TAG_TYPE_UINT | 309, ++ /** ++ * Position of the 8-byte valid value in a custom challenge. ++ * For details, see {@link OH_Huks_ChallengePosition}. ++ */ ++ OH_HUKS_TAG_CHALLENGE_POS = OH_HUKS_TAG_TYPE_UINT | 310, ++ ++ /** Purpose of key authentication */ ++ OH_HUKS_TAG_KEY_AUTH_PURPOSE = OH_HUKS_TAG_TYPE_UINT | 311, ++ ++ /** Tags for key attestation. The value range is 501 to 600. */ ++ /** Challenge value used in the attestation. */ ++ OH_HUKS_TAG_ATTESTATION_CHALLENGE = OH_HUKS_TAG_TYPE_BYTES | 501, ++ /** Application ID used in the attestation. */ ++ OH_HUKS_TAG_ATTESTATION_APPLICATION_ID = OH_HUKS_TAG_TYPE_BYTES | 502, ++ /** Alias of the key. */ ++ OH_HUKS_TAG_ATTESTATION_ID_ALIAS = OH_HUKS_TAG_TYPE_BYTES | 511, ++ /** Security level used in the attestation. */ ++ OH_HUKS_TAG_ATTESTATION_ID_SEC_LEVEL_INFO = OH_HUKS_TAG_TYPE_BYTES | 514, ++ /** Version information used in the attestation. */ ++ OH_HUKS_TAG_ATTESTATION_ID_VERSION_INFO = OH_HUKS_TAG_TYPE_BYTES | 515, ++ ++ /** ++ * 601 to 1000 are reserved for other tags. ++ * ++ * Extended tags. The value range is 1001 to 9999. ++ */ ++ /** Specifies whether it is a key alias. */ ++ OH_HUKS_TAG_IS_KEY_ALIAS = OH_HUKS_TAG_TYPE_BOOL | 1001, ++ /** Key storage mode. For details, see {@link OH_Huks_KeyStorageType}. */ ++ OH_HUKS_TAG_KEY_STORAGE_FLAG = OH_HUKS_TAG_TYPE_UINT | 1002, ++ /** Specifies whether to allow the key to be wrapped. */ ++ OH_HUKS_TAG_IS_ALLOWED_WRAP = OH_HUKS_TAG_TYPE_BOOL | 1003, ++ /** Key wrap type. */ ++ OH_HUKS_TAG_KEY_WRAP_TYPE = OH_HUKS_TAG_TYPE_UINT | 1004, ++ /** Authentication ID. */ ++ OH_HUKS_TAG_KEY_AUTH_ID = OH_HUKS_TAG_TYPE_BYTES | 1005, ++ /** Role of the key. */ ++ OH_HUKS_TAG_KEY_ROLE = OH_HUKS_TAG_TYPE_UINT | 1006, ++ /** Key flag. For details, see {@link OH_Huks_KeyFlag}. */ ++ OH_HUKS_TAG_KEY_FLAG = OH_HUKS_TAG_TYPE_UINT | 1007, ++ /** Specifies whether this API is asynchronous. */ ++ OH_HUKS_TAG_IS_ASYNCHRONIZED = OH_HUKS_TAG_TYPE_UINT | 1008, ++ /** Key domain. */ ++ OH_HUKS_TAG_KEY_DOMAIN = OH_HUKS_TAG_TYPE_UINT | 1011, ++ ++ /** Authenticated Encryption. */ ++ OH_HUKS_TAG_AE_TAG = OH_HUKS_TAG_TYPE_BYTES | 10009, ++ ++ /** ++ * 11000 to 12000 are reserved. ++ * ++ * 20001 to N are reserved for other tags. ++ */ ++ /** Symmetric key data. */ ++ OH_HUKS_TAG_SYMMETRIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES | 20001, ++ /** Public key data of the asymmetric key pair. */ ++ OH_HUKS_TAG_ASYMMETRIC_PUBLIC_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES | 20002, ++ /** Private key data of the asymmetric key pair. */ ++ OH_HUKS_TAG_ASYMMETRIC_PRIVATE_KEY_DATA = OH_HUKS_TAG_TYPE_BYTES | 20003, ++}; ++ ++/** ++ * @brief Defines the return data, including the result code and message. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Result { ++ /** Result code. */ ++ int32_t errorCode; ++ /** Description of the result code. */ ++ const char *errorMsg; ++ /** Other data returned. */ ++ uint8_t *data; ++}; ++ ++/** ++ * @brief Defines the structure for storing data. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Blob { ++ /** Data size. */ ++ uint32_t size; ++ /** Pointer to the memory in which the data is stored. */ ++ uint8_t *data; ++}; ++ ++/** ++ * @brief Defines the parameter structure in a parameter set. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_Param { ++ /** Tag value. */ ++ uint32_t tag; ++ ++ union { ++ /** Parameter of the Boolean type. */ ++ bool boolParam; ++ /** Parameter of the int32_t type. */ ++ int32_t int32Param; ++ /** Parameter of the uint32_t type. */ ++ uint32_t uint32Param; ++ /** Parameter of the uint64_t type. */ ++ uint64_t uint64Param; ++ /** Parameter of the struct OH_Huks_Blob type. */ ++ struct OH_Huks_Blob blob; ++ }; ++}; ++ ++/** ++ * @brief Defines the structure of the parameter set. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_ParamSet { ++ /** Memory size of the parameter set. */ ++ uint32_t paramSetSize; ++ /** Number of parameters in the parameter set. */ ++ uint32_t paramsCnt; ++ /** Parameter array. */ ++ struct OH_Huks_Param params[]; ++}; ++ ++/** ++ * @brief Defines the structure of the certificate chain. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_CertChain { ++ /** Pointer to the certificate data. */ ++ struct OH_Huks_Blob *certs; ++ /** Number of certificates. */ ++ uint32_t certsCount; ++}; ++ ++/** ++ * @brief Defines the key information structure. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyInfo { ++ /** Alias of the key. */ ++ struct OH_Huks_Blob alias; ++ /** Pointer to the key parameter set. */ ++ struct OH_Huks_ParamSet *paramSet; ++}; ++ ++/** ++ * @brief Defines the structure of a public key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_PubKeyInfo { ++ /** Algorithm of the public key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the public key. */ ++ uint32_t keySize; ++ /** Length of the n or X value. */ ++ uint32_t nOrXSize; ++ /** Length of the e or Y value. */ ++ uint32_t eOrYSize; ++ /** Placeholder size. */ ++ uint32_t placeHolder; ++}; ++ ++/** ++ * @brief Defines the structure of an RSA key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyMaterialRsa { ++ /** Algorithm of the key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the key. */ ++ uint32_t keySize; ++ /** Length of the n value. */ ++ uint32_t nSize; ++ /** Length of the e value. */ ++ uint32_t eSize; ++ /** Length of the d value. */ ++ uint32_t dSize; ++}; ++ ++/** ++ * @brief Defines the structure of an ECC key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyMaterialEcc { ++ /** Algorithm of the key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the key. */ ++ uint32_t keySize; ++ /** Length of the x value. */ ++ uint32_t xSize; ++ /** Length of the y value. */ ++ uint32_t ySize; ++ /** Length of the z value. */ ++ uint32_t zSize; ++}; ++ ++/** ++ * @brief Defines the structure of a DSA key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyMaterialDsa { ++ /** Algorithm of the key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the key. */ ++ uint32_t keySize; ++ /** Length of the x value. */ ++ uint32_t xSize; ++ /** Length of the y value. */ ++ uint32_t ySize; ++ /** Length of the p value. */ ++ uint32_t pSize; ++ /** Length of the q value. */ ++ uint32_t qSize; ++ /** Length of the g value. */ ++ uint32_t gSize; ++}; ++ ++/** ++ * @brief Defines the structure of a DH key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyMaterialDh { ++ /** Algorithm of the key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the DH key. */ ++ uint32_t keySize; ++ /** Length of the public key. */ ++ uint32_t pubKeySize; ++ /** Length of the private key. */ ++ uint32_t priKeySize; ++ /** Reserved. */ ++ uint32_t reserved; ++}; ++ ++/** ++ * @brief Defines the structure of a 25519 key. ++ * ++ * @since 9 ++ * @version 1.0 ++ */ ++struct OH_Huks_KeyMaterial25519 { ++ /** Algorithm of the key. */ ++ enum OH_Huks_KeyAlg keyAlg; ++ /** Length of the 25519 key. */ ++ uint32_t keySize; ++ /** Length of the public key. */ ++ uint32_t pubKeySize; ++ /** Length of the private key. */ ++ uint32_t priKeySize; ++ /** Reserved. */ ++ uint32_t reserved; ++}; ++ ++#ifdef __cplusplus ++} ++#endif ++ ++/** @} */ ++#endif /* NATIVE_OH_HUKS_TYPE_H */ +diff --git a/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/a.out.h b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/a.out.h +new file mode 100644 +index 0000000..3a1b845 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/a.out.h +@@ -0,0 +1,34 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_X86_A_OUT_H ++#define _ASM_X86_A_OUT_H ++struct exec { ++ unsigned int a_info; ++ unsigned a_text; ++ unsigned a_data; ++ unsigned a_bss; ++ unsigned a_syms; ++ unsigned a_entry; ++ unsigned a_trsize; ++ unsigned a_drsize; ++}; ++#define N_TRSIZE(a) ((a).a_trsize) ++#define N_DRSIZE(a) ((a).a_drsize) ++#define N_SYMSIZE(a) ((a).a_syms) ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/auxvec.h b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/auxvec.h +new file mode 100644 +index 0000000..4fd53f0 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/auxvec.h +@@ -0,0 +1,26 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_X86_AUXVEC_H ++#define _ASM_X86_AUXVEC_H ++#ifdef __i386__ ++#define AT_SYSINFO 32 ++#endif ++#define AT_SYSINFO_EHDR 33 ++#define AT_VECTOR_SIZE_ARCH 2 ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bitsperlong.h b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bitsperlong.h +new file mode 100644 +index 0000000..7eca377 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bitsperlong.h +@@ -0,0 +1,27 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef __ASM_X86_BITSPERLONG_H ++#define __ASM_X86_BITSPERLONG_H ++#if defined(__x86_64__) && !defined(__ILP32__) ++#define __BITS_PER_LONG 64 ++#else ++#define __BITS_PER_LONG 32 ++#endif ++#include ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/boot.h b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/boot.h +new file mode 100644 +index 0000000..7cbb691 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/boot.h +@@ -0,0 +1,24 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _UAPI_ASM_X86_BOOT_H ++#define _UAPI_ASM_X86_BOOT_H ++#define NORMAL_VGA 0xffff ++#define EXTENDED_VGA 0xfffe ++#define ASK_VGA 0xfffd ++#endif +diff --git a/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bootparam.h b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bootparam.h +new file mode 100644 +index 0000000..7401135 +--- /dev/null ++++ b/build/ohos/ohos-sysroot/usr/include/i686-linux-ohos/asm/bootparam.h +@@ -0,0 +1,195 @@ ++/**************************************************************************** ++ **************************************************************************** ++ *** ++ *** This header was automatically generated from a Linux kernel header ++ *** of the same name, to make information necessary for userspace to ++ *** call into the kernel available to libc. It contains only constants, ++ *** structures, and macros generated from the original header, and thus, ++ *** contains no copyrightable information. ++ *** ++ *** To edit the content of this header, modify the corresponding ++ *** source file (e.g. under external/kernel-headers/original/) then ++ *** run bionic/libc/kernel/tools/update_all.py ++ *** ++ *** Any manual change here will be lost the next time this script will ++ *** be run. You've been warned! ++ *** ++ **************************************************************************** ++ ****************************************************************************/ ++#ifndef _ASM_X86_BOOTPARAM_H ++#define _ASM_X86_BOOTPARAM_H ++#define SETUP_NONE 0 ++#define SETUP_E820_EXT 1 ++#define SETUP_DTB 2 ++#define SETUP_PCI 3 ++#define SETUP_EFI 4 ++#define SETUP_APPLE_PROPERTIES 5 ++#define SETUP_JAILHOUSE 6 ++#define SETUP_INDIRECT (1 << 31) ++#define SETUP_TYPE_MAX (SETUP_INDIRECT | SETUP_JAILHOUSE) ++#define RAMDISK_IMAGE_START_MASK 0x07FF ++#define RAMDISK_PROMPT_FLAG 0x8000 ++#define RAMDISK_LOAD_FLAG 0x4000 ++#define LOADED_HIGH (1 << 0) ++#define KASLR_FLAG (1 << 1) ++#define QUIET_FLAG (1 << 5) ++#define KEEP_SEGMENTS (1 << 6) ++#define CAN_USE_HEAP (1 << 7) ++#define XLF_KERNEL_64 (1 << 0) ++#define XLF_CAN_BE_LOADED_ABOVE_4G (1 << 1) ++#define XLF_EFI_HANDOVER_32 (1 << 2) ++#define XLF_EFI_HANDOVER_64 (1 << 3) ++#define XLF_EFI_KEXEC (1 << 4) ++#define XLF_5LEVEL (1 << 5) ++#define XLF_5LEVEL_ENABLED (1 << 6) ++#ifndef __ASSEMBLY__ ++#include ++#include ++#include ++#include ++#include ++#include