Stowing changes ENGINE-73
authorKrista Grothoff <krista@pep-project.org>
Thu, 18 Aug 2016 16:12:44 +0200
branchENGINE-73
changeset 103367e21fb43c77
parent 1032 b4004d33c2a2
child 1035 ddbde59a63fa
Stowing changes
src/Makefile
src/pgp_netpgp.c
src/pgp_netpgp.h
src/platform_unix.c
src/platform_unix.h
     1.1 --- a/src/Makefile	Thu Aug 18 15:01:37 2016 +0200
     1.2 +++ b/src/Makefile	Thu Aug 18 16:12:44 2016 +0200
     1.3 @@ -1,6 +1,6 @@
     1.4  include ../Makefile.conf
     1.5  
     1.6 -OPENPGP?=GPG
     1.7 +OPENPGP?=NETPGP
     1.8  
     1.9  ifeq ($(BUILD_ON),Darwin)
    1.10  ifeq ($(BUILD_FOR),Darwin)
     2.1 --- a/src/pgp_netpgp.c	Thu Aug 18 15:01:37 2016 +0200
     2.2 +++ b/src/pgp_netpgp.c	Thu Aug 18 16:12:44 2016 +0200
     2.3 @@ -1169,7 +1169,7 @@
     2.4          return PEP_OUT_OF_MEMORY;
     2.5      } else { 
     2.6  
     2.7 -        *keylist = stringlist_add(*keylist, newfprstr);
     2.8 +        stringlist_add(*keylist, newfprstr);
     2.9          free(newfprstr);
    2.10          if (*keylist == NULL) {
    2.11              return PEP_OUT_OF_MEMORY;
    2.12 @@ -1180,7 +1180,7 @@
    2.13  
    2.14  static PEP_STATUS add_keyinfo_to_stringpair_list(void* arg, pgp_key_t *key) {
    2.15      stringpair_list_t** keyinfo_list = (stringpair_list_t**)arg;
    2.16 -    stringpair_t pair = NULL;
    2.17 +    stringpair_t* pair = NULL;
    2.18      char* id_fpr = NULL;
    2.19      char* primary_userid = (char*)pgp_key_get_primary_userid(key);
    2.20       
     3.1 --- a/src/pgp_netpgp.h	Thu Aug 18 15:01:37 2016 +0200
     3.2 +++ b/src/pgp_netpgp.h	Thu Aug 18 16:12:44 2016 +0200
     3.3 @@ -31,7 +31,7 @@
     3.4      );
     3.5  
     3.6  PEP_STATUS pgp_list_keyinfo(
     3.7 -    PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list,
     3.8 +    PEP_SESSION session, const char* pattern, stringpair_list_t** keyinfo_list
     3.9      );
    3.10  
    3.11  PEP_STATUS pgp_generate_keypair(
     4.1 --- a/src/platform_unix.c	Thu Aug 18 15:01:37 2016 +0200
     4.2 +++ b/src/platform_unix.c	Thu Aug 18 16:12:44 2016 +0200
     4.3 @@ -6,6 +6,7 @@
     4.4  #include <sys/stat.h>
     4.5  #include <sys/types.h>
     4.6  #include <fcntl.h>
     4.7 +#include <regex.h>
     4.8  
     4.9  #include "platform_unix.h"
    4.10  
    4.11 @@ -123,6 +124,12 @@
    4.12      return retval;
    4.13  }
    4.14  
    4.15 +// FIXME: This may cause problems - this is a quick compatibility fix for netpgp code
    4.16 +int regnexec(const regex_t* preg, const char* string,
    4.17 +             size_t len, size_t nmatch, regmatch_t pmatch[], int eflags) {
    4.18 +    return regexec(preg, string, nmatch, pmatch, eflags);
    4.19 +}
    4.20 +
    4.21  #endif
    4.22  
    4.23  const char *unix_local_db(void)
     5.1 --- a/src/platform_unix.h	Thu Aug 18 15:01:37 2016 +0200
     5.2 +++ b/src/platform_unix.h	Thu Aug 18 16:12:44 2016 +0200
     5.3 @@ -5,6 +5,7 @@
     5.4  #include <unistd.h>
     5.5  #include <strings.h>
     5.6  #include <sys/select.h>
     5.7 +#include <regex.h>
     5.8  
     5.9  #ifdef __cplusplus
    5.10  extern "C" {
    5.11 @@ -43,6 +44,8 @@
    5.12  #if !defined(BSD) && !defined(__APPLE__)
    5.13  size_t strlcpy(char* dst, const	char* src, size_t size);
    5.14  size_t strlcat(char* dst, const	char* src, size_t size);
    5.15 +int regnexec(const regex_t* preg, const char* string,
    5.16 +             size_t len, size_t nmatch, regmatch_t pmatch[], int eflags);
    5.17  #endif
    5.18  
    5.19  #ifdef __cplusplus