From 4a68604f061bb0e37405d0e86843d97d33bfdf3c Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Tue, 12 Mar 2019 21:09:16 +0100 Subject: [PATCH] unify #if to #ifdef --- README.md | 5 +++++ src/dc_pgp.c | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7335182b..d9d45f5c 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,11 @@ standard. It is possible your system uses `/usr/local/lib/x86_64-linux-gnu` which should be auto-detected and just work as well. +The library is build using netpgp by default (shipped in /libs). +By adding `-Drpgp=true` to the build command, rpgp is used instead +(https://github.com/dignifiedquire/rpgp, +needs to be installed on the system or available as a lib) + ### Building without system-level dependencies diff --git a/src/dc_pgp.c b/src/dc_pgp.c index 6017e0de..fb04920c 100644 --- a/src/dc_pgp.c +++ b/src/dc_pgp.c @@ -27,7 +27,7 @@ one :-) */ #include "dc_hash.h" -#if DC_USE_RPGP +#ifdef DC_USE_RPGP void dc_pgp_init(void) { } @@ -56,7 +56,7 @@ void dc_pgp_exit(void) { } -#if DC_USE_RPGP +#ifdef DC_USE_RPGP void dc_pgp_rand_seed(dc_context_t* context, const void* buf, size_t bytes) {} @@ -962,7 +962,7 @@ cleanup: #endif // !DC_USE_RPGP -#if DC_USE_RPGP +#ifdef DC_USE_RPGP int dc_pgp_pk_decrypt( dc_context_t* context, const void* ctext, @@ -1184,7 +1184,7 @@ cleanup: ******************************************************************************/ -#if DC_USE_RPGP +#ifdef DC_USE_RPGP int dc_pgp_symm_encrypt(dc_context_t* context, const char* passphrase, const void* plain, size_t plain_bytes, @@ -1330,7 +1330,7 @@ cleanup: #endif /* !DC_USE_RPGP */ -#if DC_USE_RPGP +#ifdef DC_USE_RPGP int dc_pgp_symm_decrypt(dc_context_t* context, const char* passphrase,