src/platform_unix.h
author Krista Grothoff <krista@pep-project.org>
Fri, 24 Jun 2016 13:11:18 +0200
changeset 763 9c0e286f0a23
parent 438 106b9765559d
child 918 45c80cc4c2ed
permissions -rw-r--r--
Added gpa-agent.conf defaults for passphrase timeouts.
vb@130
     1
#define _POSIX_C_SOURCE 200809L
vb@130
     2
vb@130
     3
#include <unistd.h>
vb@130
     4
#include <strings.h>
vb@130
     5
#include <sys/select.h>
vb@130
     6
vb@130
     7
#ifdef __cplusplus
vb@130
     8
extern "C" {
vb@130
     9
#endif
vb@130
    10
vb@1
    11
const char *unix_local_db(void);
Edouard@347
    12
vb@1
    13
const char *gpg_conf(void);
krista@763
    14
const char *gpg_agent_conf(void);
Edouard@175
    15
const char *gpg_home(void);
vb@130
    16
Edouard@338
    17
#ifdef ANDROID
Edouard@380
    18
Edouard@348
    19
char *stpncpy(char *, const char *, size_t);
Edouard@348
    20
char *stpcpy(char *, const char *);
roker@438
    21
roker@438
    22
// Beware: predictable pseudo random with static seed!
roker@438
    23
// Only the lowest 31 bits are filled randomly.
Edouard@338
    24
long int random(void);
roker@438
    25
Edouard@348
    26
const char *android_system_db(void);
Edouard@348
    27
#define SYSTEM_DB android_system_db()
Edouard@348
    28
#define LIBGPGME "libgpgme.so"
Edouard@380
    29
Edouard@380
    30
#elif __APPLE__
Edouard@380
    31
#include "TargetConditionals.h"
Edouard@380
    32
#if TARGET_OS_IPHONE
Edouard@380
    33
Edouard@380
    34
extern char* SystemDB;
Edouard@380
    35
#define SYSTEM_DB SystemDB
Edouard@380
    36
    
Edouard@380
    37
#endif
Edouard@338
    38
#endif
Edouard@338
    39
vb@130
    40
#ifdef __cplusplus
vb@130
    41
}
vb@130
    42
#endif