Short-term defined-out regnexec for non netpgp users because of android library issues (found elsewhere and frequently on the web.)
authorKrista Grothoff <krista@pep-project.org>
Tue, 30 Aug 2016 10:53:30 +0200
changeset 1095fe699b711ae6
parent 1055 9d0b3d675963
child 1096 396214c5cd9b
Short-term defined-out regnexec for non netpgp users because of android library issues (found elsewhere and frequently on the web.)
src/platform_unix.c
src/platform_unix.h
     1.1 --- a/src/platform_unix.c	Mon Aug 22 19:10:41 2016 +0200
     1.2 +++ b/src/platform_unix.c	Tue Aug 30 10:53:30 2016 +0200
     1.3 @@ -124,11 +124,13 @@
     1.4      return retval;
     1.5  }
     1.6  
     1.7 +#ifdef USE_NETPGP
     1.8  // FIXME: This may cause problems - this is a quick compatibility fix for netpgp code
     1.9  int regnexec(const regex_t* preg, const char* string,
    1.10               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags) {
    1.11      return regexec(preg, string, nmatch, pmatch, eflags);
    1.12  }
    1.13 +#endif
    1.14  
    1.15  #endif
    1.16  
     2.1 --- a/src/platform_unix.h	Mon Aug 22 19:10:41 2016 +0200
     2.2 +++ b/src/platform_unix.h	Tue Aug 30 10:53:30 2016 +0200
     2.3 @@ -44,10 +44,17 @@
     2.4  #if !defined(BSD) && !defined(__APPLE__)
     2.5  size_t strlcpy(char* dst, const	char* src, size_t size);
     2.6  size_t strlcat(char* dst, const	char* src, size_t size);
     2.7 +
     2.8 +// N.B. This is ifdef'd out because NDK users sometimes have trouble finding regex functions in
     2.9 +//      the library in spite of the inclusion of regex.h - this is a FIXME, but since iOS is
    2.10 +//      *currently* the only netpgp user, we will ifdef this so that we don't block Android.
    2.11 +#ifdef USE_NETPGP
    2.12  int regnexec(const regex_t* preg, const char* string,
    2.13               size_t len, size_t nmatch, regmatch_t pmatch[], int eflags);
    2.14  #endif
    2.15  
    2.16 +#endif
    2.17 +
    2.18  #ifdef __cplusplus
    2.19  }
    2.20  #endif