summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Cherry <tomcherry@google.com>2019-02-11 18:43:13 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2019-02-11 18:43:13 +0000
commitea57928f002306ad3994f5c209af9ccd185fb96b (patch)
treebcaf39cfc6c0c8b996d71b962fd82090c0d68eb5
parent38c143e8c00c6a80ef27f8e9ac9db365e4c2b51a (diff)
parent2d9779e87b110b33745de9cec006f205396bef5d (diff)
downloadsystem_core-ea57928f002306ad3994f5c209af9ccd185fb96b.tar.gz
system_core-ea57928f002306ad3994f5c209af9ccd185fb96b.tar.bz2
system_core-ea57928f002306ad3994f5c209af9ccd185fb96b.zip
Merge "liblog: remove visibility macros"
-rw-r--r--liblog/Android.bp1
-rw-r--r--liblog/config_read.cpp12
-rw-r--r--liblog/config_read.h8
-rw-r--r--liblog/config_write.cpp12
-rw-r--r--liblog/config_write.h8
-rw-r--r--liblog/event_tag_map.cpp18
-rw-r--r--liblog/fake_log_device.cpp14
-rw-r--r--liblog/fake_log_device.h17
-rw-r--r--liblog/fake_writer.cpp2
-rw-r--r--liblog/log_event_list.cpp34
-rw-r--r--liblog/log_event_write.cpp4
-rw-r--r--liblog/log_portability.h19
-rw-r--r--liblog/log_time.cpp14
-rw-r--r--liblog/logd_reader.cpp4
-rw-r--r--liblog/logd_reader.h2
-rw-r--r--liblog/logd_writer.cpp2
-rw-r--r--liblog/logger.h8
-rw-r--r--liblog/logger_lock.cpp6
-rw-r--r--liblog/logger_name.cpp4
-rw-r--r--liblog/logger_read.cpp39
-rw-r--r--liblog/logger_write.cpp38
-rw-r--r--liblog/logprint.cpp34
-rw-r--r--liblog/pmsg_reader.cpp8
-rw-r--r--liblog/pmsg_writer.cpp7
-rw-r--r--liblog/properties.cpp17
-rw-r--r--liblog/stderr_write.cpp2
26 files changed, 142 insertions, 192 deletions
diff --git a/liblog/Android.bp b/liblog/Android.bp
index bd7a5518c..1d4a0a0e0 100644
--- a/liblog/Android.bp
+++ b/liblog/Android.bp
@@ -101,7 +101,6 @@ cc_library {
cflags: [
"-Werror",
- "-fvisibility=hidden",
// This is what we want to do:
// liblog_cflags := $(shell \
// sed -n \
diff --git a/liblog/config_read.cpp b/liblog/config_read.cpp
index 80177a4ca..3139f7828 100644
--- a/liblog/config_read.cpp
+++ b/liblog/config_read.cpp
@@ -19,10 +19,10 @@
#include "config_read.h"
#include "logger.h"
-LIBLOG_HIDDEN struct listnode __android_log_transport_read = {&__android_log_transport_read,
- &__android_log_transport_read};
-LIBLOG_HIDDEN struct listnode __android_log_persist_read = {&__android_log_persist_read,
- &__android_log_persist_read};
+struct listnode __android_log_transport_read = {&__android_log_transport_read,
+ &__android_log_transport_read};
+struct listnode __android_log_persist_read = {&__android_log_persist_read,
+ &__android_log_persist_read};
static void __android_log_add_transport(struct listnode* list,
struct android_log_transport_read* transport) {
@@ -52,7 +52,7 @@ static void __android_log_add_transport(struct listnode* list,
}
}
-LIBLOG_HIDDEN void __android_log_config_read() {
+void __android_log_config_read() {
#if (FAKE_LOG_DEVICE == 0)
if ((__android_log_transport == LOGGER_DEFAULT) || (__android_log_transport & LOGGER_LOGD)) {
extern struct android_log_transport_read logdLoggerRead;
@@ -64,7 +64,7 @@ LIBLOG_HIDDEN void __android_log_config_read() {
#endif
}
-LIBLOG_HIDDEN void __android_log_config_read_close() {
+void __android_log_config_read_close() {
struct android_log_transport_read* transport;
struct listnode* n;
diff --git a/liblog/config_read.h b/liblog/config_read.h
index 00ea453e4..212b8a09f 100644
--- a/liblog/config_read.h
+++ b/liblog/config_read.h
@@ -22,8 +22,8 @@
__BEGIN_DECLS
-extern LIBLOG_HIDDEN struct listnode __android_log_transport_read;
-extern LIBLOG_HIDDEN struct listnode __android_log_persist_read;
+extern struct listnode __android_log_transport_read;
+extern struct listnode __android_log_persist_read;
#define read_transport_for_each(transp, transports) \
for ((transp) = node_to_item((transports)->next, \
@@ -46,7 +46,7 @@ extern LIBLOG_HIDDEN struct listnode __android_log_persist_read;
(transp) = node_to_item((n), struct android_log_transport_read, node), \
(n) = (transp)->node.next)
-LIBLOG_HIDDEN void __android_log_config_read();
-LIBLOG_HIDDEN void __android_log_config_read_close();
+void __android_log_config_read();
+void __android_log_config_read_close();
__END_DECLS
diff --git a/liblog/config_write.cpp b/liblog/config_write.cpp
index e65c238d2..d4543795c 100644
--- a/liblog/config_write.cpp
+++ b/liblog/config_write.cpp
@@ -19,10 +19,10 @@
#include "config_write.h"
#include "logger.h"
-LIBLOG_HIDDEN struct listnode __android_log_transport_write = {&__android_log_transport_write,
- &__android_log_transport_write};
-LIBLOG_HIDDEN struct listnode __android_log_persist_write = {&__android_log_persist_write,
- &__android_log_persist_write};
+struct listnode __android_log_transport_write = {&__android_log_transport_write,
+ &__android_log_transport_write};
+struct listnode __android_log_persist_write = {&__android_log_persist_write,
+ &__android_log_persist_write};
static void __android_log_add_transport(struct listnode* list,
struct android_log_transport_write* transport) {
@@ -52,7 +52,7 @@ static void __android_log_add_transport(struct listnode* list,
}
}
-LIBLOG_HIDDEN void __android_log_config_write() {
+void __android_log_config_write() {
if ((__android_log_transport == LOGGER_DEFAULT) || (__android_log_transport & LOGGER_LOGD)) {
#if (FAKE_LOG_DEVICE == 0)
extern struct android_log_transport_write logdLoggerWrite;
@@ -89,7 +89,7 @@ LIBLOG_HIDDEN void __android_log_config_write() {
}
}
-LIBLOG_HIDDEN void __android_log_config_write_close() {
+void __android_log_config_write_close() {
struct android_log_transport_write* transport;
struct listnode* n;
diff --git a/liblog/config_write.h b/liblog/config_write.h
index e3be4455f..a901f1352 100644
--- a/liblog/config_write.h
+++ b/liblog/config_write.h
@@ -22,8 +22,8 @@
__BEGIN_DECLS
-extern LIBLOG_HIDDEN struct listnode __android_log_transport_write;
-extern LIBLOG_HIDDEN struct listnode __android_log_persist_write;
+extern struct listnode __android_log_transport_write;
+extern struct listnode __android_log_persist_write;
#define write_transport_for_each(transp, transports) \
for ((transp) = node_to_item((transports)->next, \
@@ -46,7 +46,7 @@ extern LIBLOG_HIDDEN struct listnode __android_log_persist_write;
(transp) = node_to_item((n), struct android_log_transport_write, node), \
(n) = (transp)->node.next)
-LIBLOG_HIDDEN void __android_log_config_write();
-LIBLOG_HIDDEN void __android_log_config_write_close();
+void __android_log_config_write();
+void __android_log_config_write_close();
__END_DECLS
diff --git a/liblog/event_tag_map.cpp b/liblog/event_tag_map.cpp
index 574a3869b..22cf43bf8 100644
--- a/liblog/event_tag_map.cpp
+++ b/liblog/event_tag_map.cpp
@@ -407,7 +407,7 @@ static int parseMapLines(EventTagMap* map, size_t which) {
//
// We create a private mapping because we want to terminate the log tag
// strings with '\0'.
-LIBLOG_ABI_PUBLIC EventTagMap* android_openEventTagMap(const char* fileName) {
+EventTagMap* android_openEventTagMap(const char* fileName) {
EventTagMap* newTagMap;
off_t end[NUM_MAPS];
int save_errno, fd[NUM_MAPS];
@@ -488,7 +488,7 @@ fail_errno:
}
// Close the map.
-LIBLOG_ABI_PUBLIC void android_closeEventTagMap(EventTagMap* map) {
+void android_closeEventTagMap(EventTagMap* map) {
if (map) delete map;
}
@@ -535,9 +535,7 @@ static const TagFmt* __getEventTag(EventTagMap* map, unsigned int tag) {
}
// Look up an entry in the map.
-LIBLOG_ABI_PUBLIC const char* android_lookupEventTag_len(const EventTagMap* map,
- size_t* len,
- unsigned int tag) {
+const char* android_lookupEventTag_len(const EventTagMap* map, size_t* len, unsigned int tag) {
if (len) *len = 0;
const TagFmt* str = map->find(tag);
if (!str) {
@@ -549,8 +547,7 @@ LIBLOG_ABI_PUBLIC const char* android_lookupEventTag_len(const EventTagMap* map,
}
// Look up an entry in the map.
-LIBLOG_ABI_PUBLIC const char* android_lookupEventFormat_len(
- const EventTagMap* map, size_t* len, unsigned int tag) {
+const char* android_lookupEventFormat_len(const EventTagMap* map, size_t* len, unsigned int tag) {
if (len) *len = 0;
const TagFmt* str = map->find(tag);
if (!str) {
@@ -565,8 +562,7 @@ LIBLOG_ABI_PUBLIC const char* android_lookupEventFormat_len(
// since it will cause the map to change from Shared and backed by a file,
// to Private Dirty and backed up by swap, albeit highly compressible. By
// deprecating this function everywhere, we save 100s of MB of memory space.
-LIBLOG_ABI_PUBLIC const char* android_lookupEventTag(const EventTagMap* map,
- unsigned int tag) {
+const char* android_lookupEventTag(const EventTagMap* map, unsigned int tag) {
size_t len;
const char* tagStr = android_lookupEventTag_len(map, &len, tag);
@@ -578,9 +574,7 @@ LIBLOG_ABI_PUBLIC const char* android_lookupEventTag(const EventTagMap* map,
}
// Look up tagname, generate one if necessary, and return a tag
-LIBLOG_ABI_PUBLIC int android_lookupEventTagNum(EventTagMap* map,
- const char* tagname,
- const char* format, int prio) {
+int android_lookupEventTagNum(EventTagMap* map, const char* tagname, const char* format, int prio) {
const char* ep = endOfTag(tagname);
size_t len = ep - tagname;
if (!len || *ep) {
diff --git a/liblog/fake_log_device.cpp b/liblog/fake_log_device.cpp
index 5daae41e4..428a482a6 100644
--- a/liblog/fake_log_device.cpp
+++ b/liblog/fake_log_device.cpp
@@ -548,7 +548,7 @@ static void showLog(LogState* state, int logPrio, const char* tag, const char* m
* tag (N bytes -- null-terminated ASCII string)
* message (N bytes -- null-terminated ASCII string)
*/
-LIBLOG_HIDDEN ssize_t fakeLogWritev(int fd, const struct iovec* vector, int count) {
+ssize_t fakeLogWritev(int fd, const struct iovec* vector, int count) {
LogState* state;
/* Make sure that no-one frees the LogState while we're using it.
@@ -623,7 +623,7 @@ LIBLOG_HIDDEN ssize_t fakeLogWritev(int fd, const struct iovec* vector, int coun
* call is in the exit handler. Logging can continue in the exit handler to
* help debug HOST tools ...
*/
-LIBLOG_HIDDEN int fakeLogClose(int fd) {
+int fakeLogClose(int fd) {
deleteFakeFd(fd);
return 0;
}
@@ -631,7 +631,7 @@ LIBLOG_HIDDEN int fakeLogClose(int fd) {
/*
* Open a log output device and return a fake fd.
*/
-LIBLOG_HIDDEN int fakeLogOpen(const char* pathName) {
+int fakeLogOpen(const char* pathName) {
LogState* logState;
int fd = -1;
@@ -650,20 +650,20 @@ LIBLOG_HIDDEN int fakeLogOpen(const char* pathName) {
return fd;
}
-LIBLOG_HIDDEN ssize_t __send_log_msg(char*, size_t) {
+ssize_t __send_log_msg(char*, size_t) {
return -ENODEV;
}
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio, const char*, int def) {
+int __android_log_is_loggable(int prio, const char*, int def) {
int logLevel = def;
return logLevel >= 0 && prio >= logLevel;
}
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable_len(int prio, const char*, size_t, int def) {
+int __android_log_is_loggable_len(int prio, const char*, size_t, int def) {
int logLevel = def;
return logLevel >= 0 && prio >= logLevel;
}
-LIBLOG_ABI_PRIVATE int __android_log_is_debuggable() {
+int __android_log_is_debuggable() {
return 1;
}
diff --git a/liblog/fake_log_device.h b/liblog/fake_log_device.h
index ef0beb68a..ce54db2bf 100644
--- a/liblog/fake_log_device.h
+++ b/liblog/fake_log_device.h
@@ -25,14 +25,13 @@ struct iovec;
__BEGIN_DECLS
-LIBLOG_HIDDEN int fakeLogOpen(const char* pathName);
-LIBLOG_HIDDEN int fakeLogClose(int fd);
-LIBLOG_HIDDEN ssize_t fakeLogWritev(int fd, const struct iovec* vector,
- int count);
-
-LIBLOG_HIDDEN ssize_t __send_log_msg(char*, size_t);
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio, const char*, int def);
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable_len(int prio, const char*, size_t, int def);
-LIBLOG_ABI_PRIVATE int __android_log_is_debuggable();
+int fakeLogOpen(const char* pathName);
+int fakeLogClose(int fd);
+ssize_t fakeLogWritev(int fd, const struct iovec* vector, int count);
+
+ssize_t __send_log_msg(char*, size_t);
+int __android_log_is_loggable(int prio, const char*, int def);
+int __android_log_is_loggable_len(int prio, const char*, size_t, int def);
+int __android_log_is_debuggable();
__END_DECLS
diff --git a/liblog/fake_writer.cpp b/liblog/fake_writer.cpp
index 46d171b84..c0b0e69a5 100644
--- a/liblog/fake_writer.cpp
+++ b/liblog/fake_writer.cpp
@@ -31,7 +31,7 @@ static int fakeWrite(log_id_t log_id, struct timespec* ts, struct iovec* vec, si
static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, -1, -1};
-LIBLOG_HIDDEN struct android_log_transport_write fakeLoggerWrite = {
+struct android_log_transport_write fakeLoggerWrite = {
.node = {&fakeLoggerWrite.node, &fakeLoggerWrite.node},
.context.priv = &logFds,
.name = "fake",
diff --git a/liblog/log_event_list.cpp b/liblog/log_event_list.cpp
index 088ea94ed..b1b527c35 100644
--- a/liblog/log_event_list.cpp
+++ b/liblog/log_event_list.cpp
@@ -73,7 +73,7 @@ static void init_parser_context(android_log_context_internal* context, const cha
context->read_write_flag = kAndroidLoggerRead;
}
-LIBLOG_ABI_PUBLIC android_log_context create_android_logger(uint32_t tag) {
+android_log_context create_android_logger(uint32_t tag) {
android_log_context_internal* context;
context =
@@ -86,7 +86,7 @@ LIBLOG_ABI_PUBLIC android_log_context create_android_logger(uint32_t tag) {
return (android_log_context)context;
}
-LIBLOG_ABI_PUBLIC android_log_context create_android_log_parser(const char* msg, size_t len) {
+android_log_context create_android_log_parser(const char* msg, size_t len) {
android_log_context_internal* context;
size_t i;
@@ -100,7 +100,7 @@ LIBLOG_ABI_PUBLIC android_log_context create_android_log_parser(const char* msg,
return (android_log_context)context;
}
-LIBLOG_ABI_PUBLIC int android_log_destroy(android_log_context* ctx) {
+int android_log_destroy(android_log_context* ctx) {
android_log_context_internal* context;
context = (android_log_context_internal*)*ctx;
@@ -113,7 +113,7 @@ LIBLOG_ABI_PUBLIC int android_log_destroy(android_log_context* ctx) {
return 0;
}
-LIBLOG_ABI_PUBLIC int android_log_reset(android_log_context ctx) {
+int android_log_reset(android_log_context ctx) {
android_log_context_internal* context;
uint32_t tag;
@@ -129,8 +129,7 @@ LIBLOG_ABI_PUBLIC int android_log_reset(android_log_context ctx) {
return 0;
}
-LIBLOG_ABI_PUBLIC int android_log_parser_reset(android_log_context ctx, const char* msg,
- size_t len) {
+int android_log_parser_reset(android_log_context ctx, const char* msg, size_t len) {
android_log_context_internal* context;
context = (android_log_context_internal*)ctx;
@@ -144,7 +143,7 @@ LIBLOG_ABI_PUBLIC int android_log_parser_reset(android_log_context ctx, const ch
return 0;
}
-LIBLOG_ABI_PUBLIC int android_log_write_list_begin(android_log_context ctx) {
+int android_log_write_list_begin(android_log_context ctx) {
size_t needed;
android_log_context_internal* context;
@@ -185,7 +184,7 @@ static inline void copy4LE(uint8_t* buf, uint32_t val) {
buf[3] = (val >> 24) & 0xFF;
}
-LIBLOG_ABI_PUBLIC int android_log_write_int32(android_log_context ctx, int32_t value) {
+int android_log_write_int32(android_log_context ctx, int32_t value) {
size_t needed;
android_log_context_internal* context;
@@ -219,7 +218,7 @@ static inline void copy8LE(uint8_t* buf, uint64_t val) {
buf[7] = (val >> 56) & 0xFF;
}
-LIBLOG_ABI_PUBLIC int android_log_write_int64(android_log_context ctx, int64_t value) {
+int android_log_write_int64(android_log_context ctx, int64_t value) {
size_t needed;
android_log_context_internal* context;
@@ -242,8 +241,7 @@ LIBLOG_ABI_PUBLIC int android_log_write_int64(android_log_context ctx, int64_t v
return 0;
}
-LIBLOG_ABI_PUBLIC int android_log_write_string8_len(android_log_context ctx, const char* value,
- size_t maxlen) {
+int android_log_write_string8_len(android_log_context ctx, const char* value, size_t maxlen) {
size_t needed;
ssize_t len;
android_log_context_internal* context;
@@ -278,11 +276,11 @@ LIBLOG_ABI_PUBLIC int android_log_write_string8_len(android_log_context ctx, con
return len;
}
-LIBLOG_ABI_PUBLIC int android_log_write_string8(android_log_context ctx, const char* value) {
+int android_log_write_string8(android_log_context ctx, const char* value) {
return android_log_write_string8_len(ctx, value, MAX_EVENT_PAYLOAD);
}
-LIBLOG_ABI_PUBLIC int android_log_write_float32(android_log_context ctx, float value) {
+int android_log_write_float32(android_log_context ctx, float value) {
size_t needed;
uint32_t ivalue;
android_log_context_internal* context;
@@ -307,7 +305,7 @@ LIBLOG_ABI_PUBLIC int android_log_write_float32(android_log_context ctx, float v
return 0;
}
-LIBLOG_ABI_PUBLIC int android_log_write_list_end(android_log_context ctx) {
+int android_log_write_list_end(android_log_context ctx) {
android_log_context_internal* context;
context = (android_log_context_internal*)ctx;
@@ -337,7 +335,7 @@ LIBLOG_ABI_PUBLIC int android_log_write_list_end(android_log_context ctx) {
/*
* Logs the list of elements to the event log.
*/
-LIBLOG_ABI_PUBLIC int android_log_write_list(android_log_context ctx, log_id_t id) {
+int android_log_write_list(android_log_context ctx, log_id_t id) {
android_log_context_internal* context;
const char* msg;
ssize_t len;
@@ -371,7 +369,7 @@ LIBLOG_ABI_PUBLIC int android_log_write_list(android_log_context ctx, log_id_t i
: __android_log_security_bwrite(context->tag, msg, len));
}
-LIBLOG_ABI_PRIVATE int android_log_write_list_buffer(android_log_context ctx, const char** buffer) {
+int android_log_write_list_buffer(android_log_context ctx, const char** buffer) {
android_log_context_internal* context;
const char* msg;
ssize_t len;
@@ -593,10 +591,10 @@ static android_log_list_element android_log_read_next_internal(android_log_conte
}
}
-LIBLOG_ABI_PUBLIC android_log_list_element android_log_read_next(android_log_context ctx) {
+android_log_list_element android_log_read_next(android_log_context ctx) {
return android_log_read_next_internal(ctx, 0);
}
-LIBLOG_ABI_PUBLIC android_log_list_element android_log_peek_next(android_log_context ctx) {
+android_log_list_element android_log_peek_next(android_log_context ctx) {
return android_log_read_next_internal(ctx, 1);
}
diff --git a/liblog/log_event_write.cpp b/liblog/log_event_write.cpp
index e644a3b94..d04ba90e9 100644
--- a/liblog/log_event_write.cpp
+++ b/liblog/log_event_write.cpp
@@ -24,8 +24,8 @@
#define MAX_SUBTAG_LEN 32
-LIBLOG_ABI_PUBLIC int __android_log_error_write(int tag, const char* subTag, int32_t uid,
- const char* data, uint32_t dataLen) {
+int __android_log_error_write(int tag, const char* subTag, int32_t uid, const char* data,
+ uint32_t dataLen) {
int ret = -EINVAL;
if (subTag && (data || !dataLen)) {
diff --git a/liblog/log_portability.h b/liblog/log_portability.h
index b9fb1d248..468a49832 100644
--- a/liblog/log_portability.h
+++ b/liblog/log_portability.h
@@ -19,25 +19,6 @@
#include <sys/cdefs.h>
#include <unistd.h>
-/* Helpful private sys/cdefs.h like definitions */
-
-/* Declare this library function hidden and internal */
-#if defined(_WIN32)
-#define LIBLOG_HIDDEN
-#else
-#define LIBLOG_HIDDEN __attribute__((visibility("hidden")))
-#endif
-
-/* Declare this library function visible and external */
-#if defined(_WIN32)
-#define LIBLOG_ABI_PUBLIC
-#else
-#define LIBLOG_ABI_PUBLIC __attribute__((visibility("default")))
-#endif
-
-/* Declare this library function visible but private */
-#define LIBLOG_ABI_PRIVATE LIBLOG_ABI_PUBLIC
-
/*
* Declare this library function as reimplementation.
* Prevent circular dependencies, but allow _real_ library to hijack
diff --git a/liblog/log_time.cpp b/liblog/log_time.cpp
index 77bb94ff1..3ae250fab 100644
--- a/liblog/log_time.cpp
+++ b/liblog/log_time.cpp
@@ -23,12 +23,12 @@
#include "log_portability.h"
-LIBLOG_ABI_PRIVATE const char log_time::default_format[] = "%m-%d %H:%M:%S.%q";
-LIBLOG_ABI_PRIVATE const timespec log_time::EPOCH = { 0, 0 };
+const char log_time::default_format[] = "%m-%d %H:%M:%S.%q";
+const timespec log_time::EPOCH = {0, 0};
// Add %#q for fractional seconds to standard strptime function
-LIBLOG_ABI_PRIVATE char* log_time::strptime(const char* s, const char* format) {
+char* log_time::strptime(const char* s, const char* format) {
time_t now;
#ifdef __linux__
*this = log_time(CLOCK_REALTIME);
@@ -134,7 +134,7 @@ LIBLOG_ABI_PRIVATE char* log_time::strptime(const char* s, const char* format) {
return ret;
}
-LIBLOG_ABI_PRIVATE log_time log_time::operator-=(const timespec& T) {
+log_time log_time::operator-=(const timespec& T) {
// No concept of negative time, clamp to EPOCH
if (*this <= T) {
return *this = log_time(EPOCH);
@@ -151,7 +151,7 @@ LIBLOG_ABI_PRIVATE log_time log_time::operator-=(const timespec& T) {
return *this;
}
-LIBLOG_ABI_PRIVATE log_time log_time::operator+=(const timespec& T) {
+log_time log_time::operator+=(const timespec& T) {
this->tv_nsec += (unsigned long int)T.tv_nsec;
if (this->tv_nsec >= NS_PER_SEC) {
this->tv_nsec -= NS_PER_SEC;
@@ -162,7 +162,7 @@ LIBLOG_ABI_PRIVATE log_time log_time::operator+=(const timespec& T) {
return *this;
}
-LIBLOG_ABI_PRIVATE log_time log_time::operator-=(const log_time& T) {
+log_time log_time::operator-=(const log_time& T) {
// No concept of negative time, clamp to EPOCH
if (*this <= T) {
return *this = log_time(EPOCH);
@@ -179,7 +179,7 @@ LIBLOG_ABI_PRIVATE log_time log_time::operator-=(const log_time& T) {
return *this;
}
-LIBLOG_ABI_PRIVATE log_time log_time::operator+=(const log_time& T) {
+log_time log_time::operator+=(const log_time& T) {
this->tv_nsec += T.tv_nsec;
if (this->tv_nsec >= NS_PER_SEC) {
this->tv_nsec -= NS_PER_SEC;
diff --git a/liblog/logd_reader.cpp b/liblog/logd_reader.cpp
index 05bbcbc52..2f0af4a2e 100644
--- a/liblog/logd_reader.cpp
+++ b/liblog/logd_reader.cpp
@@ -67,7 +67,7 @@ static ssize_t logdSetPrune(struct android_log_logger_list* logger,
static ssize_t logdGetStats(struct android_log_logger_list* logger,
struct android_log_transport_context* transp, char* buf, size_t len);
-LIBLOG_HIDDEN struct android_log_transport_read logdLoggerRead = {
+struct android_log_transport_read logdLoggerRead = {
.node = {&logdLoggerRead.node, &logdLoggerRead.node},
.name = "logd",
.available = logdAvailable,
@@ -309,7 +309,7 @@ done:
return ret;
}
-LIBLOG_HIDDEN ssize_t __send_log_msg(char* buf, size_t buf_size) {
+ssize_t __send_log_msg(char* buf, size_t buf_size) {
return send_log_msg(NULL, NULL, buf, buf_size);
}
diff --git a/liblog/logd_reader.h b/liblog/logd_reader.h
index 0bba7cf56..7c53cbb65 100644
--- a/liblog/logd_reader.h
+++ b/liblog/logd_reader.h
@@ -22,6 +22,6 @@
__BEGIN_DECLS
-LIBLOG_HIDDEN ssize_t __send_log_msg(char* buf, size_t buf_size);
+ssize_t __send_log_msg(char* buf, size_t buf_size);
__END_DECLS
diff --git a/liblog/logd_writer.cpp b/liblog/logd_writer.cpp
index ed906b3ee..c3f72f475 100644
--- a/liblog/logd_writer.cpp
+++ b/liblog/logd_writer.cpp
@@ -48,7 +48,7 @@ static int logdOpen();
static void logdClose();
static int logdWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, size_t nr);
-LIBLOG_HIDDEN struct android_log_transport_write logdLoggerWrite = {
+struct android_log_transport_write logdLoggerWrite = {
.node = {&logdLoggerWrite.node, &logdLoggerWrite.node},
.context.sock = -EBADF,
.name = "logd",
diff --git a/liblog/logger.h b/liblog/logger.h
index b2479d274..1f632c037 100644
--- a/liblog/logger.h
+++ b/liblog/logger.h
@@ -156,10 +156,10 @@ static inline uid_t __android_log_uid() {
}
#endif
-LIBLOG_HIDDEN void __android_log_lock();
-LIBLOG_HIDDEN int __android_log_trylock();
-LIBLOG_HIDDEN void __android_log_unlock();
+void __android_log_lock();
+int __android_log_trylock();
+void __android_log_unlock();
-extern LIBLOG_HIDDEN int __android_log_transport;
+extern int __android_log_transport;
__END_DECLS
diff --git a/liblog/logger_lock.cpp b/liblog/logger_lock.cpp
index d4e3a75fe..4636b0031 100644
--- a/liblog/logger_lock.cpp
+++ b/liblog/logger_lock.cpp
@@ -28,7 +28,7 @@
static pthread_mutex_t log_init_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
-LIBLOG_HIDDEN void __android_log_lock() {
+void __android_log_lock() {
#if !defined(_WIN32)
/*
* If we trigger a signal handler in the middle of locked activity and the
@@ -38,7 +38,7 @@ LIBLOG_HIDDEN void __android_log_lock() {
#endif
}
-LIBLOG_HIDDEN int __android_log_trylock() {
+int __android_log_trylock() {
#if !defined(_WIN32)
return pthread_mutex_trylock(&log_init_lock);
#else
@@ -46,7 +46,7 @@ LIBLOG_HIDDEN int __android_log_trylock() {
#endif
}
-LIBLOG_HIDDEN void __android_log_unlock() {
+void __android_log_unlock() {
#if !defined(_WIN32)
pthread_mutex_unlock(&log_init_lock);
#endif
diff --git a/liblog/logger_name.cpp b/liblog/logger_name.cpp
index c6f3cb73b..3aa684132 100644
--- a/liblog/logger_name.cpp
+++ b/liblog/logger_name.cpp
@@ -35,7 +35,7 @@ static const char* LOG_NAME[LOG_ID_MAX] = {
/* clang-format on */
};
-LIBLOG_ABI_PUBLIC const char* android_log_id_to_name(log_id_t log_id) {
+const char* android_log_id_to_name(log_id_t log_id) {
if (log_id >= LOG_ID_MAX) {
log_id = LOG_ID_MAIN;
}
@@ -45,7 +45,7 @@ LIBLOG_ABI_PUBLIC const char* android_log_id_to_name(log_id_t log_id) {
static_assert(std::is_same<std::underlying_type<log_id_t>::type, uint32_t>::value,
"log_id_t must be an unsigned int");
-LIBLOG_ABI_PUBLIC log_id_t android_name_to_log_id(const char* logName) {
+log_id_t android_name_to_log_id(const char* logName) {
const char* b;
unsigned int ret;
diff --git a/liblog/logger_read.cpp b/liblog/logger_read.cpp
index e429c36d2..4cf0846fb 100644
--- a/liblog/logger_read.cpp
+++ b/liblog/logger_read.cpp
@@ -50,7 +50,7 @@ static void android_logger_free(struct logger* logger) {
/* android_logger_alloc unimplemented, no use case */
/* method for getting the associated sublog id */
-LIBLOG_ABI_PUBLIC log_id_t android_logger_get_id(struct logger* logger) {
+log_id_t android_logger_get_id(struct logger* logger) {
return ((struct android_log_logger*)logger)->logId;
}
@@ -139,16 +139,16 @@ static int init_transport_context(struct android_log_logger_list* logger_list) {
} \
return ret
-LIBLOG_ABI_PUBLIC int android_logger_clear(struct logger* logger) {
+int android_logger_clear(struct logger* logger) {
LOGGER_FUNCTION(logger, -ENODEV, clear);
}
/* returns the total size of the log's ring buffer */
-LIBLOG_ABI_PUBLIC long android_logger_get_log_size(struct logger* logger) {
+long android_logger_get_log_size(struct logger* logger) {
LOGGER_FUNCTION(logger, -ENODEV, getSize);
}
-LIBLOG_ABI_PUBLIC int android_logger_set_log_size(struct logger* logger, unsigned long size) {
+int android_logger_set_log_size(struct logger* logger, unsigned long size) {
LOGGER_FUNCTION(logger, -ENODEV, setSize, size);
}
@@ -156,14 +156,14 @@ LIBLOG_ABI_PUBLIC int android_logger_set_log_size(struct logger* logger, unsigne
* returns the readable size of the log's ring buffer (that is, amount of the
* log consumed)
*/
-LIBLOG_ABI_PUBLIC long android_logger_get_log_readable_size(struct logger* logger) {
+long android_logger_get_log_readable_size(struct logger* logger) {
LOGGER_FUNCTION(logger, -ENODEV, getReadableSize);
}
/*
* returns the logger version
*/
-LIBLOG_ABI_PUBLIC int android_logger_get_log_version(struct logger* logger) {
+int android_logger_get_log_version(struct logger* logger) {
LOGGER_FUNCTION(logger, 4, version);
}
@@ -191,23 +191,19 @@ LIBLOG_ABI_PUBLIC int android_logger_get_log_version(struct logger* logger) {
/*
* returns statistics
*/
-LIBLOG_ABI_PUBLIC ssize_t android_logger_get_statistics(struct logger_list* logger_list, char* buf,
- size_t len) {
+ssize_t android_logger_get_statistics(struct logger_list* logger_list, char* buf, size_t len) {
LOGGER_LIST_FUNCTION(logger_list, -ENODEV, getStats, buf, len);
}
-LIBLOG_ABI_PUBLIC ssize_t android_logger_get_prune_list(struct logger_list* logger_list, char* buf,
- size_t len) {
+ssize_t android_logger_get_prune_list(struct logger_list* logger_list, char* buf, size_t len) {
LOGGER_LIST_FUNCTION(logger_list, -ENODEV, getPrune, buf, len);
}
-LIBLOG_ABI_PUBLIC int android_logger_set_prune_list(struct logger_list* logger_list, char* buf,
- size_t len) {
+int android_logger_set_prune_list(struct logger_list* logger_list, char* buf, size_t len) {
LOGGER_LIST_FUNCTION(logger_list, -ENODEV, setPrune, buf, len);
}
-LIBLOG_ABI_PUBLIC struct logger_list* android_logger_list_alloc(int mode, unsigned int tail,
- pid_t pid) {
+struct logger_list* android_logger_list_alloc(int mode, unsigned int tail, pid_t pid) {
struct android_log_logger_list* logger_list;
logger_list = static_cast<android_log_logger_list*>(calloc(1, sizeof(*logger_list)));
@@ -224,8 +220,7 @@ LIBLOG_ABI_PUBLIC struct logger_list* android_logger_list_alloc(int mode, unsign
return (struct logger_list*)logger_list;
}
-LIBLOG_ABI_PUBLIC struct logger_list* android_logger_list_alloc_time(int mode, log_time start,
- pid_t pid) {
+struct logger_list* android_logger_list_alloc_time(int mode, log_time start, pid_t pid) {
struct android_log_logger_list* logger_list;
logger_list = static_cast<android_log_logger_list*>(calloc(1, sizeof(*logger_list)));
@@ -246,8 +241,7 @@ LIBLOG_ABI_PUBLIC struct logger_list* android_logger_list_alloc_time(int mode, l
/* android_logger_list_unregister unimplemented, no use case */
/* Open the named log and add it to the logger list */
-LIBLOG_ABI_PUBLIC struct logger* android_logger_open(struct logger_list* logger_list,
- log_id_t logId) {
+struct logger* android_logger_open(struct logger_list* logger_list, log_id_t logId) {
struct android_log_logger_list* logger_list_internal =
(struct android_log_logger_list*)logger_list;
struct android_log_logger* logger;
@@ -289,8 +283,8 @@ ok:
}
/* Open the single named log and make it part of a new logger list */
-LIBLOG_ABI_PUBLIC struct logger_list* android_logger_list_open(log_id_t logId, int mode,
- unsigned int tail, pid_t pid) {
+struct logger_list* android_logger_list_open(log_id_t logId, int mode, unsigned int tail,
+ pid_t pid) {
struct logger_list* logger_list = android_logger_list_alloc(mode, tail, pid);
if (!logger_list) {
@@ -345,8 +339,7 @@ static int android_transport_read(struct android_log_logger_list* logger_list,
}
/* Read from the selected logs */
-LIBLOG_ABI_PUBLIC int android_logger_list_read(struct logger_list* logger_list,
- struct log_msg* log_msg) {
+int android_logger_list_read(struct logger_list* logger_list, struct log_msg* log_msg) {
struct android_log_transport_context* transp;
struct android_log_logger_list* logger_list_internal =
(struct android_log_logger_list*)logger_list;
@@ -437,7 +430,7 @@ LIBLOG_ABI_PUBLIC int android_logger_list_read(struct logger_list* logger_list,
}
/* Close all the logs */
-LIBLOG_ABI_PUBLIC void android_logger_list_free(struct logger_list* logger_list) {
+void android_logger_list_free(struct logger_list* logger_list) {
struct android_log_logger_list* logger_list_internal =
(struct android_log_logger_list*)logger_list;
diff --git a/liblog/logger_write.cpp b/liblog/logger_write.cpp
index af8cb2d24..908fe7fd8 100644
--- a/liblog/logger_write.cpp
+++ b/liblog/logger_write.cpp
@@ -105,7 +105,7 @@ static void __android_log_cache_available(struct android_log_transport_write* no
}
}
-LIBLOG_ABI_PUBLIC extern "C" int __android_log_dev_available() {
+extern "C" int __android_log_dev_available() {
struct android_log_transport_write* node;
if (list_empty(&__android_log_transport_write)) {
@@ -128,7 +128,7 @@ static atomic_uintptr_t tagMap;
/*
* Release any logger resources. A new log write will immediately re-acquire.
*/
-LIBLOG_ABI_PUBLIC void __android_log_close() {
+void __android_log_close() {
struct android_log_transport_write* transport;
#if defined(__ANDROID__)
EventTagMap* m;
@@ -402,12 +402,11 @@ static int __write_to_log_init(log_id_t log_id, struct iovec* vec, size_t nr) {
return ret;
}
-LIBLOG_ABI_PUBLIC int __android_log_write(int prio, const char* tag, const char* msg) {
+int __android_log_write(int prio, const char* tag, const char* msg) {
return __android_log_buf_write(LOG_ID_MAIN, prio, tag, msg);
}
-LIBLOG_ABI_PUBLIC int __android_log_buf_write(int bufID, int prio, const char* tag,
- const char* msg) {
+int __android_log_buf_write(int bufID, int prio, const char* tag, const char* msg) {
struct iovec vec[3];
char tmp_tag[32];
@@ -472,7 +471,7 @@ LIBLOG_ABI_PUBLIC int __android_log_buf_write(int bufID, int prio, const char* t
return write_to_log(static_cast<log_id_t>(bufID), vec, 3);
}
-LIBLOG_ABI_PUBLIC int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap) {
+int __android_log_vprint(int prio, const char* tag, const char* fmt, va_list ap) {
char buf[LOG_BUF_SIZE];
vsnprintf(buf, LOG_BUF_SIZE, fmt, ap);
@@ -480,7 +479,7 @@ LIBLOG_ABI_PUBLIC int __android_log_vprint(int prio, const char* tag, const char
return __android_log_write(prio, tag, buf);
}
-LIBLOG_ABI_PUBLIC int __android_log_print(int prio, const char* tag, const char* fmt, ...) {
+int __android_log_print(int prio, const char* tag, const char* fmt, ...) {
va_list ap;
char buf[LOG_BUF_SIZE];
@@ -491,8 +490,7 @@ LIBLOG_ABI_PUBLIC int __android_log_print(int prio, const char* tag, const char*
return __android_log_write(prio, tag, buf);
}
-LIBLOG_ABI_PUBLIC int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fmt,
- ...) {
+int __android_log_buf_print(int bufID, int prio, const char* tag, const char* fmt, ...) {
va_list ap;
char buf[LOG_BUF_SIZE];
@@ -503,8 +501,7 @@ LIBLOG_ABI_PUBLIC int __android_log_buf_print(int bufID, int prio, const char* t
return __android_log_buf_write(bufID, prio, tag, buf);
}
-LIBLOG_ABI_PUBLIC void __android_log_assert(const char* cond, const char* tag, const char* fmt,
- ...) {
+void __android_log_assert(const char* cond, const char* tag, const char* fmt, ...) {
char buf[LOG_BUF_SIZE];
if (fmt) {
@@ -533,7 +530,7 @@ LIBLOG_ABI_PUBLIC void __android_log_assert(const char* cond, const char* tag, c
/* NOTREACHED */
}
-LIBLOG_ABI_PUBLIC int __android_log_bwrite(int32_t tag, const void* payload, size_t len) {
+int __android_log_bwrite(int32_t tag, const void* payload, size_t len) {
struct iovec vec[2];
vec[0].iov_base = &tag;
@@ -544,7 +541,7 @@ LIBLOG_ABI_PUBLIC int __android_log_bwrite(int32_t tag, const void* payload, siz
return write_to_log(LOG_ID_EVENTS, vec, 2);
}
-LIBLOG_ABI_PUBLIC int __android_log_stats_bwrite(int32_t tag, const void* payload, size_t len) {
+int __android_log_stats_bwrite(int32_t tag, const void* payload, size_t len) {
struct iovec vec[2];
vec[0].iov_base = &tag;
@@ -555,7 +552,7 @@ LIBLOG_ABI_PUBLIC int __android_log_stats_bwrite(int32_t tag, const void* payloa
return write_to_log(LOG_ID_STATS, vec, 2);
}
-LIBLOG_ABI_PUBLIC int __android_log_security_bwrite(int32_t tag, const void* payload, size_t len) {
+int __android_log_security_bwrite(int32_t tag, const void* payload, size_t len) {
struct iovec vec[2];
vec[0].iov_base = &tag;
@@ -571,8 +568,7 @@ LIBLOG_ABI_PUBLIC int __android_log_security_bwrite(int32_t tag, const void* pay
* for the general case where we're generating lists of stuff, but very
* handy if we just want to dump an integer into the log.
*/
-LIBLOG_ABI_PUBLIC int __android_log_btwrite(int32_t tag, char type, const void* payload,
- size_t len) {
+int __android_log_btwrite(int32_t tag, char type, const void* payload, size_t len) {
struct iovec vec[3];
vec[0].iov_base = &tag;
@@ -589,7 +585,7 @@ LIBLOG_ABI_PUBLIC int __android_log_btwrite(int32_t tag, char type, const void*
* Like __android_log_bwrite, but used for writing strings to the
* event log.
*/
-LIBLOG_ABI_PUBLIC int __android_log_bswrite(int32_t tag, const char* payload) {
+int __android_log_bswrite(int32_t tag, const char* payload) {
struct iovec vec[4];
char type = EVENT_TYPE_STRING;
uint32_t len = strlen(payload);
@@ -610,7 +606,7 @@ LIBLOG_ABI_PUBLIC int __android_log_bswrite(int32_t tag, const char* payload) {
* Like __android_log_security_bwrite, but used for writing strings to the
* security log.
*/
-LIBLOG_ABI_PUBLIC int __android_log_security_bswrite(int32_t tag, const char* payload) {
+int __android_log_security_bswrite(int32_t tag, const char* payload) {
struct iovec vec[4];
char type = EVENT_TYPE_STRING;
uint32_t len = strlen(payload);
@@ -645,9 +641,9 @@ static int __write_to_log_null(log_id_t log_id, struct iovec* vec, size_t nr) {
/* Following functions need access to our internal write_to_log status */
-LIBLOG_HIDDEN int __android_log_transport;
+int __android_log_transport;
-LIBLOG_ABI_PUBLIC int android_set_log_transport(int transport_flag) {
+int android_set_log_transport(int transport_flag) {
int retval;
if (transport_flag < 0) {
@@ -688,7 +684,7 @@ LIBLOG_ABI_PUBLIC int android_set_log_transport(int transport_flag) {
return retval;
}
-LIBLOG_ABI_PUBLIC int android_get_log_transport() {
+int android_get_log_transport() {
int ret = LOGGER_DEFAULT;
__android_log_lock();
diff --git a/liblog/logprint.cpp b/liblog/logprint.cpp
index 798b08909..bc056cbb6 100644
--- a/liblog/logprint.cpp
+++ b/liblog/logprint.cpp
@@ -195,12 +195,12 @@ static android_LogPriority filterPriForTag(AndroidLogFormat* p_format, const cha
* returns 1 if this log line should be printed based on its priority
* and tag, and 0 if it should not
*/
-LIBLOG_ABI_PUBLIC int android_log_shouldPrintLine(AndroidLogFormat* p_format, const char* tag,
- android_LogPriority pri) {
+int android_log_shouldPrintLine(AndroidLogFormat* p_format, const char* tag,
+ android_LogPriority pri) {
return pri >= filterPriForTag(p_format, tag);
}
-LIBLOG_ABI_PUBLIC AndroidLogFormat* android_log_format_new() {
+AndroidLogFormat* android_log_format_new() {
AndroidLogFormat* p_ret;
p_ret = static_cast<AndroidLogFormat*>(calloc(1, sizeof(AndroidLogFormat)));
@@ -228,7 +228,7 @@ LIBLOG_ABI_PUBLIC AndroidLogFormat* android_log_format_new() {
static list_declare(convertHead);
-LIBLOG_ABI_PUBLIC void android_log_format_free(AndroidLogFormat* p_format) {
+void android_log_format_free(AndroidLogFormat* p_format) {
FilterInfo *p_info, *p_info_old;
p_info = p_format->filters;
@@ -251,8 +251,7 @@ LIBLOG_ABI_PUBLIC void android_log_format_free(AndroidLogFormat* p_format) {
}
}
-LIBLOG_ABI_PUBLIC int android_log_setPrintFormat(AndroidLogFormat* p_format,
- AndroidLogPrintFormat format) {
+int android_log_setPrintFormat(AndroidLogFormat* p_format, AndroidLogPrintFormat format) {
switch (format) {
case FORMAT_MODIFIER_COLOR:
p_format->colored_output = true;
@@ -298,7 +297,7 @@ static const char utc[] = "UTC";
/**
* Returns FORMAT_OFF on invalid string
*/
-LIBLOG_ABI_PUBLIC AndroidLogPrintFormat android_log_formatFromString(const char* formatString) {
+AndroidLogPrintFormat android_log_formatFromString(const char* formatString) {
static AndroidLogPrintFormat format;
/* clang-format off */
@@ -367,8 +366,7 @@ LIBLOG_ABI_PUBLIC AndroidLogPrintFormat android_log_formatFromString(const char*
* Assumes single threaded execution
*/
-LIBLOG_ABI_PUBLIC int android_log_addFilterRule(AndroidLogFormat* p_format,
- const char* filterExpression) {
+int android_log_addFilterRule(AndroidLogFormat* p_format, const char* filterExpression) {
size_t tagNameLength;
android_LogPriority pri = ANDROID_LOG_DEFAULT;
@@ -463,8 +461,7 @@ static char* strsep(char** stringp, const char* delim) {
* Assumes single threaded execution
*
*/
-LIBLOG_ABI_PUBLIC int android_log_addFilterString(AndroidLogFormat* p_format,
- const char* filterString) {
+int android_log_addFilterString(AndroidLogFormat* p_format, const char* filterString) {
char* filterStringCopy = strdup(filterString);
char* p_cur = filterStringCopy;
char* p_ret;
@@ -496,8 +493,7 @@ error:
* Returns 0 on success and -1 on invalid wire format (entry will be
* in unspecified state)
*/
-LIBLOG_ABI_PUBLIC int android_log_processLogBuffer(struct logger_entry* buf,
- AndroidLogEntry* entry) {
+int android_log_processLogBuffer(struct logger_entry* buf, AndroidLogEntry* entry) {
entry->message = NULL;
entry->messageLen = 0;
@@ -997,7 +993,7 @@ no_room:
* it however we choose, which means we can't really use a fixed-size buffer
* here.
*/
-LIBLOG_ABI_PUBLIC int android_log_processBinaryLogBuffer(
+int android_log_processBinaryLogBuffer(
struct logger_entry* buf, AndroidLogEntry* entry,
[[maybe_unused]] const EventTagMap* map, /* only on !__ANDROID__ */
char* messageBuf, int messageBufLen) {
@@ -1525,10 +1521,9 @@ static void convertMonotonic(struct timespec* result, const AndroidLogEntry* ent
* Returns NULL on malloc error
*/
-LIBLOG_ABI_PUBLIC char* android_log_formatLogLine(AndroidLogFormat* p_format, char* defaultBuffer,
- size_t defaultBufferSize,
- const AndroidLogEntry* entry,
- size_t* p_outLength) {
+char* android_log_formatLogLine(AndroidLogFormat* p_format, char* defaultBuffer,
+ size_t defaultBufferSize, const AndroidLogEntry* entry,
+ size_t* p_outLength) {
#if !defined(_WIN32)
struct tm tmBuf;
#endif
@@ -1819,8 +1814,7 @@ LIBLOG_ABI_PUBLIC char* android_log_formatLogLine(AndroidLogFormat* p_format, ch
* Returns count bytes written
*/
-LIBLOG_ABI_PUBLIC int android_log_printLogLine(AndroidLogFormat* p_format, int fd,
- const AndroidLogEntry* entry) {
+int android_log_printLogLine(AndroidLogFormat* p_format, int fd, const AndroidLogEntry* entry) {
int ret;
char defaultBuffer[512];
char* outBuffer = NULL;
diff --git a/liblog/pmsg_reader.cpp b/liblog/pmsg_reader.cpp
index 7bc6e4a39..ba27fd74c 100644
--- a/liblog/pmsg_reader.cpp
+++ b/liblog/pmsg_reader.cpp
@@ -38,7 +38,7 @@ static void pmsgClose(struct android_log_logger_list* logger_list,
static int pmsgClear(struct android_log_logger* logger,
struct android_log_transport_context* transp);
-LIBLOG_HIDDEN struct android_log_transport_read pmsgLoggerRead = {
+struct android_log_transport_read pmsgLoggerRead = {
.node = {&pmsgLoggerRead.node, &pmsgLoggerRead.node},
.name = "pmsg",
.available = pmsgAvailable,
@@ -270,10 +270,8 @@ static void* realloc_or_free(void* ptr, size_t new_size) {
return result;
}
-LIBLOG_ABI_PRIVATE ssize_t __android_log_pmsg_file_read(log_id_t logId, char prio,
- const char* prefix,
- __android_log_pmsg_file_read_fn fn,
- void* arg) {
+ssize_t __android_log_pmsg_file_read(log_id_t logId, char prio, const char* prefix,
+ __android_log_pmsg_file_read_fn fn, void* arg) {
ssize_t ret;
struct android_log_logger_list logger_list;
struct android_log_transport_context transp;
diff --git a/liblog/pmsg_writer.cpp b/liblog/pmsg_writer.cpp
index b2fc6d06e..e8511008b 100644
--- a/liblog/pmsg_writer.cpp
+++ b/liblog/pmsg_writer.cpp
@@ -40,7 +40,7 @@ static void pmsgClose();
static int pmsgAvailable(log_id_t logId);
static int pmsgWrite(log_id_t logId, struct timespec* ts, struct iovec* vec, size_t nr);
-LIBLOG_HIDDEN struct android_log_transport_write pmsgLoggerWrite = {
+struct android_log_transport_write pmsgLoggerWrite = {
.node = {&pmsgLoggerWrite.node, &pmsgLoggerWrite.node},
.context.fd = -1,
.name = "pmsg",
@@ -200,9 +200,8 @@ static inline const char* strnrchr(const char* buf, size_t len, char c) {
}
/* Write a buffer as filename references (tag = <basedir>:<basename>) */
-LIBLOG_ABI_PRIVATE ssize_t __android_log_pmsg_file_write(log_id_t logId, char prio,
- const char* filename, const char* buf,
- size_t len) {
+ssize_t __android_log_pmsg_file_write(log_id_t logId, char prio, const char* filename,
+ const char* buf, size_t len) {
bool weOpened;
size_t length, packet_len;
const char* tag;
diff --git a/liblog/properties.cpp b/liblog/properties.cpp
index 764877e79..2e0a8c988 100644
--- a/liblog/properties.cpp
+++ b/liblog/properties.cpp
@@ -264,18 +264,17 @@ static int __android_log_level(const char* tag, size_t len, int default_prio) {
return default_prio;
}
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable_len(int prio, const char* tag, size_t len,
- int default_prio) {
+int __android_log_is_loggable_len(int prio, const char* tag, size_t len, int default_prio) {
int logLevel = __android_log_level(tag, len, default_prio);
return logLevel >= 0 && prio >= logLevel;
}
-LIBLOG_ABI_PUBLIC int __android_log_is_loggable(int prio, const char* tag, int default_prio) {
+int __android_log_is_loggable(int prio, const char* tag, int default_prio) {
int logLevel = __android_log_level(tag, (tag && *tag) ? strlen(tag) : 0, default_prio);
return logLevel >= 0 && prio >= logLevel;
}
-LIBLOG_ABI_PUBLIC int __android_log_is_debuggable() {
+int __android_log_is_debuggable() {
static uint32_t serial;
static struct cache_char tag_cache;
static const char key[] = "ro.debuggable";
@@ -361,7 +360,7 @@ static unsigned char evaluate_persist_ro(const struct cache2_char* self) {
* Timestamp state generally remains constant, but can change at any time
* to handle developer requirements.
*/
-LIBLOG_ABI_PUBLIC clockid_t android_log_clockid() {
+clockid_t android_log_clockid() {
static struct cache2_char clockid = {PTHREAD_MUTEX_INITIALIZER, 0,
"persist.logd.timestamp", {{NULL, 0xFFFFFFFF}, '\0'},
"ro.logd.timestamp", {{NULL, 0xFFFFFFFF}, '\0'},
@@ -380,7 +379,7 @@ static unsigned char evaluate_security(const struct cache2_char* self) {
return (c != BOOLEAN_FALSE) && c && (self->cache_persist.c == BOOLEAN_TRUE);
}
-LIBLOG_ABI_PUBLIC int __android_log_security() {
+int __android_log_security() {
static struct cache2_char security = {
PTHREAD_MUTEX_INITIALIZER, 0,
"persist.logd.security", {{NULL, 0xFFFFFFFF}, BOOLEAN_FALSE},
@@ -428,7 +427,7 @@ static void refresh_cache_property(struct cache_property* cache, const char* key
}
/* get boolean with the logger twist that supports eng adjustments */
-LIBLOG_ABI_PRIVATE bool __android_logger_property_get_bool(const char* key, int flag) {
+bool __android_logger_property_get_bool(const char* key, int flag) {
struct cache_property property = {{NULL, 0xFFFFFFFF}, {0}};
if (flag & BOOL_DEFAULT_FLAG_PERSIST) {
char newkey[strlen("persist.") + strlen(key) + 1];
@@ -478,7 +477,7 @@ LIBLOG_ABI_PRIVATE bool __android_logger_property_get_bool(const char* key, int
return (flag & BOOL_DEFAULT_FLAG_TRUE_FALSE) != BOOL_DEFAULT_FALSE;
}
-LIBLOG_ABI_PRIVATE bool __android_logger_valid_buffer_size(unsigned long value) {
+bool __android_logger_valid_buffer_size(unsigned long value) {
static long pages, pagesize;
unsigned long maximum;
@@ -583,7 +582,7 @@ static unsigned long evaluate_property_get_size(const struct cache2_property_siz
return property_get_size_from_cache(&self->cache_ro);
}
-LIBLOG_ABI_PRIVATE unsigned long __android_logger_get_buffer_size(log_id_t logId) {
+unsigned long __android_logger_get_buffer_size(log_id_t logId) {
static const char global_tunable[] = "persist.logd.size"; /* Settings App */
static const char global_default[] = "ro.logd.size"; /* BoardConfig.mk */
static struct cache2_property_size global = {
diff --git a/liblog/stderr_write.cpp b/liblog/stderr_write.cpp
index 28195aac1..e324a7c65 100644
--- a/liblog/stderr_write.cpp
+++ b/liblog/stderr_write.cpp
@@ -54,7 +54,7 @@ struct stderrContext {
#endif
};
-LIBLOG_HIDDEN struct android_log_transport_write stderrLoggerWrite = {
+struct android_log_transport_write stderrLoggerWrite = {
.node = {&stderrLoggerWrite.node, &stderrLoggerWrite.node},
.context.priv = NULL,
.name = "stderr",