diff options
author | Jose Luis Marti <joseluis.marti@gmail.com> | 2023-04-08 22:31:52 +0200 |
---|---|---|
committer | Jose Luis Marti <joseluis.marti@gmail.com> | 2023-04-08 22:31:52 +0200 |
commit | 921faed1e94378c5f77f7ba8c202f6d56f94964d (patch) | |
tree | 9cbe5e67df3f40f9af0359eba2e5ec946c992680 | |
parent | 42f35c38da5395d6a1aa44d84a1c391ffcdc5a89 (diff) |
[Android] Cleanup missing bionic functions
-rw-r--r-- | cmake/treedata/android/subdirs.txt | 1 | ||||
-rw-r--r-- | xbmc/Util.cpp | 1 | ||||
-rw-r--r-- | xbmc/platform/android/bionic_supplement/CMakeLists.txt | 6 | ||||
-rw-r--r-- | xbmc/platform/android/bionic_supplement/bionic_supplement.h | 21 | ||||
-rw-r--r-- | xbmc/platform/android/bionic_supplement/getdelim.c | 93 | ||||
-rw-r--r-- | xbmc/platform/android/bionic_supplement/rand_r.c | 38 | ||||
-rw-r--r-- | xbmc/platform/posix/PosixTimezone.cpp | 3 |
7 files changed, 0 insertions, 163 deletions
diff --git a/cmake/treedata/android/subdirs.txt b/cmake/treedata/android/subdirs.txt index 08e318ab4c..2353f9403b 100644 --- a/cmake/treedata/android/subdirs.txt +++ b/cmake/treedata/android/subdirs.txt @@ -5,7 +5,6 @@ xbmc/input/touch/generic input/touch/generic xbmc/media/decoderfilter media/decoderfilter xbmc/platform/android platform/android xbmc/platform/android/activity platform/android/activity -xbmc/platform/android/bionic_supplement platform/android/bionicsupplement xbmc/platform/android/filesystem platform/android/filesystem xbmc/platform/android/media/decoderfilter platform/android/media/decoderfilter xbmc/platform/android/media/drm platform/android/media/drm diff --git a/xbmc/Util.cpp b/xbmc/Util.cpp index 50e7987d0a..6e36caf6ed 100644 --- a/xbmc/Util.cpp +++ b/xbmc/Util.cpp @@ -25,7 +25,6 @@ #endif #if defined(TARGET_ANDROID) #include <androidjni/ApplicationInfo.h> -#include "platform/android/bionic_supplement/bionic_supplement.h" #include "platform/android/activity/XBMCApp.h" #include "CompileInfo.h" #endif diff --git a/xbmc/platform/android/bionic_supplement/CMakeLists.txt b/xbmc/platform/android/bionic_supplement/CMakeLists.txt deleted file mode 100644 index 9c527152eb..0000000000 --- a/xbmc/platform/android/bionic_supplement/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -set(SOURCES getdelim.c - rand_r.c) - -set(HEADERS bionic_supplement.h) - -core_add_library(platform_android_bionicsupplement) diff --git a/xbmc/platform/android/bionic_supplement/bionic_supplement.h b/xbmc/platform/android/bionic_supplement/bionic_supplement.h deleted file mode 100644 index 3645eb0276..0000000000 --- a/xbmc/platform/android/bionic_supplement/bionic_supplement.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (C) 2012-2018 Team Kodi - * This file is part of Kodi - https://kodi.tv - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -#pragma once - -#include <stdio.h> -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -int rand_r (unsigned int *seed); -ssize_t getdelim(char **lineptr, size_t *n, int delimiter, FILE *stream); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ diff --git a/xbmc/platform/android/bionic_supplement/getdelim.c b/xbmc/platform/android/bionic_supplement/getdelim.c deleted file mode 100644 index 4ebb1b9149..0000000000 --- a/xbmc/platform/android/bionic_supplement/getdelim.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * - * SPDX-License-Identifier: GPL-2.0-or-later - * See LICENSES/README.md for more information. - */ - -#include <errno.h> -#include <limits.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -/* Read up to (and including) a TERMINATOR from STREAM into *LINEPTR - (and null-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'd as - necessary. Returns the number of characters read (not including the - null terminator), or -1 on error or EOF. */ - -ssize_t -getdelim (lineptr, n, terminator, stream) - char **lineptr; - size_t *n; - int terminator; - FILE *stream; -{ - char *line, *p; - size_t size, copy; - - if (stream == NULL || lineptr == NULL || n == NULL) - { - errno = EINVAL; - return -1; - } - - if (ferror (stream)) - return -1; - - /* Make sure we have a line buffer to start with. */ - if (*lineptr == NULL || *n < 2) /* !seen and no buf yet need 2 chars. */ - { -#ifndef MAX_CANON -#define MAX_CANON 256 -#endif - line = realloc (*lineptr, MAX_CANON); - if (line == NULL) - return -1; - *lineptr = line; - *n = MAX_CANON; - } - - line = *lineptr; - size = *n; - - copy = size; - p = line; - - while (1) - { - size_t len; - - while (--copy > 0) - { - register int c = getc (stream); - if (c == EOF) - goto lose; - else if ((*p++ = c) == terminator) - goto win; - } - - /* Need to enlarge the line buffer. */ - len = p - line; - size *= 2; - line = realloc (line, size); - if (line == NULL) - goto lose; - *lineptr = line; - *n = size; - p = line + len; - copy = size - len; - } - - lose: - if (p == *lineptr) - return -1; - /* Return a partial line since we got an error in the middle. */ - win: - *p = '\0'; - return p - *lineptr; -} - diff --git a/xbmc/platform/android/bionic_supplement/rand_r.c b/xbmc/platform/android/bionic_supplement/rand_r.c deleted file mode 100644 index e40537fe2a..0000000000 --- a/xbmc/platform/android/bionic_supplement/rand_r.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Reentrant random function frm POSIX.1c. - * Copyright (C) 1996, 1999 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * Contributed by Ulrich Drepper <drepper@cygnus.com <mailto:drepper@cygnus.com>>, 1996. - * - * SPDX-License-Identifier: LGPL-2.1-or-later - * See LICENSES/README.md for more information. - */ - -#include <stdlib.h> - - -/* This algorithm is mentioned in the ISO C standard, here extended - for 32 bits. */ -int rand_r (unsigned int *seed) -{ - unsigned int next = *seed; - int result; - - next *= 1103515245; - next += 12345; - result = (unsigned int) (next / 65536) % 2048; - - next *= 1103515245; - next += 12345; - result <<= 10; - result ^= (unsigned int) (next / 65536) % 1024; - - next *= 1103515245; - next += 12345; - result <<= 10; - result ^= (unsigned int) (next / 65536) % 1024; - - *seed = next; - - return result; -} diff --git a/xbmc/platform/posix/PosixTimezone.cpp b/xbmc/platform/posix/PosixTimezone.cpp index 6f276a37b2..42b82e1bb4 100644 --- a/xbmc/platform/posix/PosixTimezone.cpp +++ b/xbmc/platform/posix/PosixTimezone.cpp @@ -7,9 +7,6 @@ */ #include <time.h> -#ifdef TARGET_ANDROID -#include "platform/android/bionic_supplement/bionic_supplement.h" -#endif #include "PlatformDefs.h" #include "PosixTimezone.h" #include "utils/SystemInfo.h" |