Merge "Add extern "C" to all the adb headers."

This commit is contained in:
Dan Albert 2015-02-18 17:52:39 +00:00 committed by Gerrit Code Review
commit 1ac334ec66
6 changed files with 56 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 */

View file

@ -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

View file

@ -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 */