src/platform_unix.h
author Volker Birk <vb@pep-project.org>
Tue, 26 Jul 2016 11:03:29 +0200
changeset 926 95247f30b919
parent 919 5d02ed589daa
child 948 2c689b7707a9
child 1033 67e21fb43c77
child 1125 89e75396c69a
permissions -rw-r--r--
fixing MacOS X build
vb@926
     1
#ifndef __APPLE__
vb@130
     2
#define _POSIX_C_SOURCE 200809L
vb@926
     3
#endif
vb@130
     4
vb@130
     5
#include <unistd.h>
vb@130
     6
#include <strings.h>
vb@130
     7
#include <sys/select.h>
vb@130
     8
vb@130
     9
#ifdef __cplusplus
vb@130
    10
extern "C" {
vb@130
    11
#endif
vb@130
    12
vb@1
    13
const char *unix_local_db(void);
Edouard@347
    14
vb@1
    15
const char *gpg_conf(void);
krista@763
    16
const char *gpg_agent_conf(void);
Edouard@175
    17
const char *gpg_home(void);
vb@130
    18
Edouard@338
    19
#ifdef ANDROID
Edouard@380
    20
Edouard@348
    21
char *stpncpy(char *, const char *, size_t);
Edouard@348
    22
char *stpcpy(char *, const char *);
roker@438
    23
roker@438
    24
// Beware: predictable pseudo random with static seed!
roker@438
    25
// Only the lowest 31 bits are filled randomly.
Edouard@338
    26
long int random(void);
roker@438
    27
Edouard@348
    28
const char *android_system_db(void);
Edouard@348
    29
#define SYSTEM_DB android_system_db()
Edouard@348
    30
#define LIBGPGME "libgpgme.so"
Edouard@380
    31
Edouard@380
    32
#elif __APPLE__
Edouard@380
    33
#include "TargetConditionals.h"
krista@919
    34
#include <string.h>
Edouard@380
    35
#if TARGET_OS_IPHONE
Edouard@380
    36
Edouard@380
    37
extern char* SystemDB;
Edouard@380
    38
#define SYSTEM_DB SystemDB
Edouard@380
    39
    
Edouard@380
    40
#endif
Edouard@338
    41
#endif
Edouard@338
    42
vb@926
    43
#if !defined(BSD) && !defined(__APPLE__)
krista@918
    44
size_t strlcpy(char* dst, const	char* src, size_t size);
krista@918
    45
size_t strlcat(char* dst, const	char* src, size_t size);
krista@918
    46
#endif
krista@918
    47
vb@130
    48
#ifdef __cplusplus
vb@130
    49
}
vb@130
    50
#endif