fixed GH #1581: Cannot find 'pcre.h' when using POCO_UNBUNDLED, a non-system PCRE, and CMake

Conflicts:
	Foundation/include/Poco/RegularExpression.h
	Foundation/src/RegularExpression.cpp
This commit is contained in:
Guenter Obiltschnig
2017-02-11 12:03:37 +01:00
parent 0fefd7d03a
commit 8557dc4469
2 changed files with 11 additions and 23 deletions

View File

@@ -28,20 +28,6 @@
#include <map>
#ifdef POCO_UNBUNDLED
#include <pcre.h>
#else
//
// Copy these definitions from pcre.h
// to avoid pulling in the entire header file
//
extern "C"
{
typedef struct real_pcre8_or_16 pcre;
struct pcre_extra;
}
#endif
namespace Poco {
@@ -214,8 +200,10 @@ protected:
std::string::size_type substOne(std::string& subject, std::string::size_type offset, const std::string& replacement, int options) const;
private:
pcre* _pcre;
pcre_extra* _extra;
// Note: to avoid a dependency on the pcre.h header the following are
// declared as void* and casted to the correct type in the implementation file.
void* _pcre; // Actual type is pcre*
void* _extra; // Actual type is struct pcre_extra*
GroupMap _groups;