nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ald...@apache.org
Subject nifi-minifi-cpp git commit: MINIFI-286: Fix compilcation error when GCC version is greater than 4.9
Date Wed, 03 May 2017 17:50:22 GMT
Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master d1e3694c3 -> 78d527760


MINIFI-286: Fix compilcation error when GCC version is greater than 4.9

This closes #88.

Signed-off-by: Aldrin Piri <aldrin@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/78d52776
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/78d52776
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/78d52776

Branch: refs/heads/master
Commit: 78d527760bcbbe1e5e72a9f052fa149c8215da18
Parents: d1e3694
Author: jdye64 <jdye64@gmail.com>
Authored: Tue May 2 22:25:42 2017 +0000
Committer: Aldrin Piri <aldrin@apache.org>
Committed: Wed May 3 13:46:55 2017 -0400

----------------------------------------------------------------------
 libminifi/src/processors/GetFile.cpp | 24 ------------------------
 1 file changed, 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/78d52776/libminifi/src/processors/GetFile.cpp
----------------------------------------------------------------------
diff --git a/libminifi/src/processors/GetFile.cpp b/libminifi/src/processors/GetFile.cpp
index 2740793..dcabb5d 100644
--- a/libminifi/src/processors/GetFile.cpp
+++ b/libminifi/src/processors/GetFile.cpp
@@ -24,13 +24,7 @@
 #include <dirent.h>
 #include <limits.h>
 #include <unistd.h>
-#if  (__GNUC__ >= 4)
-#if (__GNUC_MINOR__ < 9)
 #include <regex.h>
-#else
-#include <regex>
-#endif
-#endif
 #include <vector>
 #include <queue>
 #include <map>
@@ -267,9 +261,6 @@ bool GetFile::acceptFile(std::string fullName, std::string name,
     if (request.keepSourceFile == false && access(fullName.c_str(), W_OK) != 0)
       return false;
 
-#ifdef __GNUC__
-#if (__GNUC__ >= 4)
-#if (__GNUC_MINOR__ < 9)
     regex_t regex;
     int ret = regcomp(&regex, request.fileFilter.c_str(), 0);
     if (ret)
@@ -278,22 +269,7 @@ bool GetFile::acceptFile(std::string fullName, std::string name,
     regfree(&regex);
     if (ret)
       return false;
-#else
-    try {
-      std::regex re(fileFilter);
 
-      if (!std::regex_match(name, re)) {
-        return false;
-      }
-    } catch (std::regex_error e) {
-      logger_->log_error("Invalid File Filter regex: %s.", e.what());
-      return false;
-    }
-#endif
-#endif
-#else
-    logger_->log_info("Cannot support regex filtering");
-#endif
     return true;
   }
 


Mime
View raw message