diff options
author | Moonchild <moonchild@palemoon.org> | 2021-03-21 16:15:54 +0000 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2021-03-21 16:15:54 +0000 |
commit | b59777a67b8e0180eed34d43117db73186c7e1e1 (patch) | |
tree | d895127d670bb13d41ec6de6234cbd8ef3362932 /gfx | |
parent | a94a86ff785e246caa9c71b2914e0bb5f7b03333 (diff) | |
download | uxp-b59777a67b8e0180eed34d43117db73186c7e1e1.tar.gz |
Issue #1053 - Remove __ANDROID__ defines (except in third party code)
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/cairo/libpixman/src/pixman-arm.c | 42 | ||||
-rw-r--r-- | gfx/cairo/libpixman/src/pixman-cpu.c | 48 | ||||
-rw-r--r-- | gfx/harfbuzz/src/hb-private.hh | 9 |
3 files changed, 14 insertions, 85 deletions
diff --git a/gfx/cairo/libpixman/src/pixman-arm.c b/gfx/cairo/libpixman/src/pixman-arm.c index 145bd9050b..358372e50a 100644 --- a/gfx/cairo/libpixman/src/pixman-arm.c +++ b/gfx/cairo/libpixman/src/pixman-arm.c @@ -1,19 +1,20 @@ /* * Copyright © 2000 SuSE, Inc. * Copyright © 2007 Red Hat, Inc. + * Copyright © 2021 Moonchild Productions * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or + * documentation, and that the names of the authors not be used in advertising or * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the + * written prior permission. The authors make no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN @@ -94,39 +95,6 @@ detect_cpu_features (void) return features; } -#elif defined(__ANDROID__) || defined(ANDROID) /* Android */ - -static arm_cpu_features_t -detect_cpu_features (void) -{ - arm_cpu_features_t features = 0; - char buf[1024]; - char* pos; - const char* ver_token = "CPU architecture: "; - FILE* f = fopen("/proc/cpuinfo", "r"); - if (!f) { - return features; - } - - fread(buf, sizeof(char), sizeof(buf), f); - fclose(f); - pos = strstr(buf, ver_token); - if (pos) { - char vchar = *(pos + strlen(ver_token)); - if (vchar >= '0' && vchar <= '9') { - int ver = vchar - '0'; - if (ver >= 7) - features |= ARM_V7; - } - } - if (strstr(buf, "neon") != NULL) - features |= ARM_NEON; - if (strstr(buf, "vfp") != NULL) - features |= ARM_VFP; - - return features; -} - #elif defined (__linux__) /* linux ELF */ #include <unistd.h> diff --git a/gfx/cairo/libpixman/src/pixman-cpu.c b/gfx/cairo/libpixman/src/pixman-cpu.c index 0eabb4e256..30f5fba8a4 100644 --- a/gfx/cairo/libpixman/src/pixman-cpu.c +++ b/gfx/cairo/libpixman/src/pixman-cpu.c @@ -1,19 +1,20 @@ /* * Copyright © 2000 SuSE, Inc. * Copyright © 2007 Red Hat, Inc. + * Copyright © 2021 Moonchild Productions * * Permission to use, copy, modify, distribute, and sell this software and its * documentation for any purpose is hereby granted without fee, provided that * the above copyright notice appear in all copies and that both that * copyright notice and this permission notice appear in supporting - * documentation, and that the name of SuSE not be used in advertising or + * documentation, and that the names of the authors not be used in advertising or * publicity pertaining to distribution of the software without specific, - * written prior permission. SuSE makes no representations about the + * written prior permission. The authors make no representations about the * suitability of this software for any purpose. It is provided "as is" * without express or implied warranty. * - * SuSE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL SuSE + * THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE AUTHORS * BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN @@ -290,7 +291,7 @@ pixman_have_arm_iwmmxt (void) #endif } -#elif defined (__linux__) || defined(__ANDROID__) || defined(ANDROID) /* linux ELF or ANDROID */ +#elif defined (__linux__) /* linux ELF */ static pixman_bool_t arm_has_v7 = FALSE; static pixman_bool_t arm_has_v6 = FALSE; @@ -299,39 +300,6 @@ static pixman_bool_t arm_has_neon = FALSE; static pixman_bool_t arm_has_iwmmxt = FALSE; static pixman_bool_t arm_tests_initialized = FALSE; -#if defined(__ANDROID__) || defined(ANDROID) /* Android device support */ - -static void -pixman_arm_read_auxv_or_cpu_features () -{ - char buf[1024]; - char* pos; - const char* ver_token = "CPU architecture: "; - FILE* f = fopen("/proc/cpuinfo", "r"); - if (!f) { - arm_tests_initialized = TRUE; - return; - } - - fread(buf, sizeof(char), sizeof(buf), f); - fclose(f); - pos = strstr(buf, ver_token); - if (pos) { - char vchar = *(pos + strlen(ver_token)); - if (vchar >= '0' && vchar <= '9') { - int ver = vchar - '0'; - arm_has_v7 = ver >= 7; - arm_has_v6 = ver >= 6; - } - } - arm_has_neon = strstr(buf, "neon") != NULL; - arm_has_vfp = strstr(buf, "vfp") != NULL; - arm_has_iwmmxt = strstr(buf, "iwmmxt") != NULL; - arm_tests_initialized = TRUE; -} - -#elif defined (__linux__) /* linux ELF */ - #include <unistd.h> #include <sys/types.h> #include <sys/stat.h> @@ -382,8 +350,6 @@ pixman_arm_read_auxv_or_cpu_features () arm_tests_initialized = TRUE; } -#endif /* Linux elf */ - #if defined(USE_ARM_SIMD) pixman_bool_t pixman_have_arm_simd (void) @@ -420,7 +386,7 @@ pixman_have_arm_iwmmxt (void) #endif /* USE_ARM_IWMMXT */ -#else /* !_MSC_VER && !Linux elf && !Android */ +#else /* !_MSC_VER && !Linux elf */ #define pixman_have_arm_simd() FALSE #define pixman_have_arm_neon() FALSE diff --git a/gfx/harfbuzz/src/hb-private.hh b/gfx/harfbuzz/src/hb-private.hh index c1418d8a5d..7fd825318e 100644 --- a/gfx/harfbuzz/src/hb-private.hh +++ b/gfx/harfbuzz/src/hb-private.hh @@ -1,6 +1,7 @@ /* * Copyright © 2007,2008,2009 Red Hat, Inc. * Copyright © 2011,2012 Google, Inc. + * Copyright © 2021 Moonchild Productions * * This is part of HarfBuzz, a text shaping library. * @@ -24,6 +25,7 @@ * * Red Hat Author(s): Behdad Esfahbod * Google Author(s): Behdad Esfahbod + * Moonchild Productions Author(s): Moonchild Straver */ #ifndef HB_PRIVATE_HH @@ -200,13 +202,6 @@ static int errno = 0; /* Use something better? */ * mingw32 headers say atexit is safe to use in shared libraries. */ # define HB_USE_ATEXIT 1 -# elif defined(__ANDROID__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) -/* This was fixed in Android NKD r8 or r8b: - * https://code.google.com/p/android/issues/detail?id=6455 - * which introduced GCC 4.6: - * https://developer.android.com/tools/sdk/ndk/index.html - */ -# define HB_USE_ATEXIT 1 # endif #endif |