[-]
[+]
|
Changed |
_service:tar_git:libhybris.changes
|
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris.spec
^
|
|
[-]
[+]
|
Deleted |
_service:tar_git:libhybris-0.0.5.35.tar.bz2/libhybris/hybris/INSTALL
^
|
@@ -1,370 +0,0 @@
-Installation Instructions
-*************************
-
-Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation,
-Inc.
-
- Copying and distribution of this file, with or without modification,
-are permitted in any medium without royalty provided the copyright
-notice and this notice are preserved. This file is offered as-is,
-without warranty of any kind.
-
-Basic Installation
-==================
-
- Briefly, the shell commands `./configure; make; make install' should
-configure, build, and install this package. The following
-more-detailed instructions are generic; see the `README' file for
-instructions specific to this package. Some packages provide this
-`INSTALL' file but do not implement all of the features documented
-below. The lack of an optional feature in a given package is not
-necessarily a bug. More recommendations for GNU packages can be found
-in *note Makefile Conventions: (standards)Makefile Conventions.
-
- The `configure' shell script attempts to guess correct values for
-various system-dependent variables used during compilation. It uses
-those values to create a `Makefile' in each directory of the package.
-It may also create one or more `.h' files containing system-dependent
-definitions. Finally, it creates a shell script `config.status' that
-you can run in the future to recreate the current configuration, and a
-file `config.log' containing compiler output (useful mainly for
-debugging `configure').
-
- It can also use an optional file (typically called `config.cache'
-and enabled with `--cache-file=config.cache' or simply `-C') that saves
-the results of its tests to speed up reconfiguring. Caching is
-disabled by default to prevent problems with accidental use of stale
-cache files.
-
- If you need to do unusual things to compile the package, please try
-to figure out how `configure' could check whether to do them, and mail
-diffs or instructions to the address given in the `README' so they can
-be considered for the next release. If you are using the cache, and at
-some point `config.cache' contains results you don't want to keep, you
-may remove or edit it.
-
- The file `configure.ac' (or `configure.in') is used to create
-`configure' by a program called `autoconf'. You need `configure.ac' if
-you want to change it or regenerate `configure' using a newer version
-of `autoconf'.
-
- The simplest way to compile this package is:
-
- 1. `cd' to the directory containing the package's source code and type
- `./configure' to configure the package for your system.
-
- Running `configure' might take a while. While running, it prints
- some messages telling which features it is checking for.
-
- 2. Type `make' to compile the package.
-
- 3. Optionally, type `make check' to run any self-tests that come with
- the package, generally using the just-built uninstalled binaries.
-
- 4. Type `make install' to install the programs and any data files and
- documentation. When installing into a prefix owned by root, it is
- recommended that the package be configured and built as a regular
- user, and only the `make install' phase executed with root
- privileges.
-
- 5. Optionally, type `make installcheck' to repeat any self-tests, but
- this time using the binaries in their final installed location.
- This target does not install anything. Running this target as a
- regular user, particularly if the prior `make install' required
- root privileges, verifies that the installation completed
- correctly.
-
- 6. You can remove the program binaries and object files from the
- source code directory by typing `make clean'. To also remove the
- files that `configure' created (so you can compile the package for
- a different kind of computer), type `make distclean'. There is
- also a `make maintainer-clean' target, but that is intended mainly
- for the package's developers. If you use it, you may have to get
- all sorts of other programs in order to regenerate files that came
- with the distribution.
-
- 7. Often, you can also type `make uninstall' to remove the installed
- files again. In practice, not all packages have tested that
- uninstallation works correctly, even though it is required by the
- GNU Coding Standards.
-
- 8. Some packages, particularly those that use Automake, provide `make
- distcheck', which can by used by developers to test that all other
- targets like `make install' and `make uninstall' work correctly.
- This target is generally not run by end users.
-
-Compilers and Options
-=====================
-
- Some systems require unusual options for compilation or linking that
-the `configure' script does not know about. Run `./configure --help'
-for details on some of the pertinent environment variables.
-
- You can give `configure' initial values for configuration parameters
-by setting variables in the command line or in the environment. Here
-is an example:
-
- ./configure CC=c99 CFLAGS=-g LIBS=-lposix
-
- *Note Defining Variables::, for more details.
-
-Compiling For Multiple Architectures
-====================================
-
- You can compile the package for more than one kind of computer at the
-same time, by placing the object files for each architecture in their
-own directory. To do this, you can use GNU `make'. `cd' to the
-directory where you want the object files and executables to go and run
-the `configure' script. `configure' automatically checks for the
-source code in the directory that `configure' is in and in `..'. This
-is known as a "VPATH" build.
-
- With a non-GNU `make', it is safer to compile the package for one
-architecture at a time in the source code directory. After you have
-installed the package for one architecture, use `make distclean' before
-reconfiguring for another architecture.
-
- On MacOS X 10.5 and later systems, you can create libraries and
-executables that work on multiple system types--known as "fat" or
-"universal" binaries--by specifying multiple `-arch' options to the
-compiler but only a single `-arch' option to the preprocessor. Like
-this:
-
- ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
- CPP="gcc -E" CXXCPP="g++ -E"
-
- This is not guaranteed to produce working output in all cases, you
-may have to build one architecture at a time and combine the results
-using the `lipo' tool if you have problems.
-
-Installation Names
-==================
-
- By default, `make install' installs the package's commands under
-`/usr/local/bin', include files under `/usr/local/include', etc. You
-can specify an installation prefix other than `/usr/local' by giving
-`configure' the option `--prefix=PREFIX', where PREFIX must be an
-absolute file name.
-
- You can specify separate installation prefixes for
-architecture-specific files and architecture-independent files. If you
-pass the option `--exec-prefix=PREFIX' to `configure', the package uses
-PREFIX as the prefix for installing programs and libraries.
-Documentation and other data files still use the regular prefix.
-
- In addition, if you use an unusual directory layout you can give
-options like `--bindir=DIR' to specify different values for particular
-kinds of files. Run `configure --help' for a list of the directories
-you can set and what kinds of files go in them. In general, the
-default for these options is expressed in terms of `${prefix}', so that
-specifying just `--prefix' will affect all of the other directory
-specifications that were not explicitly provided.
-
- The most portable way to affect installation locations is to pass the
-correct locations to `configure'; however, many packages provide one or
-both of the following shortcuts of passing variable assignments to the
-`make install' command line to change installation locations without
-having to reconfigure or recompile.
-
- The first method involves providing an override variable for each
-affected directory. For example, `make install
-prefix=/alternate/directory' will choose an alternate location for all
-directory configuration variables that were expressed in terms of
-`${prefix}'. Any directories that were specified during `configure',
-but not in terms of `${prefix}', must each be overridden at install
-time for the entire installation to be relocated. The approach of
-makefile variable overrides for each directory variable is required by
-the GNU Coding Standards, and ideally causes no recompilation.
-However, some platforms have known limitations with the semantics of
-shared libraries that end up requiring recompilation when using this
-method, particularly noticeable in packages that use GNU Libtool.
-
- The second method involves providing the `DESTDIR' variable. For
-example, `make install DESTDIR=/alternate/directory' will prepend
-`/alternate/directory' before all installation names. The approach of
-`DESTDIR' overrides is not required by the GNU Coding Standards, and
-does not work on platforms that have drive letters. On the other hand,
-it does better at avoiding recompilation issues, and works well even
-when some directory options were not specified in terms of `${prefix}'
-at `configure' time.
-
-Optional Features
-=================
-
- If the package supports it, you can cause programs to be installed
-with an extra prefix or suffix on their names by giving `configure' the
-option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
-
- Some packages pay attention to `--enable-FEATURE' options to
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/compat/camera/camera_compatibility_layer.cpp
^
|
@@ -141,10 +141,12 @@
(void) data;
}
+#if ANDROID_VERSION_MAJOR >= 7
void CameraControl::postRecordingFrameHandleTimestamp(nsecs_t /*timestamp*/, native_handle_t* /*handle*/)
{
REPORT_FUNCTION();
}
+#endif
#if ANDROID_VERSION_MAJOR==4 && ANDROID_VERSION_MINOR<=3
namespace android
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/compat/camera/direct_camera_test.cpp
^
|
@@ -121,12 +121,12 @@
void raw_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
}
void jpeg_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
char fn[256];
sprintf(fn, "/cache/shot_%d.jpeg", shot_counter);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/compat/media/direct_media_test.cpp
^
|
@@ -289,7 +289,7 @@
static void print_gl_error(unsigned int line)
{
GLint error = glGetError();
- printf("GL error: %#04x (line: %d)\n", error, line);
+ printf("GL error: %#04x (line: %u)\n", error, line);
}
static int update_gl_buffer(RenderData *render_data, EGLDisplay *disp, EGLSurface *surface)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/compat/media/media_format_layer_priv.cpp
^
|
@@ -46,5 +46,3 @@
#ifdef __cplusplus
}
#endif
-
-#endif
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/compat/media/media_recorder.cpp
^
|
@@ -34,7 +34,9 @@
#include <media/mediaplayer.h> // for MEDIA_ERROR_SERVER_DIED
#include <gui/IGraphicBufferProducer.h>
namespace a = android;
+#if ANDROID_VERSION_MAJOR >= 7
namespace ah = android::hardware;
+#endif
#if ANDROID_VERSION_MAJOR >= 7
a::status_t a::MediaRecorder::setCamera(const sp<ah::ICamera>& camera, const sp<ICameraRecordingProxy>& proxy)
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/autogen.sh
^
|
@@ -1,14 +1,14 @@
#!/bin/sh
-srcdir=`dirname $0`
+srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
-ORIGDIR=`pwd`
+ORIGDIR=$(pwd)
cd $srcdir
autoreconf -v --install || exit 1
-cd $ORIGDIR || exit $?
+cd "$ORIGDIR" || exit $?
-if [ x$NOCONFIGURE = x ]; then
+if [ x"$NOCONFIGURE" = x ]; then
$srcdir/configure "$@"
fi
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/Makefile.am
^
|
@@ -26,6 +26,7 @@
strlcat.c \
logging.c \
sysconf.c \
+ dso_handle_counters.cpp \
legacy_properties/properties.c \
legacy_properties/cache.c
@@ -87,10 +88,15 @@
if HAS_ANDROID_8_0_0
libhybris_common_la_CPPFLAGS += -DWANT_LINKER_O
endif
+
+libhybris_common_la_CXXFLAGS = \
+ -std=gnu++11
+
libhybris_common_la_LDFLAGS = \
-ldl \
-lrt \
-pthread \
-lc \
-lstdc++ \
+ -lpthread \
-version-info "$(LT_CURRENT)":"$(LT_REVISION)":"$(LT_AGE)"
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/dso_handle_counters.cpp
^
|
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2020 UBports Foundation
+ *
+ * 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.
+ *
+ */
+
+#include <unordered_map>
+#include <mutex>
+
+#include <dlfcn.h>
+#include <hybris/common/dlfcn.h>
+
+#include "logging.h"
+#define LOGD(message, ...) HYBRIS_DEBUG_LOG(HOOKS, message, ##__VA_ARGS__)
+
+#include "dso_handle_counters.h"
+
+/*
+ * This file implements a reference-counting system for dso_handle symbols
+ * having outstanding thread-local variables. This is inspired by an
+ * implementation in Android's linker, but instead of using internal Linker
+ * mechanism, this file uses public linker functions to find the library and
+ * dlload() it to increment reference count.
+ *
+ * This file is implemented in C++ so that I can use C++'s unordered_map.
+ *
+ * See https://github.com/aosp-mirror/platform_bionic/commit/55547db4345ee692b9cfe727c97dd860ed8263f8
+ */
+
+struct DsoHandleInfo {
+ size_t counter;
+ void *dl_handle;
+};
+
+static std::unordered_map<void*, struct DsoHandleInfo *> g_dso_handle_counters;
+static std::mutex g_dso_handle_counters_mutex;
+
+void __hybris_add_thread_local_dtor(void* dso_handle)
+{
+ if (dso_handle == nullptr) {
+ return;
+ }
+
+ std::lock_guard<std::mutex> l(g_dso_handle_counters_mutex);
+
+ auto it = g_dso_handle_counters.find(dso_handle);
+ if (it != g_dso_handle_counters.end()) {
+ ++it->second->counter;
+ } else {
+ Dl_info dso_symbol_info;
+
+ if (hybris_dladdr(dso_handle, &dso_symbol_info)) {
+ struct DsoHandleInfo *info = new struct DsoHandleInfo;
+ info->counter = 1U;
+ info->dl_handle = hybris_dlopen(dso_symbol_info.dli_fname, /* flags */ 0);
+
+ g_dso_handle_counters[dso_handle] = info;
+ } else {
+ LOGD(
+ "__hybris_add_thread_local_dtor: Couldn't find a library by dso_handle=%p",
+ dso_handle);
+ // Nothing we can do.
+ }
+ }
+}
+
+void __hybris_remove_thread_local_dtor(void* dso_handle)
+{
+ if (dso_handle == nullptr) {
+ return;
+ }
+
+ // Do dlclose() outside the lock to avoid deadlock.
+ struct DsoHandleInfo *info = nullptr;
+
+ {
+ std::lock_guard<std::mutex> l(g_dso_handle_counters_mutex);
+
+ auto it = g_dso_handle_counters.find(dso_handle);
+
+ if (it == g_dso_handle_counters.end()) {
+ LOGD(
+ "__hybris_remove_thread_local_dtor: Couldn't find a library by dso_handle=%p",
+ dso_handle);
+ return;
+ }
+
+ if (--it->second->counter == 0) {
+ info = it->second;
+ g_dso_handle_counters.erase(it);
+ }
+ }
+
+ if (info) {
+ hybris_dlclose(info->dl_handle);
+ delete info;
+ }
+}
|
[-]
[+]
|
Added |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/dso_handle_counters.h
^
|
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2020 UBports Foundation
+ *
+ * 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 _HYBRIS_DSO_HANDLE_COUNTERS_H_
+#define _HYBRIS_DSO_HANDLE_COUNTERS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void __hybris_add_thread_local_dtor(void* dso_handle);
+void __hybris_remove_thread_local_dtor(void* dso_handle);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _HYBRIS_DSO_HANDLE_COUNTERS_H_
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/hooks.c
^
|
@@ -85,6 +85,8 @@
// this is also used in bionic:
#define bool int
+#include "dso_handle_counters.h"
+
#ifdef WANT_ARM_TRACING
#include "wrappers.h"
#endif
@@ -325,9 +327,19 @@
{
TRACE_HOOK("size %zu", size);
+ void *res = malloc(size);
+
+ TRACE_HOOK("res %p", res);
+
+ return res;
+}
+
#ifdef WANT_ADRENO_QUIRKS
- if(size == 4) size = 5;
-#endif
+static void *_hybris_hook_malloc45(size_t size)
+{
+ TRACE_HOOK("size %zu", size);
+
+ if (size == 4) size = 5;
void *res = malloc(size);
@@ -335,6 +347,7 @@
return res;
}
+#endif
static size_t _hybris_hook_malloc_usable_size (void *ptr)
{
@@ -347,6 +360,10 @@
{
TRACE_HOOK("dst %p src %p len %zu", dst, src, len);
+ if (src == dst) {
+ return dst;
+ }
+
if (src == NULL || dst == NULL)
return dst;
@@ -1387,7 +1404,7 @@
typedef off_t bionic_fpos_t;
/* "struct __sFILE" from bionic/libc/include/stdio.h */
-struct __attribute__((packed)) bionic_file {
+struct bionic_file {
unsigned char *_p; /* current position in (some) buffer */
int _r; /* read space left for getc() */
int _w; /* write space left for putc() */
@@ -2054,28 +2071,28 @@
static int _hybris_hook___system_property_update(void *pi, const char *value, unsigned int len)
{
- TRACE_HOOK("pi %p value '%s' len %d", pi, value, len);
+ TRACE_HOOK("pi %p value '%s' len %u", pi, value, len);
return 0;
}
static int _hybris_hook___system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen)
{
- TRACE_HOOK("name '%s' namelen %d value '%s' valuelen %d",
+ TRACE_HOOK("name '%s' namelen %u value '%s' valuelen %u",
name, namelen, value, valuelen);
return 0;
}
static unsigned int _hybris_hook___system_property_wait_any(unsigned int serial)
{
- TRACE_HOOK("serial %d", serial);
+ TRACE_HOOK("serial %u", serial);
return 0;
}
static const void *_hybris_hook___system_property_find_nth(unsigned n)
{
- TRACE_HOOK("n %d", n);
+ TRACE_HOOK("n %u", n);
return NULL;
}
@@ -2148,6 +2165,8 @@
extern int __cxa_atexit(void (*)(void*), void*, void*);
extern void __cxa_finalize(void * d);
+extern int __cxa_thread_atexit(void (*dtor)(void *), void *obj,
+ void *dso_symbol);
struct open_redirect {
const char *from;
@@ -2224,6 +2243,46 @@
return tls_hooks;
}
+struct __wrapped_atexit {
+ void (*dtor)(void *);
+ void *obj;
+ void *dso_handle;
+};
+
+static void __dtor_wrapper(void *obj) {
+ struct __wrapped_atexit *wrapped = obj;
+ /* Call the wrapped dtor. */
+ wrapped->dtor(wrapped->obj);
+ /* Reduce dso_handle's ref count. */
+ __hybris_remove_thread_local_dtor(wrapped->dso_handle);
+ /* Free the wrapper. */
+ free(wrapped);
+}
+
+extern const void * const __dso_handle;
+
+static int _hybris_hook___cxa_thread_atexit(void (*dtor)(void *), void *obj,
+ void *dso_symbol)
+{
+ struct __wrapped_atexit *wrapped = malloc(sizeof(struct __wrapped_atexit));
+ wrapped->dtor = dtor;
+ wrapped->obj = obj;
+ wrapped->dso_handle = dso_symbol;
+
+ /* Call Glibc's implementation. Pass our symbol to prevent ourself from
+ * being unloaded. */
+ int ret;
+ if ((ret = __cxa_thread_atexit(__dtor_wrapper, wrapped, &__dso_handle)) != 0) {
+ free(wrapped);
+ return ret;
+ }
+
+ /* Increase refcount of this dso_symbol. */
+ __hybris_add_thread_local_dtor(dso_symbol);
+
+ return ret;
+}
+
int _hybris_hook_prctl(int option, unsigned long arg2, unsigned long arg3,
unsigned long arg4, unsigned long arg5)
{
@@ -2607,7 +2666,7 @@
void _hybris_hook_android_set_application_target_sdk_version(uint32_t target)
{
- TRACE("target %d", target);
+ TRACE("target %u", target);
_android_set_application_target_sdk_version(target);
}
@@ -2653,12 +2712,9 @@
return _android_get_exported_namespace(name);
}
-/* this was added while debugging in the hopes to get a backtrace from a double
- * free crash. Unfortunately it fixes the problem so we cannot get a proper
- * backtrace to fix the underlying problem. */
void _hybris_hook_free(void *ptr)
{
- if (ptr) ((char*)ptr)[0] = 0;
+ TRACE_HOOK("ptr %p", ptr);
free(ptr);
}
@@ -2958,8 +3014,10 @@
HOOK_DIRECT_NO_DEBUG(access),
/* grp.h */
HOOK_DIRECT_NO_DEBUG(getgrgid),
+ /* C++ ABI */
HOOK_DIRECT_NO_DEBUG(__cxa_atexit),
HOOK_DIRECT_NO_DEBUG(__cxa_finalize),
+ HOOK_INDIRECT(__cxa_thread_atexit),
/* sys/prctl.h */
HOOK_INDIRECT(prctl),
/* stdio_ext.h */
@@ -3180,6 +3238,12 @@
return (void*) found;
}
+#ifdef WANT_ADRENO_QUIRKS
+ if (strstr(requester, "libllvm-glnext.so") != NULL && strcmp(sym, "malloc") == 0) {
+ return _hybris_hook_malloc45;
+ }
+#endif
+
if (!sorted)
{
qsort(hooks_properties, HOOKS_SIZE(hooks_properties), sizeof(hooks_properties[0]), hook_cmp);
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/mm/linker.cpp
^
|
@@ -468,7 +468,7 @@
offset += verdef->vd_next;
if (verdef->vd_version != 1) {
- DL_ERR("unsupported verdef[%zd] vd_version: %d (expected 1) library: %s",
+ DL_ERR("unsupported verdef[%zu] vd_version: %d (expected 1) library: %s",
i, verdef->vd_version, si->get_realpath());
return false;
}
@@ -482,7 +482,7 @@
}
if (verdef->vd_cnt == 0) {
- DL_ERR("invalid verdef[%zd] vd_cnt == 0 (version without a name)", i);
+ DL_ERR("invalid verdef[%zu] vd_cnt == 0 (version without a name)", i);
return false;
}
@@ -614,7 +614,7 @@
check_symbol_version(verneed, verdef) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
+ TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zu",
symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(s->st_value),
static_cast<size_t>(s->st_size));
*symbol_index = n;
@@ -633,7 +633,7 @@
uint32_t* symbol_index) const {
uint32_t hash = symbol_name.elf_hash();
- TRACE_TYPE(LOOKUP, "SEARCH %s in %s@%p h=%x(elf) %zd",
+ TRACE_TYPE(LOOKUP, "SEARCH %s in %s@%p h=%x(elf) %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(base), hash, hash % nbucket_);
@@ -654,7 +654,7 @@
if (check_symbol_version(verneed, verdef) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
+ TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(s->st_value),
static_cast<size_t>(s->st_size));
@@ -663,7 +663,7 @@
}
}
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p %x %zd",
+ TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p %x %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(base), hash, hash % nbucket_);
@@ -1609,7 +1609,7 @@
soinfo_unload(si);
}
} else {
- TRACE("not unloading '%s' group, decrementing ref_count to %zd",
+ TRACE("not unloading '%s' group, decrementing ref_count to %zu",
root->get_realpath(), ref_count);
}
}
@@ -1715,7 +1715,7 @@
offset += verneed->vn_next;
if (verneed->vn_version != 1) {
- DL_ERR("unsupported verneed[%zd] vn_version: %d (expected 1)", i, verneed->vn_version);
+ DL_ERR("unsupported verneed[%zu] vn_version: %d (expected 1)", i, verneed->vn_version);
return false;
}
@@ -1726,7 +1726,7 @@
});
if (target_si == nullptr) {
- DL_ERR("cannot find \"%s\" from verneed[%zd] in DT_NEEDED list for \"%s\"",
+ DL_ERR("cannot find \"%s\" from verneed[%zu] in DT_NEEDED list for \"%s\"",
target_soname, i, si_from->get_realpath());
return false;
}
@@ -1817,7 +1817,7 @@
const char* sym_name = nullptr;
ElfW(Addr) addend = get_addend(rel, reloc);
- DEBUG("Processing '%s' relocation at index %zd", get_realpath(), idx);
+ DEBUG("Processing '%s' relocation at index %zu", get_realpath(), idx);
if (type == R_GENERIC_NONE) {
continue;
}
@@ -2216,7 +2216,7 @@
return;
}
- TRACE("[ Calling %s (size %zd) @ %p for '%s' ]", array_name, count, functions, get_realpath());
+ TRACE("[ Calling %s (size %zu) @ %p for '%s' ]", array_name, count, functions, get_realpath());
int begin = reverse ? (count - 1) : 0;
int end = reverse ? -1 : count;
@@ -2270,7 +2270,7 @@
if (!is_main_executable() && preinit_array_ != nullptr) {
// The GNU dynamic linker silently ignores these, but we warn the developer.
- PRINT("\"%s\": ignoring %zd-entry DT_PREINIT_ARRAY in shared library!",
+ PRINT("\"%s\": ignoring %zu-entry DT_PREINIT_ARRAY in shared library!",
get_realpath(), preinit_array_count_);
}
@@ -2591,7 +2591,7 @@
case DT_SYMENT:
if (d->d_un.d_val != sizeof(ElfW(Sym))) {
- DL_ERR("invalid DT_SYMENT: %zd in \"%s\"",
+ DL_ERR("invalid DT_SYMENT: %zu in \"%s\"",
static_cast<size_t>(d->d_un.d_val), get_realpath());
return false;
}
@@ -2675,7 +2675,7 @@
case DT_RELAENT:
if (d->d_un.d_val != sizeof(ElfW(Rela))) {
- DL_ERR("invalid DT_RELAENT: %zd", static_cast<size_t>(d->d_un.d_val));
+ DL_ERR("invalid DT_RELAENT: %zu", static_cast<size_t>(d->d_un.d_val));
return false;
}
break;
@@ -2703,7 +2703,7 @@
case DT_RELENT:
if (d->d_un.d_val != sizeof(ElfW(Rel))) {
- DL_ERR("invalid DT_RELENT: %zd", static_cast<size_t>(d->d_un.d_val));
+ DL_ERR("invalid DT_RELENT: %zu", static_cast<size_t>(d->d_un.d_val));
return false;
}
break;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/mm/linker_phdr.cpp
^
|
@@ -165,7 +165,7 @@
}
if (rc != sizeof(header_)) {
- DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_,
+ DL_ERR("\"%s\" is too small to be an ELF executable: only found %zu bytes", name_,
static_cast<size_t>(rc));
return false;
}
@@ -232,7 +232,7 @@
// Like the kernel, we only accept program header tables that
// are smaller than 64KiB.
if (phdr_num_ < 1 || phdr_num_ > 65536/sizeof(ElfW(Phdr))) {
- DL_ERR("\"%s\" has invalid e_phnum: %zd", name_, phdr_num_);
+ DL_ERR("\"%s\" has invalid e_phnum: %zu", name_, phdr_num_);
return false;
}
@@ -336,14 +336,14 @@
if (load_size_ > reserved_size) {
if (!reserved_hint) {
- DL_ERR("reserved address space %zd smaller than %zd bytes needed for \"%s\"",
+ DL_ERR("reserved address space %zu smaller than %zu bytes needed for \"%s\"",
reserved_size - load_size_, load_size_, name_);
return false;
}
int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS;
start = mmap(mmap_hint, load_size_, PROT_NONE, mmap_flags, -1, 0);
if (start == MAP_FAILED) {
- DL_ERR("couldn't reserve %zd bytes of address space for \"%s\"", load_size_, name_);
+ DL_ERR("couldn't reserve %zu bytes of address space for \"%s\"", load_size_, name_);
return false;
}
} else {
@@ -401,7 +401,7 @@
fd_,
file_offset_ + file_page_start);
if (seg_addr == MAP_FAILED) {
- DL_ERR("couldn't map \"%s\" segment %zd: %s", name_, i, strerror(errno));
+ DL_ERR("couldn't map \"%s\" segment %zu: %s", name_, i, strerror(errno));
return false;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/n/linker_phdr.cpp
^
|
@@ -191,7 +191,7 @@
}
if (rc != sizeof(header_)) {
- DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_.c_str(),
+ DL_ERR("\"%s\" is too small to be an ELF executable: only found %zu bytes", name_.c_str(),
static_cast<size_t>(rc));
return false;
}
@@ -269,7 +269,7 @@
// Like the kernel, we only accept program header tables that
// are smaller than 64KiB.
if (phdr_num_ < 1 || phdr_num_ > 65536/sizeof(ElfW(Phdr))) {
- DL_ERR("\"%s\" has invalid e_phnum: %zd", name_.c_str(), phdr_num_);
+ DL_ERR("\"%s\" has invalid e_phnum: %zu", name_.c_str(), phdr_num_);
return false;
}
@@ -462,19 +462,19 @@
if (load_size_ > reserved_size) {
if (!reserved_hint) {
- DL_ERR("reserved address space %zd smaller than %zd bytes needed for \"%s\"",
+ DL_ERR("reserved address space %zu smaller than %zu bytes needed for \"%s\"",
reserved_size - load_size_, load_size_, name_.c_str());
return false;
}
int mmap_flags = MAP_PRIVATE | MAP_ANONYMOUS;
start = mmap(mmap_hint, load_size_, PROT_NONE, mmap_flags, -1, 0);
if (start == MAP_FAILED) {
- DL_ERR("couldn't reserve %zd bytes of address space for \"%s\"", load_size_, name_.c_str());
+ DL_ERR("couldn't reserve %zu bytes of address space for \"%s\"", load_size_, name_.c_str());
return false;
}
if (strict_hint && (start != mmap_hint)) {
munmap(start, load_size_);
- DL_ERR("couldn't reserve %zd bytes of address space at %p for \"%s\"",
+ DL_ERR("couldn't reserve %zu bytes of address space at %p for \"%s\"",
load_size_, mmap_hint, name_.c_str());
return false;
}
@@ -543,7 +543,7 @@
fd_,
file_offset_ + file_page_start);
if (seg_addr == MAP_FAILED) {
- DL_ERR("couldn't map \"%s\" segment %zd: %s", name_.c_str(), i, strerror(errno));
+ DL_ERR("couldn't map \"%s\" segment %zu: %s", name_.c_str(), i, strerror(errno));
return false;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/o/linker.cpp
^
|
@@ -1853,7 +1853,7 @@
if (ref_count == 0) {
unload_list.push_back(si);
} else {
- TRACE("not unloading '%s' group, decrementing ref_count to %zd",
+ TRACE("not unloading '%s' group, decrementing ref_count to %zu",
si->get_realpath(), ref_count);
}
} else {
@@ -2424,7 +2424,7 @@
offset += verneed->vn_next;
if (verneed->vn_version != 1) {
- DL_ERR("unsupported verneed[%zd] vn_version: %d (expected 1)", i, verneed->vn_version);
+ DL_ERR("unsupported verneed[%zu] vn_version: %d (expected 1)", i, verneed->vn_version);
return false;
}
@@ -2435,7 +2435,7 @@
});
if (target_si == nullptr) {
- DL_ERR("cannot find \"%s\" from verneed[%zd] in DT_NEEDED list for \"%s\"",
+ DL_ERR("cannot find \"%s\" from verneed[%zu] in DT_NEEDED list for \"%s\"",
target_soname, i, si_from->get_realpath());
return false;
}
@@ -2475,7 +2475,7 @@
offset += verdef->vd_next;
if (verdef->vd_version != 1) {
- DL_ERR("unsupported verdef[%zd] vd_version: %d (expected 1) library: %s",
+ DL_ERR("unsupported verdef[%zu] vd_version: %d (expected 1) library: %s",
i, verdef->vd_version, si->get_realpath());
return false;
}
@@ -2489,7 +2489,7 @@
}
if (verdef->vd_cnt == 0) {
- DL_ERR("invalid verdef[%zd] vd_cnt == 0 (version without a name)", i);
+ DL_ERR("invalid verdef[%zu] vd_cnt == 0 (version without a name)", i);
return false;
}
@@ -2599,7 +2599,7 @@
const char* sym_name = nullptr;
ElfW(Addr) addend = get_addend(rel, reloc);
- DEBUG("Processing \"%s\" relocation at index %zd", get_realpath(), idx);
+ DEBUG("Processing \"%s\" relocation at index %zu", get_realpath(), idx);
if (type == R_GENERIC_NONE) {
continue;
}
@@ -3076,7 +3076,7 @@
case DT_SYMENT:
if (d->d_un.d_val != sizeof(ElfW(Sym))) {
- DL_ERR("invalid DT_SYMENT: %zd in \"%s\"",
+ DL_ERR("invalid DT_SYMENT: %zu in \"%s\"",
static_cast<size_t>(d->d_un.d_val), get_realpath());
return false;
}
@@ -3160,7 +3160,7 @@
case DT_RELAENT:
if (d->d_un.d_val != sizeof(ElfW(Rela))) {
- DL_ERR("invalid DT_RELAENT: %zd", static_cast<size_t>(d->d_un.d_val));
+ DL_ERR("invalid DT_RELAENT: %zu", static_cast<size_t>(d->d_un.d_val));
return false;
}
break;
@@ -3188,7 +3188,7 @@
case DT_RELENT:
if (d->d_un.d_val != sizeof(ElfW(Rel))) {
- DL_ERR("invalid DT_RELENT: %zd", static_cast<size_t>(d->d_un.d_val));
+ DL_ERR("invalid DT_RELENT: %zu", static_cast<size_t>(d->d_un.d_val));
return false;
}
break;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/o/linker_cfi.cpp
^
|
@@ -168,13 +168,13 @@
}
uintptr_t cfi_check = soinfo_find_cfi_check(si);
if (cfi_check == 0) {
- INFO("[ CFI add 0x%zx + 0x%zx %s ]", static_cast<uintptr_t>(si->base),
+ INFO("[ CFI add 0x%lx + 0x%lx %s ]", static_cast<uintptr_t>(si->base),
static_cast<uintptr_t>(si->size), si->get_soname());
AddUnchecked(si->base, si->base + si->size);
return true;
}
- INFO("[ CFI add 0x%zx + 0x%zx %s: 0x%zx ]", static_cast<uintptr_t>(si->base),
+ INFO("[ CFI add 0x%lx + 0x%lx %s: 0x%lx ]", static_cast<uintptr_t>(si->base),
static_cast<uintptr_t>(si->size), si->get_soname(), cfi_check);
#ifdef __arm__
// Require Thumb encoding.
@@ -265,7 +265,7 @@
void CFIShadowWriter::BeforeUnload(soinfo* si) {
if (shadow_start == nullptr) return;
if (si->base == 0 || si->size == 0) return;
- INFO("[ CFI remove 0x%zx + 0x%zx: %s ]", static_cast<uintptr_t>(si->base),
+ INFO("[ CFI remove 0x%lx + 0x%lx: %s ]", static_cast<uintptr_t>(si->base),
static_cast<uintptr_t>(si->size), si->get_soname());
AddInvalid(si->base, si->base + si->size);
FixupVmaName();
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/o/linker_config.cpp
^
|
@@ -182,7 +182,7 @@
int result = cp.next_token(&name, &value, &error);
if (result == ConfigParser::kError) {
- DL_WARN("error parsing %s:%zd: %s (ignoring this line)",
+ DL_WARN("error parsing %s:%zu: %s (ignoring this line)",
ld_config_file_path,
cp.lineno(),
error.c_str());
@@ -195,7 +195,7 @@
if (result == ConfigParser::kProperty) {
if (!startsWith(name, "dir.")) {
- DL_WARN("error parsing %s:%zd: unexpected property name \"%s\", "
+ DL_WARN("error parsing %s:%zu: unexpected property name \"%s\", "
"expected format dir.<section_name> (ignoring this line)",
ld_config_file_path,
cp.lineno(),
@@ -209,7 +209,7 @@
}
if (value.empty()) {
- DL_WARN("error parsing %s:%zd: property value is empty (ignoring this line)",
+ DL_WARN("error parsing %s:%zu: property value is empty (ignoring this line)",
ld_config_file_path,
cp.lineno());
continue;
@@ -256,7 +256,7 @@
if (result == ConfigParser::kProperty) {
if (properties->find(name) != properties->end()) {
- DL_WARN("%s:%zd: warning: property \"%s\" redefinition",
+ DL_WARN("%s:%zu: warning: property \"%s\" redefinition",
ld_config_file_path,
cp.lineno(),
name.c_str());
@@ -266,7 +266,7 @@
}
if (result == ConfigParser::kError) {
- DL_WARN("error parsing %s:%zd: %s (ignoring this line)",
+ DL_WARN("error parsing %s:%zu: %s (ignoring this line)",
ld_config_file_path,
cp.lineno(),
error.c_str());
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/o/linker_phdr.cpp
^
|
@@ -198,7 +198,7 @@
}
if (rc != sizeof(header_)) {
- DL_ERR("\"%s\" is too small to be an ELF executable: only found %zd bytes", name_.c_str(),
+ DL_ERR("\"%s\" is too small to be an ELF executable: only found %zu bytes", name_.c_str(),
static_cast<size_t>(rc));
return false;
}
@@ -314,7 +314,7 @@
// Like the kernel, we only accept program header tables that
// are smaller than 64KiB.
if (phdr_num_ < 1 || phdr_num_ > 65536/sizeof(ElfW(Phdr))) {
- DL_ERR("\"%s\" has invalid e_phnum: %zd", name_.c_str(), phdr_num_);
+ DL_ERR("\"%s\" has invalid e_phnum: %zu", name_.c_str(), phdr_num_);
return false;
}
@@ -586,18 +586,18 @@
if (load_size_ > reserved_size) {
if (!reserved_hint) {
- DL_ERR("reserved address space %zd smaller than %zd bytes needed for \"%s\"",
+ DL_ERR("reserved address space %zu smaller than %zu bytes needed for \"%s\"",
reserved_size - load_size_, load_size_, name_.c_str());
return false;
}
start = ReserveAligned(mmap_hint, load_size_, kLibraryAlignment);
if (start == nullptr) {
- DL_ERR("couldn't reserve %zd bytes of address space for \"%s\"", load_size_, name_.c_str());
+ DL_ERR("couldn't reserve %zu bytes of address space for \"%s\"", load_size_, name_.c_str());
return false;
}
if (strict_hint && (start != mmap_hint)) {
munmap(start, load_size_);
- DL_ERR("couldn't reserve %zd bytes of address space at %p for \"%s\"",
+ DL_ERR("couldn't reserve %zu bytes of address space at %p for \"%s\"",
load_size_, mmap_hint, name_.c_str());
return false;
}
@@ -668,7 +668,7 @@
fd_,
file_offset_ + file_page_start);
if (seg_addr == MAP_FAILED) {
- DL_ERR("couldn't map \"%s\" segment %zd: %s", name_.c_str(), i, strerror(errno));
+ DL_ERR("couldn't map \"%s\" segment %zu: %s", name_.c_str(), i, strerror(errno));
return false;
}
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/common/o/linker_soinfo.cpp
^
|
@@ -232,7 +232,7 @@
check_symbol_version(verneed, verdef) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
+ TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zu",
symbol_name.get_name(), get_realpath(), reinterpret_cast<void*>(s->st_value),
static_cast<size_t>(s->st_size));
*symbol_index = n;
@@ -251,7 +251,7 @@
uint32_t* symbol_index) const {
uint32_t hash = symbol_name.elf_hash();
- TRACE_TYPE(LOOKUP, "SEARCH %s in %s@%p h=%x(elf) %zd",
+ TRACE_TYPE(LOOKUP, "SEARCH %s in %s@%p h=%x(elf) %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(base), hash, hash % nbucket_);
@@ -272,7 +272,7 @@
if (check_symbol_version(verneed, verdef) &&
strcmp(get_string(s->st_name), symbol_name.get_name()) == 0 &&
is_symbol_global_and_defined(this, s)) {
- TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zd",
+ TRACE_TYPE(LOOKUP, "FOUND %s in %s (%p) %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(s->st_value),
static_cast<size_t>(s->st_size));
@@ -281,7 +281,7 @@
}
}
- TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p %x %zd",
+ TRACE_TYPE(LOOKUP, "NOT FOUND %s in %s@%p %x %zu",
symbol_name.get_name(), get_realpath(),
reinterpret_cast<void*>(base), hash, hash % nbucket_);
@@ -372,7 +372,7 @@
return;
}
- TRACE("[ Calling %s (size %zd) @ %p for '%s' ]", array_name, count, functions, realpath);
+ TRACE("[ Calling %s (size %zu) @ %p for '%s' ]", array_name, count, functions, realpath);
int begin = reverse ? (count - 1) : 0;
int end = reverse ? -1 : count;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/configure.ac
^
|
@@ -171,11 +171,7 @@
],
[
PKG_CHECK_MODULES(ANDROID_HEADERS, android-headers,, exit)
- AM_CONDITIONAL([HAS_LIBNFC_NXP_HEADERS], [false])
- AM_CONDITIONAL([HAS_WIFI_LEGACY_HEADERS], [false])
- AM_CONDITIONAL([HAS_HWCOMPOSER2_HEADERS], [false])
- AM_CONDITIONAL([HAS_GRALLOC1_HEADER], [false])
- AM_CONDITIONAL([HAS_VIBRATOR_HEADER], [false])
+ AC_SUBST([ANDROID_HEADERS_PKGCONFIG], [android-headers])
]
)
CPPFLAGS="$CPPFLAGS $ANDROID_HEADERS_CFLAGS"
@@ -183,6 +179,19 @@
AC_CHECK_HEADERS(android-config.h,,AC_MSG_ERROR(required header file is missing))
AC_CHECK_HEADERS(android-version.h,,AC_MSG_ERROR(required header file is missing))
+if test x$ac_with_android_headers == x""; then
+ AC_CHECK_HEADERS(libnfc-nxp/phLibNfc.h, HAS_LIBNFC_NXP_HEADERS=yes)
+ AM_CONDITIONAL([HAS_LIBNFC_NXP_HEADERS], [test x"$HAS_LIBNFC_NXP_HEADERS" = x"yes"])
+ AC_CHECK_HEADERS(hardware_legacy/wifi.h, HAS_WIFI_LEGACY_HEADERS=yes)
+ AM_CONDITIONAL([HAS_WIFI_LEGACY_HEADERS], [test x"$HAS_WIFI_LEGACY_HEADERS" = x"yes"])
+ AC_CHECK_HEADERS(hardware/hwcomposer2.h, HAS_HWCOMPOSER2_HEADERS=yes)
+ AM_CONDITIONAL([HAS_HWCOMPOSER2_HEADERS], [test x"$HAS_HWCOMPOSER2_HEADERS" = x"yes"])
+ AC_CHECK_HEADERS(hardware/gralloc1.h, HAS_GRALLOC1_HEADER=yes)
+ AM_CONDITIONAL([HAS_GRALLOC1_HEADER], [test x"$HAS_GRALLOC1_HEADER" = x"yes"])
+ AC_CHECK_HEADERS(hardware_legacy/vibrator.h, HAS_VIBRATOR_HEADER=yes)
+ AM_CONDITIONAL([HAS_VIBRATOR_HEADER], [test x"$HAS_VIBRATOR_HEADER" = x"yes"])
+fi
+
# AC_AWK_CPP
AC_DEFUN([AC_AWK_CPP],
[AC_LANG_PREPROC_REQUIRE()dnl
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/egl/platforms/common/hybris-egl-platform.pc.in
^
|
@@ -6,7 +6,7 @@
Name: hybris-egl-platform
Description: libhybris EGL platform library
Version: @VERSION@
-Requires: android-headers
+Requires: @ANDROID_HEADERS_PKGCONFIG@
Libs: -L${libdir} -lhybris-common -lhybris-eglplatformcommon
-Cflags: -I${includedir} -I${includedir}/hybris/eglplatformcommon
+Cflags: -I${includedir} -I${includedir}/hybris/eglplatformcommon @ANDROID_HEADERS_CFLAGS@
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/egl/platforms/common/nativewindowbase.cpp
^
|
@@ -275,6 +275,9 @@
case NATIVE_WINDOW_IS_VALID: return "NATIVE_WINDOW_IS_VALID";
case NATIVE_WINDOW_BUFFER_AGE: return "NATIVE_WINDOW_BUFFER_AGE";
#endif
+#if ANDROID_VERSION_MAJOR>=9
+ case NATIVE_WINDOW_MAX_BUFFER_COUNT: return "NATIVE_WINDOW_MAX_BUFFER_COUNT";
+#endif
default: return "NATIVE_UNKNOWN_QUERY";
}
}
@@ -329,6 +332,13 @@
*value = 2;
return NO_ERROR;
#endif
+#if ANDROID_VERSION_MAJOR>=9
+ case NATIVE_WINDOW_MAX_BUFFER_COUNT:
+ // The default maximum count of BufferQueue items.
+ // See android::BufferQueueDefs::NUM_BUFFER_SLOTS.
+ *value = 64;
+ return NO_ERROR;
+#endif
}
TRACE("EGL error: unkown window attribute! %i", what);
*value = 0;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/egl/platforms/hwcomposer/hwcomposer_window.cpp
^
|
@@ -493,7 +493,7 @@
if (b->status) {
b->common.decRef(&b->common);
- fprintf(stderr,"WARNING: %s: allocated only %d buffers out of %d\n", __PRETTY_FUNCTION__, m_bufList.size(), m_bufferCount);
+ fprintf(stderr,"WARNING: %s: allocated only %zu buffers out of %u\n", __PRETTY_FUNCTION__, m_bufList.size(), m_bufferCount);
break;
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/gralloc/libgralloc.pc.in
^
|
@@ -6,6 +6,6 @@
Name: hybris-gralloc
Description: libhybris gralloc library
Version: @VERSION@
-Requires: android-headers
+Requires: @ANDROID_HEADERS_PKGCONFIG@
Libs: -L${libdir} -lgralloc
-Cflags: -I${includedir}
+Cflags: -I${includedir} @ANDROID_HEADERS_CFLAGS@
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/hardware/libhardware.pc.in
^
|
@@ -6,6 +6,6 @@
Name: hybris-hardware
Description: libhybris hardware library
Version: @VERSION@
-Requires: android-headers
+Requires: @ANDROID_HEADERS_PKGCONFIG@
Libs: -L${libdir} -lhardware
-Cflags: -I${includedir}
+Cflags: -I${includedir} @ANDROID_HEADERS_CFLAGS@
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/include/hybris/common/dlfcn.h
^
|
@@ -26,6 +26,7 @@
void *hybris_dlsym(void *handle, const char *symbol);
int hybris_dlclose(void *handle);
char *hybris_dlerror(void);
+int hybris_dladdr(const void *addr, void *info);
#ifdef __cplusplus
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/libsync/sync_test.c
^
|
@@ -60,7 +60,7 @@
pt_info->driver_name, pt_info->status,
ts_sec, ts_usec);
if (!strcmp(pt_info->driver_name, "sw_sync"))
- printf(" val=%d\n", *(uint32_t *)pt_info->driver_data);
+ printf(" val=%u\n", *(uint32_t *)pt_info->driver_data);
else
printf("\n");
}
@@ -94,7 +94,7 @@
sprintf(str, "test_fence%d-%d", i, j);
int fd = sw_sync_fence_create(sync_timeline_fd, str, val);
if (fd < 0) {
- printf("can't create sync pt %d: %s", val, strerror(errno));
+ printf("can't create sync pt %u: %s", val, strerror(errno));
return 1;
}
sync_data[i].fd[j] = fd;
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/tests/Makefile.am
^
|
@@ -85,6 +85,7 @@
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(top_builddir)/egl/libEGL.la \
$(top_builddir)/glesv2/libGLESv2.la \
+ $(top_builddir)/hardware/libhardware.la \
$(top_builddir)/libsync/libsync.la
if HAS_HWCOMPOSER2_HEADERS
test_glesv2_CXXFLAGS += \
@@ -116,6 +117,7 @@
$(top_builddir)/egl/platforms/common/libhybris-eglplatformcommon.la \
$(top_builddir)/egl/libEGL.la \
$(top_builddir)/glesv2/libGLESv2.la \
+ $(top_builddir)/hardware/libhardware.la \
$(top_builddir)/libsync/libsync.la
if HAS_HWCOMPOSER2_HEADERS
test_glesv3_CXXFLAGS += \
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/tests/test_camera.cpp
^
|
@@ -118,12 +118,12 @@
void raw_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
}
void jpeg_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
char fn[256];
sprintf(fn, "/tmp/shot_%d.jpeg", shot_counter);
@@ -232,7 +232,7 @@
static void global_registry_handler(void *data, struct wl_registry *registry, uint32_t id, const char *interface, uint32_t version)
{
- printf("Got a registry event for %s id %d\n", interface, id);
+ printf("Got a registry event for %s id %u\n", interface, id);
if (strcmp(interface, "wl_compositor") == 0) {
wlcompositor = (wl_compositor *)wl_registry_bind(registry,
id,
@@ -246,7 +246,7 @@
static void global_registry_remover(void *data, struct wl_registry *registry, uint32_t id)
{
- printf("Got a registry losing event for %d\n", id);
+ printf("Got a registry losing event for %u\n", id);
}
static const struct wl_registry_listener registry_listener = {
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/hybris/tests/test_recorder.cpp
^
|
@@ -79,12 +79,12 @@
void raw_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
}
void jpeg_data_cb(void* data, uint32_t data_size, void* context)
{
- printf("%s: %d \n", __PRETTY_FUNCTION__, data_size);
+ printf("%s: %u \n", __PRETTY_FUNCTION__, data_size);
struct CameraControl* cc = (struct CameraControl*) context;
android_camera_start_preview(cc);
}
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/utils/generate_glesv1/generate_wrappers.py
^
|
@@ -31,7 +31,6 @@
#
import re
-import os
import sys
funcs = []
@@ -45,7 +44,6 @@
'GLfixed eqn[4]': 'GLfixed[4]',
'GLfixed mantissa[16]': 'GLfixed[16]',
'GLint exponent[16]': 'GLint[16]',
- 'GLfloat eqn[4]': 'GLfloat[4]',
'GLvoid **': 'GLvoid **',
'GLfloat *': 'GLfloat *',
'GLfixed *': 'GLfixed *',
|
[-]
[+]
|
Changed |
_service:tar_git:libhybris-0.0.5.38.tar.bz2/libhybris/utils/travis-build.sh
^
|
@@ -2,7 +2,7 @@
run_first_stage() {
docker pull ubuntu:16.04
- docker run -i -t -v $PWD:/libhybris ubuntu:16.04 /libhybris/utils/travis-build.sh --second-stage
+ docker run -i -t -v "$PWD":/libhybris ubuntu:16.04 /libhybris/utils/travis-build.sh --second-stage
}
run_second_stage() {
|