Merge "liblog: remove unneeded checks and includes from headers"

am: fa88eeb95e

Change-Id: I2ee1c38070c361f156d3343cb6781e2cc2459880
This commit is contained in:
Tom Cherry 2019-10-16 08:53:39 -07:00 committed by android-build-merger
commit 43a0d64f82
7 changed files with 5 additions and 50 deletions

View file

@ -16,6 +16,8 @@
#pragma once
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif

View file

@ -22,7 +22,6 @@
#endif
#include <stdint.h> /* uint16_t, int32_t */
#include <stdio.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
@ -65,21 +64,6 @@ extern "C" {
#endif
#endif
/* --------------------------------------------------------------------- */
/*
* This file uses ", ## __VA_ARGS__" zero-argument token pasting to
* work around issues with debug-only syntax errors in assertions
* that are missing format strings. See commit
* 19299904343daf191267564fe32e6cd5c165cd42
*/
#if defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-zero-variadic-macro-arguments"
#endif
/* --------------------------------------------------------------------- */
/*
* Event logging.
*/
@ -164,10 +148,6 @@ clockid_t android_log_clockid(void);
*/
void __android_log_close(void);
#if defined(__clang__)
#pragma clang diagnostic pop
#endif
#ifdef __cplusplus
}
#endif

View file

@ -36,16 +36,11 @@ extern "C" {
/*
* The opaque context used to manipulate lists of events.
*/
#ifndef __android_log_context_defined
#define __android_log_context_defined
typedef struct android_log_context_internal* android_log_context;
#endif
/*
* Elements returned when reading a list of events.
*/
#ifndef __android_log_list_element_defined
#define __android_log_list_element_defined
typedef struct {
AndroidEventLogType type;
uint16_t complete;
@ -57,7 +52,6 @@ typedef struct {
float float32;
} data;
} android_log_list_element;
#endif
/*
* Creates a context associated with an event tag to write elements to
@ -104,8 +98,6 @@ int android_log_parser_reset(android_log_context ctx,
int android_log_destroy(android_log_context* ctx);
#ifdef __cplusplus
#ifndef __class_android_log_event_list_defined
#define __class_android_log_event_list_defined
/* android_log_list C++ helpers */
extern "C++" {
class android_log_event_list {
@ -280,7 +272,6 @@ class android_log_event_list {
};
}
#endif
#endif
#ifdef __cplusplus
}

View file

@ -53,8 +53,6 @@ extern "C" {
/*
* The userspace structure for version 1 of the logger_entry ABI.
*/
#ifndef __struct_logger_entry_defined
#define __struct_logger_entry_defined
struct logger_entry {
uint16_t len; /* length of the payload */
uint16_t __pad; /* no matter what, we get 2 bytes of padding */
@ -64,13 +62,10 @@ struct logger_entry {
int32_t nsec; /* nanoseconds */
char msg[0]; /* the entry's payload */
};
#endif
/*
* The userspace structure for version 2 of the logger_entry ABI.
*/
#ifndef __struct_logger_entry_v2_defined
#define __struct_logger_entry_v2_defined
struct logger_entry_v2 {
uint16_t len; /* length of the payload */
uint16_t hdr_size; /* sizeof(struct logger_entry_v2) */
@ -81,13 +76,10 @@ struct logger_entry_v2 {
uint32_t euid; /* effective UID of logger */
char msg[0]; /* the entry's payload */
} __attribute__((__packed__));
#endif
/*
* The userspace structure for version 3 of the logger_entry ABI.
*/
#ifndef __struct_logger_entry_v3_defined
#define __struct_logger_entry_v3_defined
struct logger_entry_v3 {
uint16_t len; /* length of the payload */
uint16_t hdr_size; /* sizeof(struct logger_entry_v3) */
@ -98,13 +90,10 @@ struct logger_entry_v3 {
uint32_t lid; /* log id of the payload */
char msg[0]; /* the entry's payload */
} __attribute__((__packed__));
#endif
/*
* The userspace structure for version 4 of the logger_entry ABI.
*/
#ifndef __struct_logger_entry_v4_defined
#define __struct_logger_entry_v4_defined
struct logger_entry_v4 {
uint16_t len; /* length of the payload */
uint16_t hdr_size; /* sizeof(struct logger_entry_v4) */
@ -116,7 +105,6 @@ struct logger_entry_v4 {
uint32_t uid; /* generating process's uid */
char msg[0]; /* the entry's payload */
};
#endif
#pragma clang diagnostic pop
/*
@ -133,8 +121,6 @@ struct logger_entry_v4 {
*/
#define LOGGER_ENTRY_MAX_LEN (5 * 1024)
#ifndef __struct_log_msg_defined
#define __struct_log_msg_defined
struct log_msg {
union {
unsigned char buf[LOGGER_ENTRY_MAX_LEN + 1];
@ -191,7 +177,6 @@ struct log_msg {
}
#endif
};
#endif
struct logger;

View file

@ -24,9 +24,6 @@
#define US_PER_SEC 1000000ULL
#define MS_PER_SEC 1000ULL
#ifndef __struct_log_time_defined
#define __struct_log_time_defined
#define LOG_TIME_SEC(t) ((t)->tv_sec)
/* next power of two after NS_PER_SEC */
#define LOG_TIME_NSEC(t) ((t)->tv_nsec & (UINT32_MAX >> 2))
@ -164,5 +161,3 @@ typedef struct log_time {
} __attribute__((__packed__)) log_time;
#endif /* __cplusplus */
#endif /* __struct_log_time_defined */

View file

@ -16,7 +16,8 @@
#pragma once
#include <pthread.h>
#include <stdint.h>
#include <sys/types.h>
#include <android/log.h>
#include <log/event_tag_map.h>

View file

@ -17,6 +17,7 @@
#include <fcntl.h>
#include <inttypes.h>
#include <poll.h>
#include <sched.h>
#include <sys/socket.h>
#include <sys/syscall.h>
#include <sys/types.h>