mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 03:16:17 +01:00
Merge branch 'move-bionic-checks-to-android' into 'main'
Convert __BIONIC__ usages that check for Android to __ANDROID__ See merge request GNOME/glib!3993
This commit is contained in:
commit
1504c24777
@ -37,7 +37,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#include <alloca.h>
|
||||
#include <errno.h>
|
||||
#include <stddef.h>
|
||||
@ -252,7 +252,7 @@ main (int argc, char *argv[])
|
||||
|
||||
putenv (buf);
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
set_up_journal (argv[1]);
|
||||
#endif
|
||||
|
||||
|
@ -46,11 +46,11 @@
|
||||
#include <gstdio.h>
|
||||
#include <dirent.h>
|
||||
|
||||
#if defined(__BIONIC__) && (__ANDROID_API__ < 26)
|
||||
#if defined(__ANDROID__) && (__ANDROID_API__ < 26)
|
||||
#include <mntent.h>
|
||||
/* the shared object of recent bionic libc's have hasmntopt symbol, but
|
||||
some a possible common build environment for android, termux ends
|
||||
up with inssuficient __ANDROID_API__ value for building.
|
||||
up with insufficient __ANDROID_API__ value for building.
|
||||
*/
|
||||
extern char* hasmntopt(const struct mntent* mnt, const char* opt);
|
||||
#endif
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "gjournal-private.h"
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#include <string.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
@ -38,7 +38,7 @@
|
||||
#include <locale.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
@ -68,7 +68,7 @@
|
||||
#include <syslog.h>
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
#include "gjournal-private.h"
|
||||
#endif
|
||||
|
||||
@ -2053,7 +2053,7 @@ G_LOCK_DEFINE_STATIC (syslog_opened);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
static int journal_fd = -1;
|
||||
|
||||
#ifndef SOCK_CLOEXEC
|
||||
@ -2098,7 +2098,7 @@ open_journal (void)
|
||||
gboolean
|
||||
g_log_writer_is_journald (gint output_fd)
|
||||
{
|
||||
#if defined(__linux__) && !defined(__BIONIC__)
|
||||
#if defined(__linux__) && !defined(__ANDROID__)
|
||||
return _g_fd_is_journal (output_fd);
|
||||
#else
|
||||
return FALSE;
|
||||
@ -2350,7 +2350,7 @@ g_log_writer_syslog (GLogLevelFlags log_level,
|
||||
}
|
||||
|
||||
/* Enable support for the journal if we're on a recent enough Linux */
|
||||
#if defined(__linux__) && !defined(__BIONIC__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
|
||||
#if defined(__linux__) && !defined(__ANDROID__) && defined(HAVE_MKOSTEMP) && defined(O_CLOEXEC)
|
||||
#define ENABLE_JOURNAL_SENDV
|
||||
#endif
|
||||
|
||||
|
@ -1625,7 +1625,7 @@ g_cond_wait_until (GCond *cond,
|
||||
g_mutex_unlock (mutex);
|
||||
|
||||
#if defined(HAVE_FUTEX_TIME64)
|
||||
#if defined(__BIONIC__)
|
||||
#if defined(__ANDROID__)
|
||||
if (__builtin_available (android 30, *)) {
|
||||
#else
|
||||
{
|
||||
|
@ -74,7 +74,7 @@ struct _GRealThread
|
||||
* in size between the two syscall variants!
|
||||
*/
|
||||
#if defined(HAVE_FUTEX) && defined(HAVE_FUTEX_TIME64)
|
||||
#if defined(__BIONIC__)
|
||||
#if defined(__ANDROID__)
|
||||
#define g_futex_simple(uaddr, futex_op, ...) \
|
||||
G_STMT_START \
|
||||
{ \
|
||||
@ -115,7 +115,7 @@ struct _GRealThread
|
||||
} \
|
||||
} \
|
||||
G_STMT_END
|
||||
#endif /* defined(__BIONIC__) */
|
||||
#endif /* defined(__ANDROID__) */
|
||||
#elif defined(HAVE_FUTEX_TIME64)
|
||||
#define g_futex_simple(uaddr, futex_op, ...) \
|
||||
G_STMT_START \
|
||||
|
@ -3281,7 +3281,7 @@ g_check_setuid (void)
|
||||
if (errsv)
|
||||
g_error ("getauxval () failed: %s", g_strerror (errsv));
|
||||
return value;
|
||||
#elif defined(HAVE_ISSETUGID) && !defined(__BIONIC__)
|
||||
#elif defined(HAVE_ISSETUGID) && !defined(__ANDROID__)
|
||||
/* BSD: http://www.freebsd.org/cgi/man.cgi?query=issetugid&sektion=2 */
|
||||
|
||||
/* Android had it in older versions but the new 64 bit ABI does not
|
||||
|
@ -167,7 +167,7 @@ _g_module_self (void)
|
||||
* NULL is given, dlsym returns an appropriate pointer.
|
||||
*/
|
||||
lock_dlerror ();
|
||||
#if defined(__BIONIC__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if defined(__ANDROID__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
handle = RTLD_DEFAULT;
|
||||
#else
|
||||
handle = dlopen (NULL, RTLD_GLOBAL | RTLD_LAZY);
|
||||
@ -182,7 +182,7 @@ _g_module_self (void)
|
||||
static void
|
||||
_g_module_close (gpointer handle)
|
||||
{
|
||||
#if defined(__BIONIC__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
#if defined(__ANDROID__) || defined(__NetBSD__) || defined(__FreeBSD__)
|
||||
if (handle != RTLD_DEFAULT)
|
||||
#endif
|
||||
{
|
||||
|
@ -490,7 +490,7 @@ g_module_open_full (const gchar *file_name,
|
||||
handle = _g_module_self ();
|
||||
/* On Android 64 bit, RTLD_DEFAULT is (void *)0x0
|
||||
* so it always fails to create main_module if file_name is NULL */
|
||||
#if !defined(__BIONIC__) || !defined(__LP64__)
|
||||
#if !defined(__ANDROID__) || !defined(__LP64__)
|
||||
if (handle)
|
||||
#endif
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user