summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2015-02-18 17:52:39 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-02-18 17:52:40 +0000
commit1ac334ec660292298917668a40fc5239b1fdaa56 (patch)
treef0665b0b1e6af66463711f6e5a6e1ed7d8bf10a8
parent32e872caa42ab00fc80bd595c9d621294899ae15 (diff)
parent818fb4b448a44ef9f1db85f66415fde4b7a96aa6 (diff)
downloadsystem_core-1ac334ec660292298917668a40fc5239b1fdaa56.zip
system_core-1ac334ec660292298917668a40fc5239b1fdaa56.tar.gz
system_core-1ac334ec660292298917668a40fc5239b1fdaa56.tar.bz2
Merge "Add extern "C" to all the adb headers."
-rw-r--r--adb/adb.h8
-rw-r--r--adb/adb_auth.h8
-rw-r--r--adb/adb_client.h8
-rw-r--r--adb/adb_trace.h8
-rw-r--r--adb/file_sync_service.h8
-rw-r--r--adb/sysdeps.h16
6 files changed, 56 insertions, 0 deletions
diff --git a/adb/adb.h b/adb/adb.h
index 6ac4731..600bdd5 100644
--- a/adb/adb.h
+++ b/adb/adb.h
@@ -23,6 +23,10 @@
#include "fdevent.h"
#include "transport.h" /* readx(), writex() */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MAX_PAYLOAD 4096
#define A_SYNC 0x434e5953
@@ -420,4 +424,8 @@ typedef enum {
int sendfailmsg(int fd, const char *reason);
int handle_host_request(char *service, transport_type ttype, char* serial, int reply_fd, asocket *s);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/adb/adb_auth.h b/adb/adb_auth.h
index 54dd537..b718b42 100644
--- a/adb/adb_auth.h
+++ b/adb/adb_auth.h
@@ -17,6 +17,10 @@
#ifndef __ADB_AUTH_H
#define __ADB_AUTH_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
void adb_auth_init(void);
int adb_auth_keygen(const char* filename);
void adb_auth_verified(atransport *t);
@@ -52,4 +56,8 @@ void adb_auth_confirm_key(unsigned char *data, size_t len, atransport *t);
#endif // ADB_HOST
+#ifdef __cplusplus
+}
+#endif
+
#endif // __ADB_AUTH_H
diff --git a/adb/adb_client.h b/adb/adb_client.h
index 0ec47ca..6ba3b38 100644
--- a/adb/adb_client.h
+++ b/adb/adb_client.h
@@ -3,6 +3,10 @@
#include "adb.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* connect to adb, connect to the named service, and return
** a valid fd for interacting with that service upon success
** or a negative number on failure
@@ -54,4 +58,8 @@ const char *adb_error(void);
*/
int adb_status(int fd);
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/adb/adb_trace.h b/adb/adb_trace.h
index b8a2f4c..69b6c69 100644
--- a/adb/adb_trace.h
+++ b/adb/adb_trace.h
@@ -21,6 +21,10 @@
#include <android/log.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* define ADB_TRACE to 1 to enable tracing support, or 0 to disable it */
#define ADB_TRACE 1
@@ -142,4 +146,8 @@ void adb_trace_init(void);
# define ADB_TRACING 0
#endif /* ADB_TRACE */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* __ADB_TRACE_H */
diff --git a/adb/file_sync_service.h b/adb/file_sync_service.h
index c3c8574..5b69a63 100644
--- a/adb/file_sync_service.h
+++ b/adb/file_sync_service.h
@@ -17,6 +17,10 @@
#ifndef _FILE_SYNC_SERVICE_H_
#define _FILE_SYNC_SERVICE_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define htoll(x) (x)
#define ltohl(x) (x)
@@ -72,4 +76,8 @@ int do_sync_pull(const char *rpath, const char *lpath, int show_progress, int pu
#define SYNC_DATA_MAX (64*1024)
+#ifdef __cplusplus
+}
+#endif
+
#endif
diff --git a/adb/sysdeps.h b/adb/sysdeps.h
index 086dd61..ec847b5 100644
--- a/adb/sysdeps.h
+++ b/adb/sysdeps.h
@@ -39,6 +39,10 @@
#include "fdevent.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define OS_PATH_SEPARATOR '\\'
#define OS_PATH_SEPARATOR_STR "\\"
#define ENV_PATH_SEPARATOR_STR ";"
@@ -260,6 +264,10 @@ static __inline__ int adb_is_absolute_host_path( const char* path )
extern char* adb_strtok_r(char *str, const char *delim, char **saveptr);
+#ifdef __cplusplus
+}
+#endif
+
#else /* !_WIN32 a.k.a. Unix */
#include "fdevent.h"
@@ -279,6 +287,10 @@ extern char* adb_strtok_r(char *str, const char *delim, char **saveptr);
#include <string.h>
#include <unistd.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* TEMP_FAILURE_RETRY is defined by some, but not all, versions of
* <unistd.h>. (Alas, it is not as standard as we'd hoped!) So, if it's
@@ -534,4 +546,8 @@ static __inline__ unsigned long adb_thread_id()
#endif /* !_WIN32 */
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _ADB_SYSDEPS_H */