Repository: orc
Updated Branches:
  refs/heads/master aad3581bc -> eaadb0c6e


ORC-38. Fix compilation issues on RHEL 5.

Signed-off-by: Owen O'Malley <[email protected]>

Fixes apache/orc#16


Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/eaadb0c6
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/eaadb0c6
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/eaadb0c6

Branch: refs/heads/master
Commit: eaadb0c6ef7da37bbec7ec33a2690bb7b1c8b8c0
Parents: aad3581
Author: Owen O'Malley <[email protected]>
Authored: Wed Jan 20 12:19:44 2016 -0800
Committer: Owen O'Malley <[email protected]>
Committed: Wed Jan 20 13:59:34 2016 -0800

----------------------------------------------------------------------
 c++/test/CreateTestFiles.cc | 4 +++-
 c++/test/TestCompression.cc | 1 +
 tools/src/FileContents.cc   | 3 ++-
 tools/src/FileMemory.cc     | 3 ++-
 tools/src/FileMetadata.cc   | 9 +++++----
 5 files changed, 13 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/orc/blob/eaadb0c6/c++/test/CreateTestFiles.cc
----------------------------------------------------------------------
diff --git a/c++/test/CreateTestFiles.cc b/c++/test/CreateTestFiles.cc
index c64de98..8bd96b0 100644
--- a/c++/test/CreateTestFiles.cc
+++ b/c++/test/CreateTestFiles.cc
@@ -76,7 +76,9 @@ void writeVersion1999() {
   orc::proto::ColumnStatistics* stats = footer.add_statistics();
   stats->set_numberofvalues(0);
   stats->set_hasnull(false);
-  std::vector<uint> version{19, 99};
+  std::vector<uint> version;
+  version.push_back(19);
+  version.push_back(99);
   writeCustomOrcFile("version1999.orc", meta, footer, version, 1);
 }
 

http://git-wip-us.apache.org/repos/asf/orc/blob/eaadb0c6/c++/test/TestCompression.cc
----------------------------------------------------------------------
diff --git a/c++/test/TestCompression.cc b/c++/test/TestCompression.cc
index d47dd7a..4a79203 100644
--- a/c++/test/TestCompression.cc
+++ b/c++/test/TestCompression.cc
@@ -22,6 +22,7 @@
 #include "wrap/gtest-wrapper.h"
 
 #include <cstdio>
+#include <errno.h>
 #include <fstream>
 #include <iostream>
 #include <sstream>

http://git-wip-us.apache.org/repos/asf/orc/blob/eaadb0c6/tools/src/FileContents.cc
----------------------------------------------------------------------
diff --git a/tools/src/FileContents.cc b/tools/src/FileContents.cc
index ff7eb72..25805e0 100644
--- a/tools/src/FileContents.cc
+++ b/tools/src/FileContents.cc
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+#include "orc/orc-config.hh"
 #include "orc/ColumnPrinter.hh"
 
 #include "Exceptions.hh"
@@ -65,7 +66,7 @@ int main(int argc, char* argv[]) {
         value = std::strtok(param+COLUMNS_PREFIX.length(), "," );
         while (value) {
           cols.push_back(static_cast<uint64_t>(std::atoi(value)));
-          value = std::strtok(nullptr, "," );
+          value = std::strtok(ORC_NULLPTR, "," );
         }
       } else {
         filename = argv[i];

http://git-wip-us.apache.org/repos/asf/orc/blob/eaadb0c6/tools/src/FileMemory.cc
----------------------------------------------------------------------
diff --git a/tools/src/FileMemory.cc b/tools/src/FileMemory.cc
index 2bfd21a..de834fc 100644
--- a/tools/src/FileMemory.cc
+++ b/tools/src/FileMemory.cc
@@ -16,6 +16,7 @@
  * limitations under the License.
  */
 
+#include "orc/orc-config.hh"
 #include "orc/ColumnPrinter.hh"
 #include "Exceptions.hh"
 
@@ -80,7 +81,7 @@ int main(int argc, char* argv[]) {
       value = std::strtok(param+COLUMNS_PREFIX.length(), "," );
       while (value) {
         cols.push_back(static_cast<uint64_t>(std::atoi(value)));
-        value = std::strtok(nullptr, "," );
+        value = std::strtok(ORC_NULLPTR, "," );
       }
     } else if ( (param=strstr(argv[i], BATCH_PREFIX.c_str())) ) {
       batchSize = 
static_cast<uint32_t>(std::atoi(param+BATCH_PREFIX.length()));

http://git-wip-us.apache.org/repos/asf/orc/blob/eaadb0c6/tools/src/FileMetadata.cc
----------------------------------------------------------------------
diff --git a/tools/src/FileMetadata.cc b/tools/src/FileMetadata.cc
index 950e955..db72342 100644
--- a/tools/src/FileMetadata.cc
+++ b/tools/src/FileMetadata.cc
@@ -24,6 +24,7 @@
 #include <sstream>
 
 #include "orc/OrcFile.hh"
+#include "Adaptor.hh"
 
 void printStripeInformation(std::ostream& out,
                             uint64_t index,
@@ -134,15 +135,15 @@ void printMetadata(std::ostream & out, const 
char*filename, bool verbose) {
 
 int main(int argc, char* argv[]) {
   static struct option longOptions[] = {
-    {"help", no_argument, nullptr, 'h'},
-    {"verbose", no_argument, nullptr, 'v'},
-    {nullptr, 0, nullptr, 0}
+    {"help", no_argument, ORC_NULLPTR, 'h'},
+    {"verbose", no_argument, ORC_NULLPTR, 'v'},
+    {ORC_NULLPTR, 0, ORC_NULLPTR, 0}
   };
   bool helpFlag = false;
   bool verboseFlag = false;
   int opt;
   do {
-    opt = getopt_long(argc, argv, "hv", longOptions, nullptr);
+    opt = getopt_long(argc, argv, "hv", longOptions, ORC_NULLPTR);
     switch (opt) {
     case '?':
     case 'h':

Reply via email to