mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 13:00:42 -07:00
Chg: android adaptions from @xianglin1998
This commit is contained in:
parent
914316d194
commit
1bf32aad90
4 changed files with 18 additions and 6 deletions
|
@ -83,8 +83,9 @@ enum {
|
|||
EMINCOUNT = 1,
|
||||
EMAXCOUNT,
|
||||
EBADINT,
|
||||
// The same name define EOVERFLOW in errno.h on windows platform
|
||||
#ifdef __STDC_WANT_SECURE_LIB__
|
||||
|
||||
// The same name define EOVERFLOW in errno.h on windows platform or android
|
||||
#if defined(__STDC_WANT_SECURE_LIB__) || defined(__ANDROID__) || defined(ANDROID)
|
||||
EOVERFLOW_,
|
||||
#else
|
||||
EOVERFLOW,
|
||||
|
|
|
@ -33,9 +33,13 @@
|
|||
#define JSON_INTEGER_IS_LONG_LONG 1
|
||||
|
||||
/* If locale.h and localeconv() are available, define to 1,
|
||||
otherwise to 0. */
|
||||
otherwise to 0. tips: android don't support localeconv()
|
||||
*/
|
||||
#if defined(__ANDROID__) || defined(ANDROID)
|
||||
#define JSON_HAVE_LOCALECONV 0
|
||||
#else
|
||||
#define JSON_HAVE_LOCALECONV 1
|
||||
|
||||
#endif
|
||||
/* If __atomic builtins are available they will be used to manage
|
||||
reference counts of json_t. */
|
||||
#define JSON_HAVE_ATOMIC_BUILTINS 1
|
||||
|
|
|
@ -35,7 +35,8 @@
|
|||
#if defined(__unix__) || defined(__APPLE__)
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef __APPLE__
|
||||
|
||||
#ifdef __APPLE__ || defined(__ANDROID__) || defined(ANDROID)
|
||||
typedef int RetType;
|
||||
typedef int LenType;
|
||||
#elif __GLIBC__
|
||||
|
@ -101,7 +102,7 @@ FILE *open_memstream(char **bufptr, size_t *lenptr) {
|
|||
*bufptr = NULL;
|
||||
*lenptr = 0;
|
||||
|
||||
#ifdef __APPLE__
|
||||
#ifdef __APPLE__ || defined(__ANDROID__) || defined(ANDROID)
|
||||
return funopen(b, NULL, write_to_buffer, NULL, close_buffer);
|
||||
#elif __GLIBC__
|
||||
static const cookie_io_functions_t vtable = {
|
||||
|
|
|
@ -21,15 +21,21 @@
|
|||
#include <stdio.h> // for Mingw readline
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifndef ANDROID
|
||||
#include <readline/readline.h>
|
||||
#endif
|
||||
|
||||
#include <complex.h>
|
||||
#include "util.h"
|
||||
#include "proxmark3.h" // PROXLOG
|
||||
#include "fileutils.h"
|
||||
#include "pm3_cmd.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
# include <direct.h> // _mkdir
|
||||
#endif
|
||||
|
||||
#include <time.h>
|
||||
#include "emojis.h"
|
||||
#include "emojis_alt.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue