Skip to content

Commit d6972eb

Browse files
committed
termux-api.h: allow usage from c++
And prevent header from being included multiple times for no reason.
1 parent 8684d5e commit d6972eb

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

termux-api.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
1+
#ifndef TERMUX_API_H
2+
#define TERMUX_API_H
3+
14
#include <stdlib.h>
25

6+
#if defined(__cplusplus)
7+
extern "C" {
8+
#endif
9+
310
_Noreturn void exec_am_broadcast(int, char**, char*, char*);
411
_Noreturn void contact_plugin(int, char**, char*, char*);
512
_Noreturn void exec_callback(int);
613
void generate_uuid(char*);
714
void* transmit_stdin_to_socket(void*);
815
int transmit_socket_to_stdout(int);
916
int run_api_command(int, char**);
17+
18+
#if defined(__cplusplus)
19+
}
20+
#endif
21+
22+
#endif /* TERMUX_API_H */

0 commit comments

Comments
 (0)