Add extern "C" to all the headers.
Change-Id: Idc249ff1b199b7c455f90092ff2c8a48b539faf4
This commit is contained in:
parent
ff934d0257
commit
d808d2194f
6 changed files with 52 additions and 0 deletions
|
@ -22,6 +22,10 @@
|
||||||
#include "transport.h" /* readx(), writex() */
|
#include "transport.h" /* readx(), writex() */
|
||||||
#include "fdevent.h"
|
#include "fdevent.h"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define MAX_PAYLOAD 4096
|
#define MAX_PAYLOAD 4096
|
||||||
|
|
||||||
#define A_SYNC 0x434e5953
|
#define A_SYNC 0x434e5953
|
||||||
|
@ -421,4 +425,8 @@ extern int SHELL_EXIT_NOTIFY_FD;
|
||||||
int sendfailmsg(int fd, const char *reason);
|
int sendfailmsg(int fd, const char *reason);
|
||||||
int handle_host_request(char *service, transport_type ttype, char* serial, int reply_fd, asocket *s);
|
int handle_host_request(char *service, transport_type ttype, char* serial, int reply_fd, asocket *s);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -19,6 +19,10 @@
|
||||||
|
|
||||||
#include <stdint.h> /* for int64_t */
|
#include <stdint.h> /* for int64_t */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* events that may be observed */
|
/* events that may be observed */
|
||||||
#define FDE_READ 0x0001
|
#define FDE_READ 0x0001
|
||||||
#define FDE_WRITE 0x0002
|
#define FDE_WRITE 0x0002
|
||||||
|
@ -79,5 +83,8 @@ struct fdevent
|
||||||
void *arg;
|
void *arg;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -17,6 +17,14 @@
|
||||||
#ifndef __FUSE_ADB_PROVIDER_H
|
#ifndef __FUSE_ADB_PROVIDER_H
|
||||||
#define __FUSE_ADB_PROVIDER_H
|
#define __FUSE_ADB_PROVIDER_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
int run_adb_fuse(int sfd, uint64_t file_size, uint32_t block_size);
|
int run_adb_fuse(int sfd, uint64_t file_size, uint32_t block_size);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -36,6 +36,10 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#define OS_PATH_SEPARATOR '\\'
|
#define OS_PATH_SEPARATOR '\\'
|
||||||
#define OS_PATH_SEPARATOR_STR "\\"
|
#define OS_PATH_SEPARATOR_STR "\\"
|
||||||
|
|
||||||
|
@ -254,6 +258,10 @@ static __inline__ int adb_is_absolute_host_path( const char* path )
|
||||||
return isalpha(path[0]) && path[1] == ':' && path[2] == '\\';
|
return isalpha(path[0]) && path[1] == ':' && path[2] == '\\';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#else /* !_WIN32 a.k.a. Unix */
|
#else /* !_WIN32 a.k.a. Unix */
|
||||||
|
|
||||||
#include "fdevent.h"
|
#include "fdevent.h"
|
||||||
|
@ -491,4 +499,8 @@ static __inline__ int adb_is_absolute_host_path( const char* path )
|
||||||
|
|
||||||
#endif /* !_WIN32 */
|
#endif /* !_WIN32 */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ADB_SYSDEPS_H */
|
#endif /* _ADB_SYSDEPS_H */
|
||||||
|
|
|
@ -17,10 +17,19 @@
|
||||||
#ifndef __TRANSPORT_H
|
#ifndef __TRANSPORT_H
|
||||||
#define __TRANSPORT_H
|
#define __TRANSPORT_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* convenience wrappers around read/write that will retry on
|
/* convenience wrappers around read/write that will retry on
|
||||||
** EINTR and/or short read/write. Returns 0 on success, -1
|
** EINTR and/or short read/write. Returns 0 on success, -1
|
||||||
** on error or EOF.
|
** on error or EOF.
|
||||||
*/
|
*/
|
||||||
int readx(int fd, void *ptr, size_t len);
|
int readx(int fd, void *ptr, size_t len);
|
||||||
int writex(int fd, const void *ptr, size_t len);
|
int writex(int fd, const void *ptr, size_t len);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __TRANSPORT_H */
|
#endif /* __TRANSPORT_H */
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
#ifndef _ADB_UTILS_H
|
#ifndef _ADB_UTILS_H
|
||||||
#define _ADB_UTILS_H
|
#define _ADB_UTILS_H
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* bounded buffer functions */
|
/* bounded buffer functions */
|
||||||
|
|
||||||
/* all these functions are used to append data to a bounded buffer.
|
/* all these functions are used to append data to a bounded buffer.
|
||||||
|
@ -65,4 +69,8 @@ char* buff_add (char* buff, char* buffEnd, const char* format, ... );
|
||||||
#define BUFF_DECL(_buff,_cursor,_end,_size) \
|
#define BUFF_DECL(_buff,_cursor,_end,_size) \
|
||||||
char _buff[_size], *_cursor=_buff, *_end = _cursor + (_size)
|
char _buff[_size], *_cursor=_buff, *_end = _cursor + (_size)
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* _ADB_UTILS_H */
|
#endif /* _ADB_UTILS_H */
|
||||||
|
|
Loading…
Reference in a new issue