You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/03/21 17:43:18 UTC

[1/2] incubator-trafodion git commit: [TRAFODION-1868] Compatibility with gcc 4.8 , part 3, mornitor, odbc changes

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 4ba8d7d33 -> 760ba887a


[TRAFODION-1868] Compatibility with gcc 4.8 , part 3, mornitor, odbc changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/45a21c6a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/45a21c6a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/45a21c6a

Branch: refs/heads/master
Commit: 45a21c6a4621b46c7d3437e9ae452102a0b88d3b
Parents: 3687c5c
Author: Liu Ming <mi...@esgyn.cn>
Authored: Fri Mar 18 15:35:23 2016 +0000
Committer: Liu Ming <mi...@esgyn.cn>
Committed: Fri Mar 18 15:35:23 2016 +0000

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/nsksrvr/Makefile          | 2 ++
 core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp | 7 ++++++-
 core/sqf/monitor/linux/config.cxx                 | 1 +
 core/sqf/monitor/linux/makefile                   | 3 ++-
 core/sqf/monitor/linux/monitor.cxx                | 3 +++
 core/sqf/src/seabed/src/sautil.cpp                | 5 -----
 core/sqf/src/seabed/src/stream.cpp                | 2 --
 7 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/conn/odbc/src/odbc/nsksrvr/Makefile
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvr/Makefile b/core/conn/odbc/src/odbc/nsksrvr/Makefile
index 2952f9d..36404e6 100644
--- a/core/conn/odbc/src/odbc/nsksrvr/Makefile
+++ b/core/conn/odbc/src/odbc/nsksrvr/Makefile
@@ -130,6 +130,8 @@ LOC_JSIG=$(JAVA_HOME)/jre/lib/i386/server
 endif
 
 
+#gcc 4.8 need explicit enable this flag, otherwise ld must explicitly link with all so using '-l'
+GCCMODE        += -Xlinker --copy-dt-needed-entries
 # Produce mxosrvr
 $(BINEXPDIR)/mxosrvr: $(OBJS) $(LIBEXPDIR)/libzookeeper_mt.so
 	$(CXX) $(GCCMODE) -o $@ $(DBG_FLGS)  -L$(LIBEXPDIR) -D_SQ64 -L$(LOC_JSIG) $(EARLY_LIBS) $(COMMON_LIBS) $(DBT_LIBS) -lzookeeper_mt $(HADOOP_LIBS) $(OBJS) -lz

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp
----------------------------------------------------------------------
diff --git a/core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp b/core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp
index ed5ce72..e04682e 100644
--- a/core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp
+++ b/core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp
@@ -129,7 +129,12 @@ SRVR_STMT_HDL::SRVR_STMT_HDL()
 	IRD = NULL;
 	outputDataValue._length = 0;
 	outputDataValue._buffer = NULL;
-	outputDataValue.pad_to_offset_8_ = {'\0', '\0', '\0', '\0'};
+        //outputDataValue.pad_to_offset_8_ = {'\0', '\0', '\0', '\0'};
+        //use trafodional way to initialze array, above is c++11 in gcc 4.8
+        //for gcc 4.4 backward compatibilty, Trafodion now is using c++0x , gcc 4.4 cannot support c++11 mode
+        //once tested with -std=c++11, may recover this coding style
+        memset( outputDataValue.pad_to_offset_8_ , 0, sizeof(outputDataValue.pad_to_offset_8_) );
+
 	inputDataValue._length = 0;
 	inputDataValue._buffer = NULL;
 	delayedOutputDataValue._length = 0;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/sqf/monitor/linux/config.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/config.cxx b/core/sqf/monitor/linux/config.cxx
index aaf4e0b..dc78ba2 100755
--- a/core/sqf/monitor/linux/config.cxx
+++ b/core/sqf/monitor/linux/config.cxx
@@ -26,6 +26,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <iostream>
+#include <unistd.h>
 
 using namespace std;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/sqf/monitor/linux/makefile
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/makefile b/core/sqf/monitor/linux/makefile
index 8ac998f..ef9316b 100755
--- a/core/sqf/monitor/linux/makefile
+++ b/core/sqf/monitor/linux/makefile
@@ -48,7 +48,7 @@ FLAGS+= -UNDEBUG
 FLAGS+= -Wall -Wextra
 
 # Flags for use in compiling Seabed trace modules
-SBFLAGS = -Wall -Wextra -pedantic -Werror  -Wno-long-long $(DBG_FLGS) $(OPTIM_FLGS)
+SBFLAGS = -Wall -Wextra -pedantic -Werror  -Wno-long-long $(DBG_FLGS) $(OPTIM_FLGS) -Xlinker --copy-dt-needed-entries
 SBDIR = ../../src/seabed/src
 
 COMMONLOGGERDIR = ../../commonLogger
@@ -84,6 +84,7 @@ INCLUDES+= -I$(LOG4CXX_INC_DIR)/log4cxx
 
 LIBS+=  -lsqlite3
 LIBS+=  -llog4cxx
+LIBS+=  -ldl
 
 ifeq ($(USE_TESTPOINTS),1)
    FLAGS+= -DUSE_TESTPOINTS

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/sqf/monitor/linux/monitor.cxx
----------------------------------------------------------------------
diff --git a/core/sqf/monitor/linux/monitor.cxx b/core/sqf/monitor/linux/monitor.cxx
index 48eadaa..31f7928 100755
--- a/core/sqf/monitor/linux/monitor.cxx
+++ b/core/sqf/monitor/linux/monitor.cxx
@@ -35,6 +35,9 @@ using namespace std;
 #include <unistd.h>
 #include <malloc.h>
 #include <sys/ipc.h>
+#include <sys/time.h>
+#include <sys/resource.h> //add for getrlimit, strange centos6/gcc4.4 don't need this
+
 //#include <sys/stat.h>
 #include "monlogging.h"
 #include "monprof.h"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/sqf/src/seabed/src/sautil.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/seabed/src/sautil.cpp b/core/sqf/src/seabed/src/sautil.cpp
index 30b60da..683bc0e 100644
--- a/core/sqf/src/seabed/src/sautil.cpp
+++ b/core/sqf/src/seabed/src/sautil.cpp
@@ -95,11 +95,6 @@ void SB_SA_Util_assert_fun_com(const char *pp_exp,
                                const char *pp_file,
                                unsigned    pv_line,
                                const char *pp_fun) {
-    pid_t lv_pid;
-    pid_t lv_tid;
-
-    lv_pid = getpid();
-    lv_tid = sb_sa_util_gettid();
     gv_sb_sa_util_save_assert.iv_errno = errno;
     gv_sb_sa_util_save_assert.iv_line = pv_line;
     gv_sb_sa_util_save_assert.iv_lhs = pv_lhs;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/45a21c6a/core/sqf/src/seabed/src/stream.cpp
----------------------------------------------------------------------
diff --git a/core/sqf/src/seabed/src/stream.cpp b/core/sqf/src/seabed/src/stream.cpp
index 90c5e9c..fccbccd 100644
--- a/core/sqf/src/seabed/src/stream.cpp
+++ b/core/sqf/src/seabed/src/stream.cpp
@@ -353,11 +353,9 @@ void SB_Trans::Trans_Stream::checksum_recv_check(Rd_Type     *pp_rd,
     int   lv_chk;
     int   lv_ctrl_len;
     int   lv_data_len;
-    int   lv_data_off;
     int   lv_inx;
 
     lv_chk = -1;
-    lv_data_off = 0;
     pv_client = pv_client; // touch
     lp_ctrl = pp_rd->ip_ctrl;
     lv_ctrl_len = pp_rd->iv_ctrl_len;


[2/2] incubator-trafodion git commit: Merge [TRAFODION-1868] PR 394 gcc 4.8 compatibility, part 3

Posted by db...@apache.org.
Merge [TRAFODION-1868] PR 394 gcc 4.8 compatibility, part 3


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/760ba887
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/760ba887
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/760ba887

Branch: refs/heads/master
Commit: 760ba887a7bfaba27c4b5bfac4290a1433bcc280
Parents: 4ba8d7d 45a21c6
Author: Dave Birdsall <db...@apache.org>
Authored: Mon Mar 21 16:42:31 2016 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Mon Mar 21 16:42:31 2016 +0000

----------------------------------------------------------------------
 core/conn/odbc/src/odbc/nsksrvr/Makefile          | 2 ++
 core/conn/odbc/src/odbc/nsksrvrcore/csrvrstmt.cpp | 7 ++++++-
 core/sqf/monitor/linux/config.cxx                 | 1 +
 core/sqf/monitor/linux/makefile                   | 3 ++-
 core/sqf/monitor/linux/monitor.cxx                | 3 +++
 core/sqf/src/seabed/src/sautil.cpp                | 5 -----
 core/sqf/src/seabed/src/stream.cpp                | 2 --
 7 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------