You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by an...@apache.org on 2017/10/12 19:59:49 UTC

[1/2] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup: Phase 5. Cleanup of Platform.h

Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 6a00d4d36 -> 3fb2f9eb5


TRAFODION-2731 CodeCleanup: Phase 5. Cleanup of Platform.h

Removal of unneeded/unused entries from Platform.h and
their usage from other files.

Removal of some other defines that are no longer used. There
might be a compilation error if an obsolete define is being used.
If that happens, those defines need to be removed.


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

Branch: refs/heads/master
Commit: d496f359b0e4f293892c10479059c6db6bf3474d
Parents: 30e231c
Author: Anoop Sharma <an...@esgyn.com>
Authored: Wed Oct 11 20:05:32 2017 +0000
Committer: Anoop Sharma <an...@esgyn.com>
Committed: Wed Oct 11 20:05:32 2017 +0000

----------------------------------------------------------------------
 core/conn/jdbc_type2/native/Debug.cpp     |  64 +++----
 core/sql/bin/SqlEsp_templ.cpp             |  85 ---------
 core/sql/bin/Sqlci_templ.cpp              | 132 --------------
 core/sql/bin/arkcmp.cpp                   |   3 -
 core/sql/bin/ex_esp_main.cpp              |   7 -
 core/sql/cli/sqlcli.h                     |   3 -
 core/sql/common/Ipc.cpp                   |  70 ++------
 core/sql/common/Ipc.h                     |  15 --
 core/sql/common/IpcGuardian.cpp           |   3 -
 core/sql/common/NAIpc.cpp                 |   2 -
 core/sql/common/Platform.h                | 229 +++----------------------
 core/sql/common/arkcmp_proc.cpp           |   3 -
 core/sql/common/charinfo.cpp              |  11 +-
 core/sql/common/ipcmsg.cpp                |   3 -
 core/sql/common/str.cpp                   |  12 +-
 core/sql/executor/BufferList.cpp          |  18 +-
 core/sql/executor/ExDupSqlBuffer.cpp      |  13 --
 core/sql/executor/SwapSpace.cpp           |  12 --
 core/sql/executor/ex_exe_stmt_globals.cpp |   8 -
 core/sql/executor/ex_frag_rt.cpp          |   3 -
 core/sql/executor/ex_mj.cpp               |  35 ----
 core/sql/nskgmake/arkcmp/Makefile         |   3 +-
 core/sql/nskgmake/arkcmp_dll/Makefile     |   5 +-
 core/sql/parser/sqlparser.y               |  20 +--
 core/sql/parser/ulexer.h                  |   5 -
 core/sql/sqlci/sqlci_lex.ll               |   8 -
 core/sql/udrserv/UdrStreams.cpp           |   2 -
 27 files changed, 87 insertions(+), 687 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/conn/jdbc_type2/native/Debug.cpp
----------------------------------------------------------------------
diff --git a/core/conn/jdbc_type2/native/Debug.cpp b/core/conn/jdbc_type2/native/Debug.cpp
index f2c8539..54f2f57 100644
--- a/core/conn/jdbc_type2/native/Debug.cpp
+++ b/core/conn/jdbc_type2/native/Debug.cpp
@@ -1938,7 +1938,7 @@ const char *DebugSqlWhatDescStr(long what_desc)
 
 #endif /* _DEBUG */
 
-SQLCLI_LIB_FUNC long CliDebug_SetStmtAttr(SQLSTMT_ID *statement_id, long attrName,
+long CliDebug_SetStmtAttr(SQLSTMT_ID *statement_id, long attrName,
 										  long numeric_value, char *string_value,
 										  const char *filename, unsigned long line)
 {
@@ -1953,7 +1953,7 @@ SQLCLI_LIB_FUNC long CliDebug_SetStmtAttr(SQLSTMT_ID *statement_id, long attrNam
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_SetDescItem(SQLDESC_ID *sql_descriptor, long entry,
+long CliDebug_SetDescItem(SQLDESC_ID *sql_descriptor, long entry,
 										  long what_to_set, long numeric_value, char * string_value,
 										  const char *filename, unsigned long line)
 {
@@ -1969,7 +1969,7 @@ SQLCLI_LIB_FUNC long CliDebug_SetDescItem(SQLDESC_ID *sql_descriptor, long entry
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_SETROWSETDESCPOINTERS(SQLDESC_ID * desc_id, long rowset_size, int *rowset_status_ptr,
+long CliDebug_SETROWSETDESCPOINTERS(SQLDESC_ID * desc_id, long rowset_size, int *rowset_status_ptr,
 													long starting_entry, long num_quadruple_fields,
 													struct SQLCLI_QUAD_FIELDS quad_fields[],
 													const char *filename, unsigned long line)
@@ -1987,7 +1987,7 @@ SQLCLI_LIB_FUNC long CliDebug_SETROWSETDESCPOINTERS(SQLDESC_ID * desc_id, long r
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetDescItems2(SQLDESC_ID * sql_descriptor,
+long CliDebug_GetDescItems2(SQLDESC_ID * sql_descriptor,
 											long no_of_desc_items, SQLDESC_ITEM desc_items[],
 											const char *filename, unsigned long line)
 {
@@ -2001,7 +2001,7 @@ SQLCLI_LIB_FUNC long CliDebug_GetDescItems2(SQLDESC_ID * sql_descriptor,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_SetCursorName(SQLSTMT_ID * statement_id, SQLSTMT_ID * cursor_name,
+long CliDebug_SetCursorName(SQLSTMT_ID * statement_id, SQLSTMT_ID * cursor_name,
 											const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_SetCursorName",("statement_id=0x%08x, cursor_name=0x%08x)",
@@ -2013,7 +2013,7 @@ SQLCLI_LIB_FUNC long CliDebug_SetCursorName(SQLSTMT_ID * statement_id, SQLSTMT_I
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_ExecFetch(SQLSTMT_ID * statement_id,
+long CliDebug_ExecFetch(SQLSTMT_ID * statement_id,
 										SQLDESC_ID * input_descriptor, long num_ptr_pairs,
 										const char *filename, unsigned long line)
 {
@@ -2027,7 +2027,7 @@ SQLCLI_LIB_FUNC long CliDebug_ExecFetch(SQLSTMT_ID * statement_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_CloseStmt(SQLSTMT_ID *statement_id,
+long CliDebug_CloseStmt(SQLSTMT_ID *statement_id,
 										const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_CloseStmt",("statement_id=0x%08x",
@@ -2038,7 +2038,7 @@ SQLCLI_LIB_FUNC long CliDebug_CloseStmt(SQLSTMT_ID *statement_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetDiagnosticsCondInfo2(long what_to_get, long conditionNum,
+long CliDebug_GetDiagnosticsCondInfo2(long what_to_get, long conditionNum,
 													  int *numeric_value, char * string_value,
 													  long max_string_len, int *len_of_item,
 													  const char *filename, unsigned long line)
@@ -2063,7 +2063,7 @@ SQLCLI_LIB_FUNC long CliDebug_GetDiagnosticsCondInfo2(long what_to_get, long con
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_SwitchContext(SQLCTX_HANDLE context_handle, SQLCTX_HANDLE * prev_context_handle,
+long CliDebug_SwitchContext(SQLCTX_HANDLE context_handle, SQLCTX_HANDLE * prev_context_handle,
 										    const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_SwitchContext",("context_handle=%ld, prev_context_handle=0x%08x",
@@ -2079,7 +2079,7 @@ SQLCLI_LIB_FUNC long CliDebug_SwitchContext(SQLCTX_HANDLE context_handle, SQLCTX
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_DeleteContext(SQLCTX_HANDLE contextHandle,
+long CliDebug_DeleteContext(SQLCTX_HANDLE contextHandle,
 										    const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_DeleteContext",("contextHandle=%ld",
@@ -2090,7 +2090,7 @@ SQLCLI_LIB_FUNC long CliDebug_DeleteContext(SQLCTX_HANDLE contextHandle,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_CreateContext(SQLCTX_HANDLE *context_handle,
+long CliDebug_CreateContext(SQLCTX_HANDLE *context_handle,
 											char* sqlAuthId, long suppressAutoXactStart,
 										    const char *filename, unsigned long line)
 {
@@ -2106,7 +2106,7 @@ SQLCLI_LIB_FUNC long CliDebug_CreateContext(SQLCTX_HANDLE *context_handle,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_CurrentContext(SQLCTX_HANDLE *contextHandle,
+long CliDebug_CurrentContext(SQLCTX_HANDLE *contextHandle,
 						const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_CurrentContext",("contextHandle=0x%08x",
@@ -2117,7 +2117,7 @@ SQLCLI_LIB_FUNC long CliDebug_CurrentContext(SQLCTX_HANDLE *contextHandle,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_ClearDiagnostics (SQLSTMT_ID *statement_id,
+long CliDebug_ClearDiagnostics (SQLSTMT_ID *statement_id,
 											    const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_ClearDiagnostics",("statement_id=0x%08x",
@@ -2128,7 +2128,7 @@ SQLCLI_LIB_FUNC long CliDebug_ClearDiagnostics (SQLSTMT_ID *statement_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetDiagnosticsStmtInfo2(SQLSTMT_ID *statement_id, long what_to_get, void *numeric_value, char *string_value,
+long CliDebug_GetDiagnosticsStmtInfo2(SQLSTMT_ID *statement_id, long what_to_get, void *numeric_value, char *string_value,
 													  long max_string_len, int *len_of_item,
 													  const char *filename, unsigned long line)
 {
@@ -2149,7 +2149,7 @@ SQLCLI_LIB_FUNC long CliDebug_GetDiagnosticsStmtInfo2(SQLSTMT_ID *statement_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_DeallocDesc(SQLDESC_ID *desc_id,
+long CliDebug_DeallocDesc(SQLDESC_ID *desc_id,
 										  const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_DeallocDesc",("desc_id=0x%08x",
@@ -2160,7 +2160,7 @@ SQLCLI_LIB_FUNC long CliDebug_DeallocDesc(SQLDESC_ID *desc_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_DeallocStmt(SQLSTMT_ID *statement_id,
+long CliDebug_DeallocStmt(SQLSTMT_ID *statement_id,
 										  const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_DeallocStmt",("statement_id=0x%08x",
@@ -2170,7 +2170,7 @@ SQLCLI_LIB_FUNC long CliDebug_DeallocStmt(SQLSTMT_ID *statement_id,
 	long rc = SQL_EXEC_DeallocStmt(statement_id);
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
-SQLCLI_LIB_FUNC long CliDebug_ExecDirect(SQLSTMT_ID *statement_id, SQLDESC_ID *sql_source,
+long CliDebug_ExecDirect(SQLSTMT_ID *statement_id, SQLDESC_ID *sql_source,
 										 SQLDESC_ID *input_descriptor, long num_ptr_pairs,
 										 const char *filename, unsigned long line)
 {
@@ -2185,7 +2185,7 @@ SQLCLI_LIB_FUNC long CliDebug_ExecDirect(SQLSTMT_ID *statement_id, SQLDESC_ID *s
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_Exec(SQLSTMT_ID *statement_id, SQLDESC_ID *input_descriptor,long num_ptr_pairs,
+long CliDebug_Exec(SQLSTMT_ID *statement_id, SQLDESC_ID *input_descriptor,long num_ptr_pairs,
 								   const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_Exec",("statement_id=0x%08x, input_descriptor=0x%08x, num_ptr_pairs=%ld",
@@ -2199,7 +2199,7 @@ SQLCLI_LIB_FUNC long CliDebug_Exec(SQLSTMT_ID *statement_id, SQLDESC_ID *input_d
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_Prepare(SQLSTMT_ID *statement_id, SQLDESC_ID *sql_source,
+long CliDebug_Prepare(SQLSTMT_ID *statement_id, SQLDESC_ID *sql_source,
 									  const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_Prepare",("statement_id=0x%08x,sql_source=0x%08x",
@@ -2211,7 +2211,7 @@ SQLCLI_LIB_FUNC long CliDebug_Prepare(SQLSTMT_ID *statement_id, SQLDESC_ID *sql_
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_DescribeStmt(SQLSTMT_ID *statement_id,
+long CliDebug_DescribeStmt(SQLSTMT_ID *statement_id,
 										   SQLDESC_ID *input_descriptor, SQLDESC_ID *output_descriptor,
 										   const char *filename, unsigned long line)
 {
@@ -2225,7 +2225,7 @@ SQLCLI_LIB_FUNC long CliDebug_DescribeStmt(SQLSTMT_ID *statement_id,
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetDescEntryCount(SQLDESC_ID *sql_descriptor, int *num_entries,
+long CliDebug_GetDescEntryCount(SQLDESC_ID *sql_descriptor, int *num_entries,
 												const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_GetDescEntryCount",("sql_descriptor=0x%08x, num_entries=0x%08x",
@@ -2239,7 +2239,7 @@ SQLCLI_LIB_FUNC long CliDebug_GetDescEntryCount(SQLDESC_ID *sql_descriptor, int
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_Fetch(SQLSTMT_ID *statement_id, SQLDESC_ID *output_descriptor, long num_ptr_pairs,
+long CliDebug_Fetch(SQLSTMT_ID *statement_id, SQLDESC_ID *output_descriptor, long num_ptr_pairs,
 									const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_Fetch",("statement_id=0x%08x, output_descriptor=0x%08x, num_ptr_pairs=%ld",
@@ -2257,7 +2257,7 @@ SQLCLI_LIB_FUNC long CliDebug_Fetch(SQLSTMT_ID *statement_id, SQLDESC_ID *output
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetDescItem(SQLDESC_ID *sql_descriptor, long entry,
+long CliDebug_GetDescItem(SQLDESC_ID *sql_descriptor, long entry,
 										  long what_to_get, int *numeric_value, char *string_value, long max_string_len,
 										  int *len_of_item, long start_from_offset,
 										  const char *filename, unsigned long line)
@@ -2283,7 +2283,7 @@ SQLCLI_LIB_FUNC long CliDebug_GetDescItem(SQLDESC_ID *sql_descriptor, long entry
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_Cancel(SQLSTMT_ID *statement_id,
+long CliDebug_Cancel(SQLSTMT_ID *statement_id,
 									 const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_Cancel",("statement_id=0x%08x",
@@ -2293,7 +2293,7 @@ SQLCLI_LIB_FUNC long CliDebug_Cancel(SQLSTMT_ID *statement_id,
 	long rc = SQL_EXEC_Cancel(statement_id);
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
-SQLCLI_LIB_FUNC long CliDebug_AllocStmt(SQLSTMT_ID * new_statement_id, SQLSTMT_ID *cloned_statement,
+long CliDebug_AllocStmt(SQLSTMT_ID * new_statement_id, SQLSTMT_ID *cloned_statement,
 										const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_AllocStmt",("new_statement_id=0x%08x, cloned_statement=0x%08x",
@@ -2305,7 +2305,7 @@ SQLCLI_LIB_FUNC long CliDebug_AllocStmt(SQLSTMT_ID * new_statement_id, SQLSTMT_I
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_ResDescName(SQLDESC_ID *statement_id, SQLSTMT_ID *from_statement, long what_desc,
+long CliDebug_ResDescName(SQLDESC_ID *statement_id, SQLSTMT_ID *from_statement, long what_desc,
 										  const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_ResDescName",("statement_id=0x%08x, from_statement=0x%08x, what_desc=%s",
@@ -2318,7 +2318,7 @@ SQLCLI_LIB_FUNC long CliDebug_ResDescName(SQLDESC_ID *statement_id, SQLSTMT_ID *
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_AllocDesc(SQLDESC_ID *desc_id, SQLDESC_ID *input_descriptor,
+long CliDebug_AllocDesc(SQLDESC_ID *desc_id, SQLDESC_ID *input_descriptor,
 										const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_AllocDesc",("desc_id=0x%08x, input_descriptor=0x%08x",
@@ -2330,7 +2330,7 @@ SQLCLI_LIB_FUNC long CliDebug_AllocDesc(SQLDESC_ID *desc_id, SQLDESC_ID *input_d
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_AllocStmtForRS (SQLSTMT_ID *callStmtId, long resultSetIndex, 
+long CliDebug_AllocStmtForRS (SQLSTMT_ID *callStmtId, long resultSetIndex, 
 											  SQLSTMT_ID *resultSetStmtId, const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelStmt,"SQL_EXEC_AllocStmtForRS",
@@ -2348,7 +2348,7 @@ SQLCLI_LIB_FUNC long CliDebug_AllocStmtForRS (SQLSTMT_ID *callStmtId, long resul
 
 }
 
-SQLCLI_LIB_FUNC long CliDebug_AssocFileNumber(SQLSTMT_ID *statement_id, short file_number,
+long CliDebug_AssocFileNumber(SQLSTMT_ID *statement_id, short file_number,
 											  const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_AssocFileNumber",("statement_id=0x%08x, file_number=%d",
@@ -2360,7 +2360,7 @@ SQLCLI_LIB_FUNC long CliDebug_AssocFileNumber(SQLSTMT_ID *statement_id, short fi
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_CLI_VERSION(const char *filename, unsigned long line)
+long CliDebug_CLI_VERSION(const char *filename, unsigned long line)
 {
 	FUNCTION_ENTRY_LEVEL_LOC(org_apache_trafodion_jdbc_t2_JdbcDebug_debugLevelCLI,"SQL_EXEC_CLI_VERSION",(NULL),
 		filename, line);
@@ -2369,7 +2369,7 @@ SQLCLI_LIB_FUNC long CliDebug_CLI_VERSION(const char *filename, unsigned long li
 	FUNCTION_RETURN_NUMERIC_LOC(rc,(NULL),filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_ClearExecFetchClose(SQLSTMT_ID *statement_id, SQLDESC_ID *input_descriptor,
+long CliDebug_ClearExecFetchClose(SQLSTMT_ID *statement_id, SQLDESC_ID *input_descriptor,
 												  SQLDESC_ID* output_descriptor, long num_input_ptr_pairs,
 												  long num_output_ptr_pairs, long num_total_ptr_pairs,
 												  const char *filename, unsigned long line)
@@ -2393,7 +2393,7 @@ SQLCLI_LIB_FUNC long CliDebug_ClearExecFetchClose(SQLSTMT_ID *statement_id, SQLD
 	CLI_DEBUG_RETURN_SQL_LOC(rc,filename,line);
 }
 
-SQLCLI_LIB_FUNC long CliDebug_GetStmtAttr(SQLSTMT_ID *statement_id, long attrName,
+long CliDebug_GetStmtAttr(SQLSTMT_ID *statement_id, long attrName,
 										  int *numeric_value, char *string_value,
 										  long max_string_len, int *len_of_item,
 										  const char *filename, unsigned long line)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/bin/SqlEsp_templ.cpp
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlEsp_templ.cpp b/core/sql/bin/SqlEsp_templ.cpp
deleted file mode 100644
index 97a1226..0000000
--- a/core/sql/bin/SqlEsp_templ.cpp
+++ /dev/null
@@ -1,85 +0,0 @@
-/* -*-C++-*-
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
- *****************************************************************************
- *
- * File:         SqlEsp_templ.C
- * Description:  Source file to explicitly cause template instantiation
- *               and to avoid such instantiation at load time
- *
- * Created:      8/9/96
- * Language:     C++
- *
- *
- *
- *****************************************************************************
- */
-
-#include "Platform.h"
-#ifndef NO_TEMPLATE_INSTANTIATION_FILE
-
-// -----------------------------------------------------------------------
-// By setting the two defines below, force the compiler to read all
-// implementation files for Tools.h++ and for the NA... collection
-// type templates in Collections.h
-// -----------------------------------------------------------------------
-#ifndef RW_COMPILE_INSTANTIATE
-#	define RW_COMPILE_INSTANTIATE
-#endif
-#ifndef NA_COMPILE_INSTANTIATE
-#	define NA_COMPILE_INSTANTIATE
-#endif
-
-// -----------------------------------------------------------------------
-// Include header files such that the included code covers a large part
-// of all the different template references used in an ESP. Those
-// templates that aren't referenced in a header file must be explicitly
-// referenced in a dummy variable defined below.
-// -----------------------------------------------------------------------
-#include "NAIpc.h"
-#include "ex_stdh.h"
-#include "ex_tdb.h"
-#include "ex_tcb.h"
-#include "ex_send_bottom.h"
-#include "ex_send_top.h"
-#include "ex_split_bottom.h"
-#include "ex_split_top.h"
-#include "ex_frag_rt.h"
-#include "ex_esp_frag_dir.h"
-#include "ComDiags.h"
-
-
-// -----------------------------------------------------------------------
-// For those templates that are just used in .C files or that are used
-// in header files not sourced into this file, make a dummy variable and
-// force the instantiation system to instantiate it here.
-// NOTE: we expect this file to be compiled with the -ptf -pta flags.
-// NOTE: this file is designed for cfront-based compilers; it may not
-// work in other environments, like c89.
-// -----------------------------------------------------------------------
-static void dummy_proc_()
-{
-
-  // LIST(CollIndex)               dummy21_;  // see ColStatDesc.C
-
-}
-
-#endif /* NO_TEMPLATE_INSTANTIATION_FILE */

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/bin/Sqlci_templ.cpp
----------------------------------------------------------------------
diff --git a/core/sql/bin/Sqlci_templ.cpp b/core/sql/bin/Sqlci_templ.cpp
deleted file mode 100644
index a09286d..0000000
--- a/core/sql/bin/Sqlci_templ.cpp
+++ /dev/null
@@ -1,132 +0,0 @@
-/**********************************************************************
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
-**********************************************************************/
-/* -*-C++-*-
- *****************************************************************************
- *
- * File:         TemplInst.C
- * Description:  Source file to explicitly cause template instantiation
- *               and to avoid such instantiation at load time
- *
- * Created:      5/26/95
- * Language:     C++
- *
- *
- *
- *****************************************************************************
- */
-
-
-#include "Platform.h"
-#ifndef NO_TEMPLATE_INSTANTIATION_FILE
-
-
-// -----------------------------------------------------------------------
-// By setting the two defines below, force the compiler to read all
-// implementation files for Tools.h++ and for the NA... collection
-// type templates in Collections.h
-// -----------------------------------------------------------------------
-#ifndef RW_COMPILE_INSTANTIATE
-#define RW_COMPILE_INSTANTIATE
-#endif
-#ifndef NA_COMPILE_INSTANTIATE
-#define NA_COMPILE_INSTANTIATE
-#endif
-
-// -----------------------------------------------------------------------
-// Include header files such that the included code covers a large part
-// of all the different template references in the project. Those
-// templates that aren't referenced in a header file must be explicitly
-// referenced in a dummy variable defined below.
-// -----------------------------------------------------------------------
-#include "Sqlcomp.h"
-#include "PartFunc.h"
-#include "opt.h"
-#include "ItemFunc.h"
-#include "RelScan.h"
-#include "RelUpdate.h"
-#include "RelDCL.h"
-#include "StmtNode.h"
-#include "ColStatDesc.h"
-#include "SearchKey.h"
-#include "GroupAttr.h"
-#include "Generator.h"
-#include "NAIpc.h"
-#include "ControlDB.h"
-//#include "ex_stdh.h"
-//#include "ex_tdb.h"
-//#include "ex_tcb.h"
-//#include "ex_send_bottom.h"
-//#include "ex_send_top.h"
-//#include "ex_split_bottom.h"
-//#include "ex_split_top.h"
-//#include "ex_frag_rt.h"
-//#include "ex_esp_frag_dir.h"
-#include "ComDiags.h"
-#include "keycolumns.h"
-#include "vegrewritepairs.h"
-
-//
-// The following header files are for supporting DDL statements
-//
-#include "ElemDDLColDefArray.h"
-#include "ElemDDLColNameArray.h"
-#include "ElemDDLColRefArray.h"
-#include "ElemDDLConstraintArray.h"
-#include "ElemDDLGranteeArray.h"
-#include "ElemDDLPartitionArray.h"
-#include "ElemDDLPrivActions.h"
-#include "ItemColRef.h"
-#include "ItemConstValueArray.h"
-#include "ParNameLocList.h"
-#include "ParTableUsageList.h"
-#include "StmtDDLAddConstraintArray.h"
-#include "StmtDDLAddConstraintCheckArray.h"
-#include "StmtDDLAddConstraintRIArray.h"
-#include "StmtDDLAddConstraintUniqueArray.h"
-#include "StmtDDLCreateIndexArray.h"
-#include "StmtDDLCreateTableArray.h"
-#include "StmtDDLCreateViewArray.h"
-#include "StmtDDLGrantArray.h"
-
-
-// -----------------------------------------------------------------------
-// For those templates that are just used in .C files or that are used
-// in header files not sourced into this file, make a dummy variable and
-// force the instantiation system to instantiate it here.
-// NOTE: we expect this file to be compiled with the -ptf -pta flags.
-// NOTE: this file is designed for cfront-based compilers; it may not
-// work in other environments, like c89.
-// -----------------------------------------------------------------------
-static void dummy_proc_()
-{
-
-  LIST(ExprNode *)		dummy01_;  // see DisplayTree.C
-  LIST(NAString)		dummy18_;  // see DisplayTree.C
-  LIST(ItemExpr *)		dummy19_;  // see SimpleParser.y
-  LIST(RelExpr *)               dummy20_;  // see memo.C
-  LIST(CollIndex)               dummy21_;  // see ColStatDesc.C
-  LIST(NAType *)                dummy22_;  // see generator/GenKey.C
-  NAList<ControlTableOptions*>  dummy33_;
-}
-
-#endif /* NO_TEMPLATE_INSTANTIATION_FILE */

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/bin/arkcmp.cpp
----------------------------------------------------------------------
diff --git a/core/sql/bin/arkcmp.cpp b/core/sql/bin/arkcmp.cpp
index 251deef..5be9ef4 100644
--- a/core/sql/bin/arkcmp.cpp
+++ b/core/sql/bin/arkcmp.cpp
@@ -40,9 +40,6 @@
  */
 
 
-#undef  NA_COMPILE_INSTANTIATE
-#define NA_COMPILE_INSTANTIATE
-
 #include "Platform.h"
 #include "NewDel.h"
 #include <fstream>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/bin/ex_esp_main.cpp
----------------------------------------------------------------------
diff --git a/core/sql/bin/ex_esp_main.cpp b/core/sql/bin/ex_esp_main.cpp
index 57dd43c..c1dcf61 100644
--- a/core/sql/bin/ex_esp_main.cpp
+++ b/core/sql/bin/ex_esp_main.cpp
@@ -73,7 +73,6 @@ DEFINE_DOVERS(tdm_arkesp)
 #include "Context.h"
 #include "StmtCompilationMode.h"
 
-#if (defined(NA_GUARDIAN_IPC))
 // -----------------------------------------------------------------------
 // ESP control connection, handle system messages
 // -----------------------------------------------------------------------
@@ -124,7 +123,6 @@ private:
   // we only need these members in non-WINNT builds.
 
 };
-#endif // NA_GUARDIAN_IPC
 
 class EspSockControlConnection : public SockControlConnection
 {
@@ -459,7 +457,6 @@ void DoEspStartup(Int32 argc,
   // create control connection (open $RECEIVE in Tandemese)
   switch (allocMethod)
     {
-#if (defined(NA_GUARDIAN_IPC))
     case IPC_LAUNCH_GUARDIAN_PROCESS:
     case IPC_SPAWN_OSS_PROCESS:
       {
@@ -479,7 +476,6 @@ void DoEspStartup(Int32 argc,
       env.setIdleTimestamp();
       }
      break;
-#endif //NA_GUARDIAN_IPC
       
     case IPC_INETD:
     case IPC_POSIX_FORK_EXEC:
@@ -517,7 +513,6 @@ void DoEspStartup(Int32 argc,
     }
 }
 
-#if (defined(NA_GUARDIAN_IPC))
 void EspGuaControlConnection::actOnSystemMessage(
        short                  messageNum,
        IpcMessageBufferPtr    sysMsg,
@@ -627,8 +622,6 @@ void EspGuaControlConnection::actOnSystemMessage(
     }
 }
 
-#endif /* NSK code for handling incoming requests on the control connection */
-
 /////////////////////////////////////////////////////////////////////////////
 //
 // The next two methods support error injection.  This is controlled by 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/cli/sqlcli.h
----------------------------------------------------------------------
diff --git a/core/sql/cli/sqlcli.h b/core/sql/cli/sqlcli.h
index 3a28e54..3a8a5b4 100644
--- a/core/sql/cli/sqlcli.h
+++ b/core/sql/cli/sqlcli.h
@@ -42,9 +42,6 @@ typedef long Int64;
 typedef long long int Int64;
 #endif
 
-#undef SQLCLI_LIB_FUNC
-#define SQLCLI_LIB_FUNC
-
 #ifdef __cplusplus
 extern "C"
 {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/Ipc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/Ipc.cpp b/core/sql/common/Ipc.cpp
index 2e3cc42..d528b41 100644
--- a/core/sql/common/Ipc.cpp
+++ b/core/sql/common/Ipc.cpp
@@ -158,13 +158,8 @@ SockIPAddress IpcNodeName::getIPAddress() const
 
 NABoolean GuaProcessHandle::operator == (const GuaProcessHandle &other) const
 {
-#if (defined(NA_GUARDIAN_IPC))
-  // on NSK, do the right thing and call a system procedure to compare
+  // call a system procedure to compare
   return compare(other);
-#else
-  // on other platforms, a byte compare will have to suffice
-  return (str_cmp((char *) phandle_, (char *) other.phandle_, 20) == 0);
-#endif
 }
 
 void GuaProcessHandle::dumpAndStop(bool doDump, bool doStop) const
@@ -213,11 +208,9 @@ IpcProcessId::IpcProcessId(const char *asciiRepresentation) :
 {
   domain_ = IPC_DOM_INVALID;
 
-#if (defined(NA_GUARDIAN_IPC))
   // On NSK, try to interpret the string as a PHANDLE first
   if (phandle_.fromAscii(asciiRepresentation))
     domain_ = IPC_DOM_GUA_PHANDLE;
-#endif
 
   if (domain_ == IPC_DOM_INVALID)
     {
@@ -345,12 +338,10 @@ IpcNodeName IpcProcessId::getNodeName() const
     {
       return IpcNodeName(SockIPAddress(pid_.ipAddress_));
     }
-#if (defined(NA_GUARDIAN_IPC))
   else if (domain_ == IPC_DOM_GUA_PHANDLE)
     {
       return IpcNodeName(phandle_);
     }
-#endif
   else 
     ABORT("Can't get node name of an invalid process id");
 
@@ -364,14 +355,12 @@ IpcNodeName IpcProcessId::getNodeName() const
 
 IpcCpuNum IpcProcessId::getCpuNum() const
 {
-#if (defined(NA_GUARDIAN_IPC))
   if (domain_ == IPC_DOM_GUA_PHANDLE)
     {
       // ask Guardian to get the CPU number out of the phandle
       return getCpuNumFromPhandle();
     }
   else
-#endif
     {
       // for the internet we don't have control over the assignment of CPU
       // numbers, return a don't care value
@@ -385,12 +374,10 @@ Int32 IpcProcessId::toAscii(char *outBuf, Int32 outBufLen) const
   char outb[300] = "";	  // Initialize in case this is called
   Int32 outLen = 0;
 
-#if (defined(NA_GUARDIAN_IPC))
   if (domain_ == IPC_DOM_GUA_PHANDLE)
     {
       outLen = phandle_.toAscii(outb,300);
     }
-#endif
 
   if (domain_ == IPC_DOM_INTERNET)
     {
@@ -456,7 +443,6 @@ IpcConnection * IpcProcessId::createConnectionToServer(
       usesTransactions = usesTransactions; // make compiler happy
       return new(env->getHeap()) SockConnection(env,*this,FALSE);
     }
-#if (defined(NA_GUARDIAN_IPC))
   else if (domain_ == IPC_DOM_GUA_PHANDLE)
     {
 	return new(env->getHeap()) GuaConnectionToServer(env,
@@ -470,7 +456,6 @@ IpcConnection * IpcProcessId::createConnectionToServer(
                                               dataConnectionToEsp
                                               );
     }
-#endif //defined(NA_GUARDIAN_IPC)
   else
     {
       return NULL;
@@ -4580,44 +4565,21 @@ IpcServerClass::IpcServerClass(IpcEnvironment *env,
   }
   if (allocationMethod_ == IPC_ALLOC_DONT_CARE)
     {
-#if (defined(NA_GUARDIAN_IPC))
-	  // NA_WINNT is set and NA_GUARDIAN_IPC is set
-	  // The standard method on NT is to create a Guardian process
-	  // in order to run in an NT only or simulated environment we can set an environment
-	  // variable to override that mechanism.
-	  if (getenv("SQL_NO_NSK_LITE") == NULL)
-	  {
-	   allocationMethod_ = IPC_LAUNCH_GUARDIAN_PROCESS;
-	  }
-	  else 
-	  {
-	   allocationMethod_ = IPC_LAUNCH_NT_PROCESS;
-          time_t tp;
-          time(&tp);
-	  nextPort_ = IPC_SQLESP_PORTNUMBER + tp % 10000; // arbitrary
-	  };
-
-#else // NA_GUARDIAN_IPC
-
-	  // NA_WINNT is set and NA_GUARDIAN_IPC is NOT set
-	  // The standard method on NT is to create an NT process
-	  // We use socket based communication but launch the process ourself rather
-	  // than using INETD.
-	  // Eventually we will use nsk lite to create new processes and to
-	  // communicate via the message system.
-	  // in order to run in an NT only or simulated environment we can set an environment
-	  // variable to override that mechanism.
-	  if (getenv("SQL_NO_NSK_LITE") == NULL)
-	  {allocationMethod_ = IPC_LAUNCH_GUARDIAN_PROCESS;
-	  }
-	  else 
-	  {
-	  allocationMethod_ = IPC_LAUNCH_NT_PROCESS;
+      // NA_WINNT is set and NA_GUARDIAN_IPC is set
+      // The standard method on NT is to create a Guardian process
+      // in order to run in an NT only or simulated environment we can set an environment
+      // variable to override that mechanism.
+      if (getenv("SQL_NO_NSK_LITE") == NULL)
+        {
+          allocationMethod_ = IPC_LAUNCH_GUARDIAN_PROCESS;
+        }
+      else 
+        {
+          allocationMethod_ = IPC_LAUNCH_NT_PROCESS;
           time_t tp;
           time(&tp);
 	  nextPort_ = IPC_SQLESP_PORTNUMBER + tp % 10000; // arbitrary
-	  };
-#endif // NA_GUARDIAN_IPC
+        };
     }
 }
 
@@ -4862,7 +4824,6 @@ IpcServer * IpcServerClass::allocateServerProcess(ComDiagsArea **diags,
   switch (allocationMethod_)
     {
 
-#if (defined(NA_GUARDIAN_IPC))
     case IPC_LAUNCH_GUARDIAN_PROCESS:
     case IPC_SPAWN_OSS_PROCESS:
     case IPC_USE_PROCESS:
@@ -4901,7 +4862,6 @@ IpcServer * IpcServerClass::allocateServerProcess(ComDiagsArea **diags,
           }
       }
       break;
-#endif
 
     case IPC_INETD:
       {
@@ -5310,12 +5270,8 @@ IpcProcessId IpcEnvironment::getMyOwnProcessId(IpcNetworkDomain dom)
     }
   else if (dom == IPC_DOM_GUA_PHANDLE)
     {
-#if (defined(NA_GUARDIAN_IPC))
       // for Guardian, just get the phandle from the operating system
       return IpcProcessId(MyGuaProcessHandle());
-#else
-      ABORT("Can't get Guardian phandle on this platform");
-#endif
     }
   else
     {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/Ipc.h
----------------------------------------------------------------------
diff --git a/core/sql/common/Ipc.h b/core/sql/common/Ipc.h
index 04ea89e..85a4edb 100644
--- a/core/sql/common/Ipc.h
+++ b/core/sql/common/Ipc.h
@@ -179,7 +179,6 @@ public:
   // IpcNodeName(const IpcProcessId &proc);
   // make a node name from an Internet address or from a phandle
   IpcNodeName(const SockIPAddress &iPNode);
-#if (defined(NA_GUARDIAN_IPC))
   IpcNodeName(const GuaProcessHandle &phandle);
   // Return the Guardian node name as a character string, without trailing spaces.
   inline void getNodeNameAsString (char * nodeName) const
@@ -191,7 +190,6 @@ public:
       else
         nodeName[i+1] = 0;
   };
-#endif
   IpcNodeName & operator = (const IpcNodeName &other);
   NABoolean operator == (const IpcNodeName &other);
 
@@ -269,11 +267,9 @@ struct GuaProcessHandle
   SB_Phandle_Type phandle_;
 
   NABoolean operator == (const GuaProcessHandle &other) const;
-#if (defined(NA_GUARDIAN_IPC))
   NABoolean compare(const GuaProcessHandle &other) const;
   NABoolean fromAscii(const char *ascii);
   Int32 toAscii(char *ascii, Int32 asciiLen) const;
-#endif
   Lng32 decompose(Int32 &cpu, Int32 &pin, Int32 &nodeNumber
                   , SB_Int64_Type &seqNum
                   ) const;
@@ -285,14 +281,12 @@ struct GuaProcessHandle
   void dumpAndStop(bool doDump, bool doStop) const;
 };
 
-#if (defined(NA_GUARDIAN_IPC))
 class MyGuaProcessHandle : public GuaProcessHandle
 {
 public:
   // default constructor initializes object with my own process handle
   MyGuaProcessHandle();
 };
-#endif
 
 struct SockProcessId
 {
@@ -467,9 +461,7 @@ private:
 
   // private methods
 
-#if (defined(NA_GUARDIAN_IPC))
   IpcCpuNum getCpuNumFromPhandle() const;
-#endif
 };
 
 typedef enum WaitReturnStatusEnum
@@ -1058,7 +1050,6 @@ private:
   SockIPAddress  ipAddr_;
 };
 
-#if (defined(NA_GUARDIAN_IPC))
 // -----------------------------------------------------------------------
 // A Guardian connection on the client side that connects to a server
 // by opening its process file
@@ -1383,8 +1374,6 @@ private:
 
 };
 
-#endif /* NA_GUARDIAN_IPC */
-
 // -----------------------------------------------------------------------
 // The connection through which a server gets controlled by its owner.
 // Exactly one object of this type exists in every server. This is
@@ -1499,7 +1488,6 @@ private:
   SockListnerPort *listnerPort_;
 };
 
-#if (defined(NA_GUARDIAN_IPC))
 // -----------------------------------------------------------------------
 // A control connection for a Guardian server using $RECEIVE
 // -----------------------------------------------------------------------
@@ -1702,7 +1690,6 @@ public:
                              GuaProcessHandle *clientPhandle)  {return FALSE; }
  
 };
-#endif
 
 // -----------------------------------------------------------------------
 // A message buffer (the container in which the message travels)
@@ -2727,7 +2714,6 @@ protected:
   virtual void stop();
 };
 
-#if (defined(NA_GUARDIAN_IPC))
 // -----------------------------------------------------------------------
 // Specialization for a Guardian server process
 // -----------------------------------------------------------------------
@@ -2886,7 +2872,6 @@ private:
 
  NABoolean unhooked_;
 };
-#endif /* NA_GUARDIAN_IPC */
 
 // -----------------------------------------------------------------------
 // Max. length of a server class name (see below)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/IpcGuardian.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/IpcGuardian.cpp b/core/sql/common/IpcGuardian.cpp
index 43b659f..c8ebcf8 100644
--- a/core/sql/common/IpcGuardian.cpp
+++ b/core/sql/common/IpcGuardian.cpp
@@ -52,8 +52,6 @@
 #include "PortProcessCalls.h"
 #include "logmxevent.h"
 
-#if (defined(NA_GUARDIAN_IPC))
-// all of these files are OK in the executor environment (PRIV, no globals)
 #include "MXTraceDef.h"
 #include "seabed/fs.h"
 #include "seabed/ms.h"
@@ -70,7 +68,6 @@ extern "C" {
 #include "zsysc.h"
 }
 #include "fs/feerrors.h"
-#endif
 
 // Uncomment the next line to debug IPC problems (log of client's I/O)
 // #define LOG_IPC

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/NAIpc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/NAIpc.cpp b/core/sql/common/NAIpc.cpp
index b6a20bb..3c42606 100644
--- a/core/sql/common/NAIpc.cpp
+++ b/core/sql/common/NAIpc.cpp
@@ -107,7 +107,6 @@ NAMessage::NAMessage(IpcNetworkDomain domain) :
     {
       switch (domain)
 	{
-#if (defined(NA_GUARDIAN_IPC))
 	case IPC_DOM_GUA_PHANDLE:
 
 	  // open $RECEIVE
@@ -117,7 +116,6 @@ NAMessage::NAMessage(IpcNetworkDomain domain) :
 	  while (cc->getConnection() == NULL)
 	    cc->castToGuaReceiveControlConnection()->wait(IpcInfiniteTimeout);
 	  break;
-#endif
 
 	case IPC_DOM_INTERNET:
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/Platform.h
----------------------------------------------------------------------
diff --git a/core/sql/common/Platform.h b/core/sql/common/Platform.h
index f648405..fe7598a 100644
--- a/core/sql/common/Platform.h
+++ b/core/sql/common/Platform.h
@@ -36,38 +36,11 @@
  *****************************************************************************
  */
 
-#ifdef __gnu_linux__
-#endif   /* __gnu_linux__ */
-
-
-/* GNU Linux: G++/GCC major version 3 */
-#if __GNUC__ >= 3
-#define NA_GCC
-#endif
-
-#ifdef _MSC_VER
-#define NA_MSVC
-#endif
-
-
-/* -----------------------------------------------------------------------  */
-/* define one of NA_MIPS, NA_IX86 and a define for the endianness           */
-/* -----------------------------------------------------------------------  */
-
-#if defined(_M_IX86) || defined(__i386__)
-#define NA_IX86
-#ifndef	NA_LITTLE_ENDIAN
-#define NA_LITTLE_ENDIAN
-#endif
-#endif
-
-
 /*
 // On Linux, either NA_BIG_ENDIAN or NA_LITTLE_ENDIAN may have already
 // been set because some other target may have been defined.  The following
 // should set it correctly on Linux.
 */
-#if !defined(USE_EMBEDDED_SQL_DEFINITIONS)
 #include <endian.h>
 #if __BYTE_ORDER == __LITTLE_ENDIAN
 #undef NA_BIG_ENDIAN
@@ -76,231 +49,83 @@
 #undef NA_LITTLE_ENDIAN
 #define NA_BIG_ENDIAN
 #endif
-#endif /* NA_LINUX */
-
-
-/* -----------------------------------------------------------------------  */
-/* Designate use of static or dynamic queries for Update Statistics.        */
-/* -----------------------------------------------------------------------  */
-#undef NA_USTAT_USE_STATIC
-
-/* -----------------------------------------------------------------------  */
-/* Designate using the real ARKFS                                           */
-/* -----------------------------------------------------------------------  */
-#ifndef NA_ARKFS
-#define NA_ARKFS
-#endif
-
-/* -----------------------------------------------------------------------  */
-/* Designate if real CatMan integration has happened (or still using sqlcat */
-/* simulator).                                                              */
-/* -----------------------------------------------------------------------  */
-#define NA_CATMAN_SIM
-
-/* -----------------------------------------------------------------------  */
-/* Designate if we're switched over to FLEX/BISON                           */
-/* -----------------------------------------------------------------------  */
-#define NA_FLEXBUILD
 
 /* -----------------------------------------------------------------------  */
 /* Set the flavor of Guardian IPC that is used                              */
 /* -----------------------------------------------------------------------  */
-
-
-#ifndef NA_NO_GUARDIAN_IPC /* allow override from dev environment*/
 #define NA_GUARDIAN_IPC
-#endif
 
-#if defined( NA_C89 ) || defined( NA_MSVC )
 /* ----------------------------------------------------------------------- */
-/* C89 and MSVC perform template instantiation at compile time,            */
+/* MSVC perform template instantiation at compile time,                    */
 /* so make sure they see the template implementation files                 */
 /* ----------------------------------------------------------------------- */
-
-/* The following defines cause the implementation files for templates to
- * be sourced in at compile time, so the compiler actually can perform
- * template instantiation at compile time
- */
-#ifndef NA_MSVC
-/* RogueWave file rw/compiler.h recognizes this automatically for
-   Microsoft Visual C++, no need to set here */
-#ifndef	RW_COMPILE_INSTANTIATE
-#define RW_COMPILE_INSTANTIATE
-#endif
-#endif
-
-#ifndef	NA_COMPILE_INSTANTIATE
 #define NA_COMPILE_INSTANTIATE
-#endif
-/* The following define should be used in the template instantiation file
- * to create an empty object file, if the define is set
- */
-#ifndef NO_TEMPLATE_INSTANTIATION_FILE
-#define NO_TEMPLATE_INSTANTIATION_FILE
-#endif
-#endif
-
-#define NA_IEEE_FLOAT
 
-#define NA_EIDPROC
-#define SQLEXP_LIB_FUNC
-#define SQLEXPORT_LIB_FUNC
-
-/* Use ANSI standard namespace for .NET and new GCC compilers. */
-#if (_MSC_VER >= 1300) || (__GNUC__ >= 3)
-#define NA_STD_NAMESPACE
-#endif
-
-#ifdef NA_64BIT
-  /* dg64 - need NA_MAX_PATH */
-  #define NA_MAX_PATH  PATH_MAX
-#else
-#define NA_MAX_PATH  _MAX_PATH
-#endif
-
-
-/* BBZ -- used only in /sqlci/sqlci_lex.ll */
-#define NA_EXTERN_C_LINKAGE
-
-#define NA_WIDE_CHARACTER
-
-#if !defined(NDEBUG)
-    #define NA_DEBUG_C_RUNTIME
-#endif
-
-     /* Linux with the gcc compiler */
-     typedef int TInt32;
-     typedef long long int TInt64;
-
-
-/*
-// ANSI C++ casts (e.g. static_cast) are not supported by NSK c89 version2.
-// ANSI C++ casts are supported by the VC++ 5.0 and later compiler
-// and by NSK c89 version3.
-*/
-#if !defined(NA_C89_VERSION2) && !defined(_EMBEDDED)
-#define NA_HAS_ANSI_CPP_CASTS
-#endif
-
-
-//
-// -------------------------------------------------------------------------
-// Set to enable conditional compilation of SeaQuest Unicode code for Linux
-// -------------------------------------------------------------------------
-//
-#define NA_SQ_UNI
-
-/*
-// -------------------------------------------------------------------------
-// Set to enable conditional compilation of SeaQuest Multi-Temperate Data
-// (MTD) code using the metadata column ACCESS_PATH_COLS.DIVISION_KEY_SEQ_NUM
-// that is available in the SeaQuest SQL software only.
-// -------------------------------------------------------------------------
-*/
-#define NA_SQ_SMD_DIV_COL
-
-/*
-//--------------------------------------------------------------------------
-// Hybrid Super Cluster (HSC) definitions
-//--------------------------------------------------------------------------
-*/
-
-#if defined(_HSC) || defined(HSC)
-#define NA_HSC
-#endif
+#define NA_MAX_PATH  PATH_MAX
 
+/* For declare thread private variables (have to be POD types) */
+#define THREAD_P __thread
 
-#if defined(NA_STD_NAMESPACE) && !defined(USE_EMBEDDED_SQL_DEFINITIONS)
-/* If using an ANSI C++ compiler, then go ahead and use the std namespace. */
 namespace std {}
 using namespace std;
-#endif
 
 /* For process thread id, it is long on Linux currently */
 typedef long ThreadId;
 
-/* For declare thread private variables (have to be POD types) */
-#define THREAD_P __thread
-
 /*
-// ---------------------------------------------------------------------
-// Used where variable size matters
-// Moved from NAVersionedObject.h and Int64.h
-// ---------------------------------------------------------------------
+ ---------------------------------------------------------------------
+ Used where variable size matters
+ ---------------------------------------------------------------------
 */
 typedef char            Int8;
 typedef unsigned char   UInt8;
 typedef unsigned char   UChar;
 typedef short           Int16;
 typedef unsigned short  UInt16;
-#if !defined(USE_EMBEDDED_SQL_DEFINITIONS)
+
 typedef int             Int32;
 typedef unsigned int    UInt32;
-#endif
+
 typedef float           Float32;
 typedef double          Float64;
 
-#if   defined( __linux__ ) && defined( NA_64BIT )
-
-  typedef long Int64;
-  typedef unsigned long UInt64;
-
-#elif (defined( NA_WINNT )) && !defined(USE_EMBEDDED_SQL_DEFINITIONS )     /* NT_PORT SK 08/13/96 */
-
-  typedef _int64 Int64;
-  typedef unsigned __int64 UInt64;
+typedef long Int64;
+typedef unsigned long UInt64;
 
-#endif  /* NA_C89 */
+/* Linux with the gcc compiler */
+typedef int TInt32;
+typedef long long int TInt64;
 
 /*
-// format strings, in case not defined (should be seabed/int/types.h)
+ format strings
 */
-#ifndef PFSZ
-#ifdef NA_64BIT
- #define PFLL  "%ld"
- #define PFLLX "%lx"
- #define PF64  "%ld"
- #define PF64X "%lx"
- #define PFSZ  "%lu"
- #define PFSZX "%lx"
-#else
- #define PFLL  "%lld"
- #define PFLLX "%llx"
- #define PF64  "%lld"
- #define PF64X "%llx"
- #define PFSZ  "%u"
- #define PFSZX "%x"
-#endif // NA_64BIT
-#endif // PFSZ
+#define PFLL  "%ld"
+#define PFLLX "%lx"
+#define PF64  "%ld"
+#define PF64X "%lx"
+#define PFSZ  "%lu"
+#define PFSZX "%lx"
 
 /*
-// additional format strings used only in SQL code
-// PFV64 and PFLV64 for variable width field and left pad 0s
-// PFP64 added for variable precision.
+ additional format strings.
+ PFV64 and PFLV64 for variable width field and left pad 0s
+ PFP64 added for variable precision.
 */
-#ifdef NA_64BIT
- #define PFV64  "%*ld"
- #define PFLV64  "%0*ld"
+#define PFV64  "%*ld"
+#define PFLV64  "%0*ld"
 #define PFP64  "%.*ld"
-#else
- #define PFV64  "%*lld"
- #define PFLV64  "%0*lld"
- #define PFP64  "%.*lld"
-#endif // NA_64BIT
 
 /* Lng32 to replace "long" or "signed long" */
 /* and some will remain Int32 and others would become Int64 when done */
 typedef int             Lng32;
+
 /* ULng32 to replace "unsigned long" or "unsigned long int" */
 /* and some will remain UInt32 and others would become UInt64 when done */
 typedef unsigned int    ULng32;
 
-
 /* These types are used for variables that must store integers sometime */
 /* and pointers other time. Could have given a better name */
 typedef  long Long;
 typedef  unsigned long ULong;
 
-//@ZXrngspec
-
 #endif /* PLATFORM_H  */

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/arkcmp_proc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/arkcmp_proc.cpp b/core/sql/common/arkcmp_proc.cpp
index 0806178..6a212a9 100644
--- a/core/sql/common/arkcmp_proc.cpp
+++ b/core/sql/common/arkcmp_proc.cpp
@@ -37,9 +37,6 @@
  */
 
 
-#undef  NA_COMPILE_INSTANTIATE
-#define NA_COMPILE_INSTANTIATE
-
 #include "Platform.h"
 #include "NewDel.h"
 #include <fstream>

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/charinfo.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/charinfo.cpp b/core/sql/common/charinfo.cpp
index d10e888..d52244e 100644
--- a/core/sql/common/charinfo.cpp
+++ b/core/sql/common/charinfo.cpp
@@ -61,15 +61,8 @@ using namespace std;
 // CHARSET stuff
 //****************************************************************************
 
-
-
-#ifdef NA_WIDE_CHARACTER
-  #define IF_WIDE TRUE
-#else
-  #define IF_WIDE FALSE
-#endif
-
-  #define IF_NSK FALSE
+#define IF_WIDE TRUE
+#define IF_NSK FALSE
 
 struct mapCS {
   CharInfo::CharSet cs;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/ipcmsg.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/ipcmsg.cpp b/core/sql/common/ipcmsg.cpp
index f6c8f92..1ee0720 100644
--- a/core/sql/common/ipcmsg.cpp
+++ b/core/sql/common/ipcmsg.cpp
@@ -69,8 +69,6 @@ enum {FS_SMS_VERSION_MAY94 = 1};
 #include <fcntl.h>
 #include "logmxevent.h"
 
-#if (defined(NA_GUARDIAN_IPC))
-// all of these files are OK in the executor environment (PRIV, no globals)
 extern "C" {
 //#include <cextdecs.h>
 #include "cextdecs.h(PROCESSHANDLE_TO_FILENAME_,PROCESSHANDLE_DECOMPOSE_,FILE_OPEN_,SETMODE,FILE_GETINFO_,FILE_CLOSE_, AWAITIOX,PROCESS_DELAY_)"
@@ -78,7 +76,6 @@ extern "C" {
 // should be #include <zsysc.h>
 #include "zsysc.h"
 }
-#endif
 
 //Function used to get a pointer to the pfs
 _callable void fs2_get_pfsaddr(Long *);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/common/str.cpp
----------------------------------------------------------------------
diff --git a/core/sql/common/str.cpp b/core/sql/common/str.cpp
index 4c87abe..b2b4653 100644
--- a/core/sql/common/str.cpp
+++ b/core/sql/common/str.cpp
@@ -58,7 +58,6 @@ Int32 isUpper8859_1(NAWchar c)
   if ((c >= 'A') && (c <= 'Z'))
     return TRUE;
 
-#ifdef NA_WIDE_CHARACTER
   if ((c >= 0xc0) && (c <= 0xde))  // between cap A with grave accent
   {                                // and cap icelandic letter thorn
     if (c == 0xd7)     // but not multiplication symbol
@@ -66,7 +65,7 @@ Int32 isUpper8859_1(NAWchar c)
     else
        return TRUE;
   }
-#endif // NA_WIDE_CHARACTER
+
   return FALSE;
 }
 
@@ -76,7 +75,6 @@ Int32 isLower8859_1(NAWchar c)
   if ((c >= 'a') && (c <= 'z'))
     return TRUE;
 
-#ifdef NA_WIDE_CHARACTER
   if ((c >= 0xdf) && (c <= 0xff))  // between lower german sharp S
   {                                // and lower y with diaeresis
     if (c == 0xf7)     // but not division symbol
@@ -84,7 +82,7 @@ Int32 isLower8859_1(NAWchar c)
     else
        return TRUE;
   }
-#endif // NA_WIDE_CHARACTER
+
   return FALSE;
 }
 
@@ -97,7 +95,6 @@ Int32 isAlpha8859_1(NAWchar c)
     return TRUE;
   }
 
-#ifdef NA_WIDE_CHARACTER
   if ((c >= 0xc0) && (c <= 0xff))   // possible european letter
   {
     if ((c == 0xd7) || (c == 0xf7))  // multiple or divide sign
@@ -105,7 +102,7 @@ Int32 isAlpha8859_1(NAWchar c)
     else
       return TRUE;
   }
-#endif // NA_WIDE_CHARACTER
+
   return FALSE;
 }
 
@@ -138,10 +135,9 @@ Int32 isDigit8859_1(NAWchar c) // ISO 8859-1 char set safe isdigit routine
 Int32 isCaseInsensitive8859_1(NAWchar c) // ISO 8859-1 char for which there is no
                                // upcase equivalent.  hex values 0xDF & 0xFF
 {
-#ifdef NA_WIDE_CHARACTER
   if ((c==0xDF) || (c==0xFF))
     return TRUE;
-#endif // NA_WIDE_CHARACTER
+
   return FALSE;
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/BufferList.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/BufferList.cpp b/core/sql/executor/BufferList.cpp
index 39ff340..cf4b8d2 100644
--- a/core/sql/executor/BufferList.cpp
+++ b/core/sql/executor/BufferList.cpp
@@ -39,21 +39,13 @@ namespace ExOverflow
   char*
   BufferList::back(void)
   {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     return static_cast<char*>(bufferList_.getTail());
-#else
-    return (char*) bufferList_.getTail();
-#endif
   }
 
   char*
   BufferList::current(void)
   {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
-      return static_cast<char*>(bufferList_.getCurr());
-#else
-      return (char*) bufferList_.getCurr();
-#endif
+    return static_cast<char*>(bufferList_.getCurr());
   }
 
   bool
@@ -65,11 +57,7 @@ namespace ExOverflow
   char*
   BufferList::front(void)
   {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     return static_cast<char*>(bufferList_.getHead());
-#else
-    return (char*) bufferList_.getHead();
-#endif
   }
 
   char*
@@ -117,11 +105,7 @@ namespace ExOverflow
   UInt32
   BufferList::size(void)
   {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     return static_cast<UInt32>(bufferList_.numEntries());
-#else
-    return (UInt32) bufferList_.numEntries();
-#endif
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/ExDupSqlBuffer.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ExDupSqlBuffer.cpp b/core/sql/executor/ExDupSqlBuffer.cpp
index 067ab3c..176e173 100644
--- a/core/sql/executor/ExDupSqlBuffer.cpp
+++ b/core/sql/executor/ExDupSqlBuffer.cpp
@@ -28,12 +28,8 @@
 
 ExDupSqlBuffer::ExDupSqlBuffer(UInt32 nTuples, UInt32 tupleSize,
                                UInt32 nReserve, NAMemory* heap)
-#if defined(NA_HAS_ANSI_CPP_CASTS)
   : ExSimpleSQLBuffer(static_cast<Int32>(nTuples),
                       static_cast<Int32>(tupleSize), heap),
-#else
-  : ExSimpleSQLBuffer((Int32) nTuples, (Int32) tupleSize, heap),
-#endif
     dupCurrent_(NULL), dupHead_(NULL), dupTail_(NULL),
     maxDups_(0), nDups_(0)
 {
@@ -46,22 +42,13 @@ ExDupSqlBuffer::ExDupSqlBuffer(UInt32 nTuples, UInt32 tupleSize,
 ExDupSqlBuffer::ExDupSqlBuffer(UInt32 nBuffers, UInt32 bufferSize, 
                                UInt32 nReserve, UInt32 tupleSize,
                                NAMemory* heap)
-#if defined(NA_HAS_ANSI_CPP_CASTS)
   : ExSimpleSQLBuffer(static_cast<Int32>(nBuffers),
                       static_cast<Int32>(bufferSize),
                       static_cast<Int32>(tupleSize), heap),
-#else
-  : ExSimpleSQLBuffer((Int32) nBuffers, (Int32) bufferSize, 
-                      (Int32) tupleSize, heap),
-#endif
     dupCurrent_(NULL), dupHead_(NULL), dupTail_(NULL),
     maxDups_(0), nDups_(0)
 {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
   UInt32 nTuples = static_cast<UInt32>(getNumTuples());
-#else
-  UInt32 nTuples = (UInt32) getNumTuples();
-#endif
   if (nTuples > nReserve)
   {
     maxDups_ = nTuples - nReserve;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/SwapSpace.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/SwapSpace.cpp b/core/sql/executor/SwapSpace.cpp
index a02ed31..a9baf9d 100644
--- a/core/sql/executor/SwapSpace.cpp
+++ b/core/sql/executor/SwapSpace.cpp
@@ -109,11 +109,7 @@ namespace ExOverflow
 
     if (sortError_.getSortError())
     {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
       error = static_cast<Int16>(sortError_.getSysError());
-#else
-      error = (Int16) sortError_.getSysError();
-#endif
     }
 
     return error;
@@ -288,11 +284,7 @@ namespace ExOverflow
     readingFirstBuffer_ = false;
 
     // ScratchSapce blockNums are 1..N
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     Int32 blockNum = static_cast<Int32>(swapRead_ / swapBufferSize_) + 1;
-#else
-    Int32 blockNum = ((Int32) (swapRead_ / swapBufferSize_)) + 1;
-#endif
     status = mapStatus(store_->readThru(readBuffer_, blockNum, 
                                         swapBufferSize_));
     // status is OK if read was successfully initiated
@@ -306,11 +298,7 @@ namespace ExOverflow
     ex_assert((!store_), "temporary storage already initialized");
 
     readBuffer_ = memory_.getBuffer(true);
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     Lng32 bufSize = static_cast<Lng32>(swapBufferSize_);
-#else
-    Lng32 bufSize = (Lng32) swapBufferSize_;
-#endif
     NAMemory* heap = memory_.getHeap();
     store_ = new(heap) ScratchSpace(heap, &sortError_,bufSize, 1, -1, //explain node
                                     false);   // logInfoEvent = false

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/ex_exe_stmt_globals.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_exe_stmt_globals.cpp b/core/sql/executor/ex_exe_stmt_globals.cpp
index 24ff74c..8c06612 100644
--- a/core/sql/executor/ex_exe_stmt_globals.cpp
+++ b/core/sql/executor/ex_exe_stmt_globals.cpp
@@ -1340,7 +1340,6 @@ void ExEspStmtGlobals::setReplyTag(Int64 transid, short replyTag)
 
 NABoolean ExEspStmtGlobals::restoreTransaction()
 {
-#if (defined(NA_GUARDIAN_IPC))
   if (replyTag_ != GuaInvalidReplyTag)
     {
       // we do have a transaction work request, switch to its transaction
@@ -1358,13 +1357,6 @@ NABoolean ExEspStmtGlobals::restoreTransaction()
       return NOT espFragInstanceDir_->
 	getFragment(myHandle_)->getNeedsTransaction();
     }
-#else
-  // without TMF, just wing it and return TRUE, if browse access
-  ex_assert(NOT espFragInstanceDir_->
-	    getFragment(myHandle_)->getNeedsTransaction(),
-	    "Unix does not support ESPs that need a transaction");
-  return TRUE;
-#endif
 }
 
 CollIndex ExEspStmtGlobals::registerSendTopTcb(ex_send_top_tcb *st)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/ex_frag_rt.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_frag_rt.cpp b/core/sql/executor/ex_frag_rt.cpp
index bdcea36..be19fc0 100644
--- a/core/sql/executor/ex_frag_rt.cpp
+++ b/core/sql/executor/ex_frag_rt.cpp
@@ -54,10 +54,7 @@
 #include "ExStats.h"
 #include "ComDistribution.h"
 #include "sql_buffer_size.h"
-// #include "MXVersion.h"
-#if (defined(NA_GUARDIAN_IPC))
 #include "ExCextdecs.h"
-#endif
 
 
 #include "seabed/ms.h"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/executor/ex_mj.cpp
----------------------------------------------------------------------
diff --git a/core/sql/executor/ex_mj.cpp b/core/sql/executor/ex_mj.cpp
index fcabf19..e00b769 100644
--- a/core/sql/executor/ex_mj.cpp
+++ b/core/sql/executor/ex_mj.cpp
@@ -120,11 +120,7 @@ ex_mj_tcb::ex_mj_tcb(const ex_mj_tdb & mj_tdb,
   {
     pool_ = NULL;
     Int32 nBuffers = mj_tdb.numBuffers_;
-#if defined(NA_HAS_ANSI_CPP_CASTS)
     Lng32 bufSize = static_cast<Lng32>(mj_tdb.bufferSize_);
-#else
-    Lng32 bufSize = (Lng32) mj_tdb.bufferSize_;
-#endif
 
     if (isLeftJoin() && ljExpr())
     {
@@ -188,17 +184,11 @@ ex_mj_tcb::ex_mj_tcb(const ex_mj_tdb & mj_tdb,
     {
       Float32 estRows = mj_tdb.getEstRowsUsed();
       Int32 recLen = mj_tdb.rightDupRecLen_;
-#if defined(NA_HAS_ANSI_CPP_CASTS)
       UInt32 assumedMaxMB
         = static_cast<UInt32>(
           (recLen * estRows) / (4 * ExOverflow::ONE_MEGABYTE));
       UInt32 pctBasedQuotaMB
         = static_cast<UInt32>(quotaMB * (mj_tdb.getQuotaPct()/100.0));
-#else
-      UInt32 assumedMaxMB
-        = (UInt32) (recLen * estRows) / (4 * ExOverflow::ONE_MEGABYTE);
-      UInt32 pctBasedQuotaMB = (UInt32) quotaMB * (mj_tdb.getQuotaPct()/100.0);
-#endif
       if (pctBasedQuotaMB && (pctBasedQuotaMB < assumedMaxMB))
       {
         assumedMaxMB = pctBasedQuotaMB;
@@ -457,11 +447,7 @@ bool ex_mj_tcb::reacquireResources(void)
       if (mjTdb().getLogDiagnostics())
         {
           char msg[128];
-#if defined(NA_HAS_ANSI_CPP_CASTS)
           UInt32 memorySize = static_cast<UInt32>(tspace_->getMemory());
-#else
-          UInt32 memorySize = (UInt32) tspace_->getMemory();
-#endif
           str_sprintf(msg, "Merge join initial TupleSpace memory is %d bytes",
                       memorySize);
           SQLMXLoggingArea::logExecRtInfo(__FILE__, __LINE__, msg,
@@ -571,11 +557,7 @@ short ex_mj_tcb::stop(ex_mj_private_state& pstate)
         if (mjTdb().getLogDiagnostics())
         {
           char msg[64];
-#if defined(NA_HAS_ANSI_CPP_CASTS)
           UInt32 maxMemory = static_cast<UInt32>(tspace_->getMaxMemory());
-#else
-          UInt32 maxMemory = (UInt32) tspace_->getMaxMemory();
-#endif
           str_sprintf(msg, "Merge join released resources, max memory %d",
                       maxMemory);
           SQLMXLoggingArea::logExecRtInfo(__FILE__, __LINE__, msg,
@@ -800,13 +782,8 @@ ex_mj_tcb::returnRow(atp_struct* leftAtp,
       if (!isSemiJoin())
       {
         // Return right row portion of join.
-#if defined(NA_HAS_ANSI_CPP_CASTS)
         short nLeftTuples = static_cast<short>(leftAtp->numTuples());
         short lastSrcAtpIndex = static_cast<short>(rightAtp->numTuples() - 1);
-#else
-        short nLeftTuples = (short) leftAtp->numTuples();
-        short lastSrcAtpIndex = (short) (rightAtp->numTuples() - 1);
-#endif
         if (!isUniqueMj)
         {
           // Join flattened (contiguous) saved duplicate right row
@@ -836,19 +813,11 @@ ex_mj_tcb::returnRow(atp_struct* leftAtp,
                                   mjTdb().ljRecLen_))
         {
           // Couldn't allocate; try to add a new buffer.
-#if defined(NA_HAS_ANSI_CPP_CASTS)
           Lng32 bufSize = static_cast<Lng32>(mjTdb().bufferSize_);
-#else
-          Lng32 bufSize = (Lng32) mjTdb().bufferSize_;
-#endif
 
           if (!pool_->addBuffer(bufSize, false))
           {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
             createDiags(static_cast<Int16>(EXE_NO_MEM_TO_EXEC));
-#else
-            createDiags((Int16) EXE_NO_MEM_TO_EXEC);
-#endif
             retCode = ex_expr::EXPR_ERROR;
           }
           else if (pool_->get_free_tuple(parentAtp->getTupp(pentry->numTuples()-1),
@@ -2108,11 +2077,7 @@ ex_mj_private_state::currentState(void) const
 const char*
 ex_mj_private_state::stateName(ex_mj_tcb::mj_step mjStep)
 {
-#if defined(NA_HAS_ANSI_CPP_CASTS)
   Int32 i = static_cast<Int32>(mjStep);
-#else
-  Int32 i = (Int32) mjStep;
-#endif
 
   return stateNames[i];
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/nskgmake/arkcmp/Makefile
----------------------------------------------------------------------
diff --git a/core/sql/nskgmake/arkcmp/Makefile b/core/sql/nskgmake/arkcmp/Makefile
index ba5ec34..4e4b625 100755
--- a/core/sql/nskgmake/arkcmp/Makefile
+++ b/core/sql/nskgmake/arkcmp/Makefile
@@ -21,8 +21,7 @@
 # @@@ END COPYRIGHT @@@
 #######################################################################
 
-CPPSRC := arkcmp.cpp \
-	Sqlci_templ.cpp
+CPPSRC := arkcmp.cpp
 
 EARLY_DLLS:= -ljsig
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/nskgmake/arkcmp_dll/Makefile
----------------------------------------------------------------------
diff --git a/core/sql/nskgmake/arkcmp_dll/Makefile b/core/sql/nskgmake/arkcmp_dll/Makefile
index d534be5..d5d775c 100755
--- a/core/sql/nskgmake/arkcmp_dll/Makefile
+++ b/core/sql/nskgmake/arkcmp_dll/Makefile
@@ -21,10 +21,7 @@
 # @@@ END COPYRIGHT @@@
 #######################################################################
 
-CPPSRC := arkcmp_proc.cpp \
-	Sqlci_templ.cpp
-
-#CPPSRC := Sqlci_templ.cpp
+CPPSRC := arkcmp_proc.cpp 
 
 #GUI Debugger
   ifeq ($(FLAVOR),debug)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index d8e85b0..f14791e 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -10566,23 +10566,15 @@ trim_operands : value_expression
         }
      | TOK_FROM value_expression
         { 
-          #ifdef NA_WIDE_CHARACTER
-            $$ = new (PARSERHEAP()) Trim(Trim::BOTH,
-		 new (PARSERHEAP()) ConstValue(" ", WIDE_(" ")), $2); 
-          #else
-            $$ = new (PARSERHEAP()) Trim(Trim::BOTH,
-                 new (PARSERHEAP()) SystemLiteral(" ", CharInfo::UnknownCharSet), $2); 
-          #endif // NA_WIDE_CHARACTER
+          $$ = new (PARSERHEAP()) Trim(
+               Trim::BOTH,
+               new (PARSERHEAP()) ConstValue(" ", WIDE_(" ")), $2); 
         }
      | trim_spec TOK_FROM value_expression
         { 
-          #ifdef NA_WIDE_CHARACTER
-            $$ = new (PARSERHEAP()) Trim($1,
-	         new (PARSERHEAP()) ConstValue(" ", WIDE_(" ")), $3); 
-          #else
-            $$ = new (PARSERHEAP()) Trim($1,
-                 new (PARSERHEAP()) SystemLiteral(" ", CharInfo::UnknownCharSet), $3); 
-          #endif // NA_WIDE_CHARACTER
+          $$ = new (PARSERHEAP()) Trim(
+               $1,
+               new (PARSERHEAP()) ConstValue(" ", WIDE_(" ")), $3); 
         }
      | value_expression TOK_FROM value_expression
         { $$ = new (PARSERHEAP()) Trim(Trim::BOTH, $1, $3); }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/parser/ulexer.h
----------------------------------------------------------------------
diff --git a/core/sql/parser/ulexer.h b/core/sql/parser/ulexer.h
index 2a1a7ce..a61f3d0 100644
--- a/core/sql/parser/ulexer.h
+++ b/core/sql/parser/ulexer.h
@@ -111,7 +111,6 @@ protected:
 
 	{ for (NAWchar* c=yytext_; *c; c++) *c = toupper(*c); }
 
-	#ifdef NA_WIDE_CHARACTER
 	  char yynarrow_[400];
 	  void yyToNarrow()
 	  { 
@@ -125,10 +124,6 @@ protected:
 	    }
 	    *n = '\0';
 	  }
-	#else
-	  #define yynarrow_ yytext_
-	  void yyToNarrow() {}
-	#endif
 };
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/sqlci/sqlci_lex.ll
----------------------------------------------------------------------
diff --git a/core/sql/sqlci/sqlci_lex.ll b/core/sql/sqlci/sqlci_lex.ll
index 57dd363..afca706 100755
--- a/core/sql/sqlci/sqlci_lex.ll
+++ b/core/sql/sqlci/sqlci_lex.ll
@@ -115,19 +115,11 @@ void SqlciUnput(char c)
 
 // handle EOF in the input stream and let lex continue
 // with the next input file
-
-#if defined(NA_EXTERN_C_LINKAGE)
 extern "C"   
   int yywrap(void)
     {
       return 0;
     }
-#else
-int yywrap(void)
-{
-  return 0;
-}
-#endif
 
 %}
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/d496f359/core/sql/udrserv/UdrStreams.cpp
----------------------------------------------------------------------
diff --git a/core/sql/udrserv/UdrStreams.cpp b/core/sql/udrserv/UdrStreams.cpp
index fec0bc3..149b99f 100644
--- a/core/sql/udrserv/UdrStreams.cpp
+++ b/core/sql/udrserv/UdrStreams.cpp
@@ -249,7 +249,6 @@ void UdrServerDataStream::actOnReceive(IpcConnection *conn)
   
 } // UdrServerDataStream::actOnReceive()
 
-#if (defined(NA_GUARDIAN_IPC))
 void
 UdrGuaControlConnection::actOnSystemMessage(
   short                  messageNum,
@@ -309,7 +308,6 @@ UdrGuaControlConnection::actOnSystemMessage(
   }
 
 } // UdrGuaControlConnection::actOnSystemMessage()
-#endif
 
 void
 UdrServerControlStream::actOnReceive(IpcConnection *conn)


[2/2] incubator-trafodion git commit: PR-1262 [TRAFOFION-2731] CodeCleanup: Phase5: Cleanup of common/PLatform.h and related code

Posted by an...@apache.org.
PR-1262 [TRAFOFION-2731] CodeCleanup: Phase5: Cleanup of common/PLatform.h and related code


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

Branch: refs/heads/master
Commit: 3fb2f9eb58902e4808394cfeb94a6adea639bf56
Parents: 6a00d4d d496f35
Author: Anoop Sharma <an...@esgyn.com>
Authored: Thu Oct 12 19:59:27 2017 +0000
Committer: Anoop Sharma <an...@esgyn.com>
Committed: Thu Oct 12 19:59:27 2017 +0000

----------------------------------------------------------------------
 core/conn/jdbc_type2/native/Debug.cpp     |  64 +++----
 core/sql/bin/SqlEsp_templ.cpp             |  85 ---------
 core/sql/bin/Sqlci_templ.cpp              | 132 --------------
 core/sql/bin/arkcmp.cpp                   |   3 -
 core/sql/bin/ex_esp_main.cpp              |   7 -
 core/sql/cli/sqlcli.h                     |   3 -
 core/sql/common/Ipc.cpp                   |  70 ++------
 core/sql/common/Ipc.h                     |  15 --
 core/sql/common/IpcGuardian.cpp           |   3 -
 core/sql/common/NAIpc.cpp                 |   2 -
 core/sql/common/Platform.h                | 229 +++----------------------
 core/sql/common/arkcmp_proc.cpp           |   3 -
 core/sql/common/charinfo.cpp              |  11 +-
 core/sql/common/ipcmsg.cpp                |   3 -
 core/sql/common/str.cpp                   |  12 +-
 core/sql/executor/BufferList.cpp          |  18 +-
 core/sql/executor/ExDupSqlBuffer.cpp      |  13 --
 core/sql/executor/SwapSpace.cpp           |  12 --
 core/sql/executor/ex_exe_stmt_globals.cpp |   8 -
 core/sql/executor/ex_frag_rt.cpp          |   3 -
 core/sql/executor/ex_mj.cpp               |  35 ----
 core/sql/nskgmake/arkcmp/Makefile         |   3 +-
 core/sql/nskgmake/arkcmp_dll/Makefile     |   5 +-
 core/sql/parser/sqlparser.y               |  20 +--
 core/sql/parser/ulexer.h                  |   5 -
 core/sql/sqlci/sqlci_lex.ll               |   8 -
 core/sql/udrserv/UdrStreams.cpp           |   2 -
 27 files changed, 87 insertions(+), 687 deletions(-)
----------------------------------------------------------------------