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/09/07 01:54:57 UTC

[03/30] incubator-trafodion git commit: TRAFODION-2731 CodeCleanup: Remove obsolete, legacy and unused code

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qms/QmmQmm.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qms/QmmQmm.cpp b/core/sql/qms/QmmQmm.cpp
index 6cc2760..0c78e3a 100644
--- a/core/sql/qms/QmmQmm.cpp
+++ b/core/sql/qms/QmmQmm.cpp
@@ -81,11 +81,7 @@ void QmmGuaReceiveControlConnection::actOnSystemMessage
 
       case ZSYS_VAL_SMSG_CLOSE:
       case ZSYS_VAL_SMSG_PROCDEATH:
-#ifdef NA_LINUX
         qmm_->handleClientExit((short *)&(clientPhandle.phandle_), messageNum);
-#else
-        qmm_->handleClientExit(&clientPhandle.phandle_[0], messageNum);
-#endif
         if (connection)
           connection->setFatalError(NULL);  //@ZX
         break;
@@ -191,8 +187,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
   short result = 0;
   NABoolean qmpDied = FALSE;
 
-#ifdef NA_LINUX
-
   Int32 lc_pin;
   Int32 lc_cpu;
   Int32 lc_seg;
@@ -210,13 +204,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
      qmpDied = TRUE;
   }
 
-#else
-
-      result = PROCESSHANDLE_DECOMPOSE_(const_cast<short*>(phandle),
-                                          &cpu, &pin, &segmentNumber);
-  if (result)
-#endif
-
   if (!qmpDied)
     {
       // When a qms dies we are delivered a null connection pointer and handle.
@@ -231,7 +218,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
           qmsStub = qmsPool_[i];
           NABoolean processDoesNotExist = FALSE;
 
-#ifdef NA_LINUX
           char procName[200];
           short result = -1;
        
@@ -248,9 +234,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
           if (result || (lc_cpu < 0) || (lc_pin < 0))
             processDoesNotExist = TRUE;
 
-#else
-          processDoesNotExist = PROCESS_GETINFO_((short*)qmsStub->getProcessHandle()) == 4;
-#endif
           if (qmsStub->getStatus() == QmsStub::RUNNING && processDoesNotExist)
             {
               found = TRUE;
@@ -292,7 +275,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
       "*** Process %d,%d on segment %d has terminated, message=%d. ***",
                 cpu, pin, segmentNumber, messageNum);
 
-#ifdef NA_LINUX
   if (qmp_ && *qmp_ == *(SB_Phandle_Type *)phandle)
     {
       QRLogger::log(CAT_QR_IPC, LL_INFO,
@@ -300,15 +282,6 @@ void Qmm::handleClientExit(const short* phandle, short messageNum)
       qmp_->scheduleRestart();
     }
   else if (*getQmsStub(segmentNumber, cpu) == *(SB_Phandle_Type *)phandle)
-#else
-  if (qmp_ && *qmp_ == phandle)
-    {
-      QRLogger::log(CAT_QR_IPC, LL_ERROR,
-        "*** QMP has died, will attempt to restart...");
-      qmp_->scheduleRestart();
-    }
-  else if (*getQmsStub(segmentNumber, cpu) == phandle)
-#endif
     {
       // This probably never gets executed; process handle usually delivered
       // for a qms termination is null, and is handled in loop above that looks
@@ -342,7 +315,6 @@ void Qmm::allocateQms()
                                    /*qmsMsgStream_,*/ ipcEnv_, heap_);
 }
 
-#ifdef NA_LINUX
 void Qmm::allocateQmsPool()
 {
   short qmsInx = 0;
@@ -421,95 +393,6 @@ void Qmm::checkAndRetryQms(Int16 maxRetries, Int16 delaySeconds)
     }
 }
 
-#endif
-
-#ifdef NA_NSK
-void Qmm::allocateQmsPool()
-{
-  char segmentName[SEGMENT_NAME_LEN + 1];
-  short result;
-  short segmentNumber = 0;
-  short lastSegmentNumber = MAX_SEGMENTS;
-  short segmentNameLen;
-  do
-    {
-      //result = NODENUMBER_TO_NODENAME_(segmentNumber,(short*)segmentName);
-      result = NODENUMBER_TO_NODENAME_(lastSegmentNumber, segmentName,
-                                       SEGMENT_NAME_LEN, &segmentNameLen);
-      QRLogger::log(CAT_QR_IPC, LL_DEBUG,
-        "Result for segment %d is %d", lastSegmentNumber, result);
-      segmentName[segmentNameLen] = '\0';
-      if (result != 0)
-        lastSegmentNumber--;
-    }
-  while (lastSegmentNumber > 0 && result != 0);
-
-  assertLogAndThrow1(CAT_QR_IPC, LL_ERROR,
-                     lastSegmentNumber, QmmException,
-                     "No segments found, result for segment 1 is %d", result);
-  QRLogger::log(CAT_QR_IPC, LL_DEBUG,
-    "Last segment number found = %d", lastSegmentNumber);
-
-  short qmsInx = 0;
-  short cpu;
-  qmsCount_ = lastSegmentNumber * CPUS_PER_SEGMENT;
-  qmsPool_ = new(heap_) QmsStub*[qmsCount_];
-  UInt32 processorStatus;
-  Int32 processorsInSegment;
-  UInt32 processorBitmap;
-  for (segmentNumber = 1; segmentNumber <= lastSegmentNumber; segmentNumber++)
-    {
-      segmentNameLen = 0;  // make sure we have empty name if fail
-      result = NODENUMBER_TO_NODENAME_(segmentNumber, segmentName,
-                                       SEGMENT_NAME_LEN, &segmentNameLen);
-      segmentName[segmentNameLen] = '\0';
-      QRLogger::log(CAT_QR_IPC, LL_DEBUG,
-        "Segment %d: result=%d, name=%s", segmentNumber, result, segmentName);
-      if (result == 0)
-        {
-          // REMOTEPROCESSORSTATUS not available for NT, but not needed.
-          #ifdef NA_NSK 
-          processorStatus = REMOTEPROCESSORSTATUS(segmentNumber);
-          #else
-          processorStatus = PROCESSORSTATUS();
-          #endif
-          processorsInSegment = processorStatus>>16;
-          QRLogger::log(CAT_QR_IPC, LL_DEBUG,
-            "%d processors in segment %d", processorsInSegment, segmentNumber);
-          processorBitmap = processorStatus & 0x0000FFFF;
-
-          // Create a qms stub for each possible cpu in the cluster, including
-          // a placeholder for any missing cpu. If it is down, it could come on
-          // line later and we will be notified via a system message. If it is
-          // nonexistent (segment has fewer than 16 processors), we still include
-          // a slot for it to allow two-dimensional referencing of a particular
-          // qms stub using segment number and cpu number.
-          for (cpu = 0; cpu < CPUS_PER_SEGMENT; cpu++)
-            {
-              qmsPool_[qmsInx++] = 
-                        new(heap_) QmsStub(segmentNumber, segmentName,
-                                           cpu, result,
-                                           cpu < processorsInSegment,
-                                           processorBitmap & (0x00008000 >> cpu),
-                                           ipcEnv_, //qmsMsgStream_,
-                                           heap_);
-            }
-        }
-      else
-        {
-          // As with unreachable cpu of a reachable segment, we need slots for
-          // the cpus of a down segment in case it becomes available, and to
-          // allow for accurate indexing using seg#/cpu#.
-          qmsPool_[qmsInx++] = new(heap_) QmsStub(segmentNumber, segmentName,
-                                                  cpu, result,
-                                                  FALSE, FALSE, 
-                                                  ipcEnv_, //qmsMsgStream_, 
-                                                  heap_);
-        }
-    }
-}  // allocateQmsPool()
-#endif
-
 void Qmm::startQmp(short cpu)
 {
   if (qmp_)
@@ -519,28 +402,8 @@ void Qmm::startQmp(short cpu)
 
 NABoolean QmpStub::start()
 {
-#ifndef NA_WINNT
-
   char* baseProcName = MvQueryRewriteServer::getProcessName(IPC_SQLQMP_SERVER, NULL, cpu_);
 
-#ifdef NA_NSK
-  baseProcName = strrchr(baseProcName, '/');
-  if (baseProcName)
-  {
-     *baseProcName = '$';
-     short rc = 0;
-     short phandle[10];
-     rc = PROCESSSTRING_SCAN_(baseProcName, strlen(baseProcName), , phandle);
-
-     if (*phandle != -1)
-     {
-       QRLogger::log(CAT_QR_IPC, LL_INFO,
-         "qmm found existing qmp process, not starting new one.");
-         setProcessHandle(phandle);
-         return TRUE;
-     }
-  }
-#else
   SB_Phandle_Type *phandle;
   phandle = get_phandle_with_retry(baseProcName);
 
@@ -551,9 +414,6 @@ NABoolean QmpStub::start()
     setProcessHandle(*phandle);
     return TRUE;
   }
-#endif //NA_NSK
-
-#endif //NA_WINNT
 
   switch ((Int32)qmpStartOpt_)
     {
@@ -606,11 +466,7 @@ void QmpStub::allocateProcess(IpcEnvironment& ipcEnv, short cpu)
       
       QRLogger::log(CAT_QR_IPC, LL_DEBUG,
         "QMP process started on cpu #%d", qmpServer_->getServerId().getCpuNum());
-#ifdef NA_LINUX
       setProcessHandle(qmpServer_->getServerId().getPhandle().phandle_);
-#else
-      setProcessHandle(&qmpServer_->getServerId().getPhandle().phandle_[0]);
-#endif
     }
   else
     {
@@ -623,263 +479,6 @@ void QmpStub::allocateProcess(IpcEnvironment& ipcEnv, short cpu)
 //#pragma nowarn(770)   // warning elimination 
 void QmpStub::spawnProcess(IpcEnvironment& ipcEnv, short cpu) //, ComDiagsArea **diags, CollHeap *diagsHeap)
 {
-#ifdef NA_NSK
-  Lng32                           newPid;           // new OSS procid
-  Lng32                           nowaitTag;        // for nowait proc create
-  char                           *argv[5];         // argv for new process
-  char                           **envp = NULL;    // ptr to environment/NULL
-  zsys_ddl_fdinfo_def            fdinfo;           // duplicated file descs
-  zsys_ddl_fdentry_def           *fdentry = &fdinfo.z_fdentry; // array of ent.
- // const long                     numFileDescs = 1; // # entries in fdinfo
-  zsys_ddl_inheritance_def       inheritance;      // signal masks
-  zsys_ddl_processextension_def  processExtension; // create options
-  zsys_ddl_processresults_def    processResults;   // return values
-
-  char* progFileName;
-  const char* progName;
-  char progFileNameBuf[1000];
-  char defaultsName[1000];
-  Int32 defaultsNameLen = 0;  
-  Int32 retcode; 
-  Int32 nodeNameLen  = 0;
-  GuaErrorNumber guardianError;
- 
-  // variable that holds the mxmcp program name
-  char                         mxcmpVerProg[9]; 
-  short                        cmpVersion; 
-  char                         drcliname[9];
-  char                         drclipname[9];
-  
-  char valueBuf[128];
-  short valueBufLen;
-  
-  progName = "mxqmp";
-
-#pragma nowarn(1506)   // warning elimination 
-  short progNameLen = str_len(progName);
-#pragma warn(1506)  // warning elimination 
-  char localSegmentName[SEGMENT_NAME_LEN + 1];
-  short localSegmentNameLen;
-  short result = NODENUMBER_TO_NODENAME_(-1,localSegmentName,
-                                         SEGMENT_NAME_LEN,
-                                         &localSegmentNameLen);
-  assertLogAndThrow1(CAT_QR_IPC, LL_ERROR,
-                     result==0, QmmException,
-                     "Could not get name of local segment, error is %d", result);
-  localSegmentName[localSegmentNameLen] = '\0';
-
-  str_cpy(&defaultsName[defaultsNameLen], localSegmentName, localSegmentNameLen);
-  defaultsNameLen += localSegmentNameLen;
-  defaultsName[defaultsNameLen] = '.';
-  defaultsNameLen++;
-  // now the program file looks like "\node."
-  
-  // now add the default subvolume for program files, "$SYSTEM.SYSTEM."
-  str_cpy(&defaultsName[defaultsNameLen],"$SYSTEM.SYSTEM",14);
-  //assert(defaultsNameLen+15 < IpcMaxGuardianPathNameLength);
-  defaultsNameLen += 14;
-
-  char overridingDefineForProgFile[] = "=_MX_QMP_PROG_FILE_NAME";
-  Int32 overridingDefineLen = str_len(overridingDefineForProgFile);
-
-  char* progfileFromEnvvar = NULL;
-#ifndef NDEBUG
-  progfileFromEnvvar = 
-    getenv((overridingDefineForProgFile[0] == '=') 
-	    ? &overridingDefineForProgFile[1]
-	    : overridingDefineForProgFile);
-#endif
-  if (progfileFromEnvvar != NULL)
-    {
-      str_pad(progFileNameBuf, IpcMaxGuardianPathNameLength, '\0');
-      strcpy(progFileNameBuf, progfileFromEnvvar);
-      progFileName = progFileNameBuf;
-    }
-  else
-    {
-      //// If the define for downrev compiler subvolume is set, check that and
-      //// change the defaultsName to point to that subvolume instead.
-      //if (cmpVersion != COM_VERS_MXV)
-      //{
-      //  char dummy1[16];
-      //  char dummy2[16];
-      //  char dummy3[24];
-      //  short progdefnamelen = 0;
-      //  if (DEFINEINFO("=_MX_CMP_DR_SUBVOL      ",
-      //		 dummy1,
-      //		 dummy2,
-      //		 dummy3,
-      //		 24,
-      //		 &progdefnamelen) == 0)
-      //    {
-      //      str_pad(defaultsName, 1000, '\0');
-      //      strcpy(defaultsName, "=_MX_CMP_DR_SUBVOL      ");
-      //      defaultsNameLen = 24;
-      //    }
-      //}
-
-      // correcting overridingDefineForProgFile with correct Node name     
-      char overridingDefineValue[36];
-      short overridingDefineValueLen = 0;
-      retcode = ComRtGetDefine((char *)overridingDefineForProgFile,
-		               overridingDefineValue,
-			       sizeof(overridingDefineValue),
-			       overridingDefineValueLen);
-      if (retcode == 0)
-      {
-        // Extract filename and volume/subvolume name from the define
-        // value which is in the form \\NODENAME.$VOL.SUBVOL.FILENAME
-	char *fileNameFromDefineValue;
-	short index = overridingDefineValueLen;
-	while (overridingDefineValue[index] != '.' && index >= 0)
-	  index--;
-	fileNameFromDefineValue = &overridingDefineValue[index+1];
-
-	char *volSubvolFromDefineValue =
-          str_chr(overridingDefineValue, '$');
-	overridingDefineValue[index] = '\0';  // replace '.' before file
-	                                      // name with '\0'
-
-        ComRtDeleteDefine((char *)overridingDefineForProgFile);
-        ComRtAddDefine((char *)overridingDefineForProgFile,
-		       fileNameFromDefineValue,
-		       NULL, // local nodename will be assumed
-		       volSubvolFromDefineValue);
-      }
-
-      if (( retcode = guardianError= 
-	    FILENAME_RESOLVE_((char*) progName,
-			      progNameLen,
-			      valueBuf,
-			      128,
-			      &valueBufLen,
-			      32 + 8, // allow DEFINEs
-			      (char *) overridingDefineForProgFile,
-#pragma nowarn(1506)   // warning elimination 
-			      overridingDefineLen,
-#pragma warn(1506)  // warning elimination 
-			      NULL, // no search
-			      0,
-			      defaultsName,
-#pragma nowarn(1506)   // warning elimination 
-			      defaultsNameLen) ) == 0 )
-#pragma warn(1506)  // warning elimination 
-	
-	{
-	  short pathLen; // a dummy
-	  
-	  // We got a Guardian name for the object file (must be an
-	  // executable OSS program file in the /G directory)
-	  retcode = guardianError = FILENAME_TO_PATHNAME_(valueBuf,
-						   valueBufLen,
-						   progFileNameBuf,
-						   1000,
-						   &pathLen);
-	  if (guardianError == 0)
-	    // success, we converted the cheat define to an OSS name
-	    progFileName = progFileNameBuf;
-          else
-            assertLogAndThrow3(CAT_QMM, LL_ERROR,
-                               FALSE, QmmException,
-                               "Error %d returned from FILENAME_TO_PATHNAME_ "
-                               "for file name %.*s",
-                               guardianError, valueBufLen, valueBuf);
-	}
-      else
-        assertLogAndThrow3(CAT_QMM, LL_ERROR,
-                           FALSE, QmmException,
-                           "Error %d returned from FILENAME_RESOLVE_ "
-                           "for file name %s",
-                           guardianError, progNameLen, progName);
-
-    }
-
-  progFileName[IpcMaxGuardianPathNameLength-1] = 0;  // limit length
-  QRLogger::log(CAT_QMM, LL_DEBUG,
-    "spawn: using prog file name %s", progFileName);
-
-  // ---------------------------------------------------------------------
-  // Prepare input parameters for PROCESS_SPAWN_
-  // ---------------------------------------------------------------------
-
-  // argv first
-  argv[0] = (char *) progName;
-  argv[1] = "-oss";
-  argv[2] = NULL;
- 
-  Lng32 structLen     = sizeof(fdinfo);
-  str_pad((char *) &fdinfo,structLen,0);
-  fdinfo.z_len       = structLen;
-  fdinfo.z_timeout   = 7200; // wait at most 2 hour
-  fdinfo.z_umask     = -1;
-  fdinfo.z_fdcount   = 0;
-  fdentry[0].z_fd    = 0;
-  fdentry[0].z_dupfd = 0;
-  fdentry[0].z_name  = (zsys_ddl_char_extaddr_def) 0;
-  fdentry[0].z_oflag = 0;
-  fdentry[0].z_mode = 0;
-
-  // use the environment from ipc environment
-  envp = ipcEnv.getEnvVars();
-
-  // initialize inheritance struct (all zeroes for now)
-  str_pad((char*)&inheritance, sizeof(inheritance), 0);
-
-  // input parameters for process attributes
-  str_pad((char *) &processExtension, sizeof(processExtension), 0);
-  processExtension.z_len = sizeof(processExtension);
-  processExtension.z_memorypages = -1;
-  processExtension.z_jobid = -1;
-  processExtension.z_priority = IPC_PRIORITY_DONT_CARE;
-  processExtension.z_cpu = cpu;
-  processExtension.z_mainstackmax = 4 * 1024 * 1024;  // 4 MB of main stack
-  processExtension.z_heapmax      = 384 * 1024 * 1024; // 384 MB heap max
-
-  // Can't call getServerProcessName() in the IPC code to get the process name,
-  // it returns a Guardian process name.
-  char* qmpProcName = MvQueryRewriteServer::getProcessName(IPC_SQLQMP_SERVER,
-                                                           NULL, cpu, heap_);
-  processExtension.z_nameoptions = 1;
-  processExtension.z_processname = (zsys_ddl_char_extaddr_def)qmpProcName;
-
-  // debugQmp_ is initialized to FALSE; usually we will break here when debugging
-  // qmm and modify the value so it will launch qmp in the debugger.
-  if (debugQmp_)
-    {
-      processExtension.z_debugoptions |=
-      ZSYS_VAL_PCREATOPT_RUND | 
-      ZSYS_VAL_PCREATOPT_SAVEABEND |
-      ZSYS_VAL_PCREATOPT_INSPECT;
-    }
-  
-  // identify length of return structure
-  str_pad((char *) &processResults, sizeof(processResults), 0);
-  processResults.z_len = sizeof(processResults);
-
-  newPid = PROCESS_SPAWN_(
-       progFileName,
-       &fdinfo,
-       argv,
-       envp,
-       &inheritance,
-       sizeof(inheritance),
-       &processExtension,
-       &processResults,
-       -1,  // nowait
-       NULL);
-
-  //populateDiagsAreaFromTPCError(*diags,diagsHeap);
-  assertLogAndThrow3(CAT_QR_IPC, LL_ERROR,
-                     processResults.z_errno == 0, QmmException,
-                     "Attempt to spawn QMP process failed: "
-                     "error = %d, tpcerror = %d, tcpdetail = %d",
-                     processResults.z_errno,
-                     processResults.z_tpcerror,
-                     processResults.z_tpcdetail);
-
-  setProcessHandle((short*)processResults.z_phandle.u_z_data.z_word);
-
-#elif defined (NA_LINUX)
    SB_Phandle_Type p_handle;
    const char* progFile = "tdm_arkqmp";
 
@@ -928,84 +527,7 @@ void QmpStub::spawnProcess(IpcEnvironment& ipcEnv, short cpu) //, ComDiagsArea *
                         NULL);   /* pid */
 
   setProcessHandle(p_handle);
-
-#else
-  launchNSKLiteProcess(ipcEnv, cpu);
-#endif
-}
-
-#ifdef NA_WINNT
-void QmpStub::launchNSKLiteProcess(IpcEnvironment& ipcEnv, short p_pe)
-{
-  // a character string with the program file name
-  const Int32                    maxLengthOfCommandLineArgs = 32;
-  char                         progFileName[(IpcMaxGuardianPathNameLength +
-	                                         maxLengthOfCommandLineArgs)];
-
-  // parameters to NSKProcessCreate
-  NSK_PORT_HANDLE	p_phandle;
-
-  // -----------------------------------------------------------------
-  // create the program file name from the class name and the overriding
-  // define name.
-  //
-  // for now, we form the name from an environment variable. if the
-  // environment variable is not present then we form the name from
-  // the class name. we look for environment variables of the form
-  // =_ARK_???_PROG_FILE_NAME
-  //
-  // names which are formed from class names are hard coded below.
-  //
-  // the long term plan is to form the name from the registry while allowing
-  // overrides for development and debugging purposes only
-  // 
-  // note we REQUIRE the name to be identical on each PE !!!
-  // -----------------------------------------------------------------
-
-  strcpy(progFileName, "tdm_arkqmp.exe");
-
-  // ---------------------------------------------------------------------
-  // Set the run time arguments in the command line
-  // ---------------------------------------------------------------------
-  strcat(progFileName, " -guardian");
-
-  // ---------------------------------------------------------------------
-  // start a new process on the specified PE with the specified
-  // program file
-  // ---------------------------------------------------------------------
-
-  // use the environment from ipc environment
-  void* envp = ipcEnv.getEnvVars();
-  Lng32 envpLen = ipcEnv.getEnvVarsLen();
-  Lng32 procCreateError = NSKProcessCreate
-    ((char*)&progFileName			// command string
-     , NORMAL_PRIORITY_CLASS                    // priority
-     , p_pe					// pe (aka cpu)
-     , &p_phandle			        // lpNSKphandle
-     , 0 					// portclass - devtype 0 == process
-     , 0 					// portsubclass - devsubtype 0
-     , NAMED_AUTO			        // nmopt $RECEIVE
-     , NULL					// pr_name
-     , NULL					// process_desc    ?????
-     , -1			        // waited
-     , USE_CALLER_ENV		                // create_options
-     , NULL					// env_block
-     , 0					// env_block_size
-     , 0					// pfs_size
-     , NULL					// lph my port
-     );
-  
-   //if (getenv("SQL_MSGBOX_PROCESS") != NULL)
-   //  {
-   //    MessageBox( NULL, "Requester: Process Launched", (CHAR *)&progFileName, MB_OK|MB_ICONINFORMATION );
-   //  };
-  
-  assertLogAndThrow1(CAT_QR_IPC, LL_ERROR,
-                     procCreateError == NO_ERROR, QmmException,
-                     "Attempt to launch NSKLite process failed with error %d",
-                     procCreateError);
 }
-#endif
 
 void Qmm::relayPendingPubsToQms()
 {
@@ -1288,10 +810,6 @@ void QRProcessStub::checkRestarts()
 
 void QRProcessStub::nullProcessHandle()
 {
-#ifndef NA_LINUX
-  for (Int32 i=0; i<10; i++)
-    processHandle_[i] = -1;
-#endif
 }
 
 QmsStub::QmsStub(short segmentNumber, char* segmentName, short cpuNumber,
@@ -1384,11 +902,7 @@ NABoolean QmsStub::start()
       qmsMsgStream_->addRecipient(qmsServer_->getControlConnection());
       status_ = RUNNING;
 
-#ifdef NA_LINUX
       setProcessHandle(qmsServer_->getServerId().getPhandle().phandle_);
-#else
-      setProcessHandle(&qmsServer_->getServerId().getPhandle().phandle_[0]);
-#endif
       QRLogger::log(CAT_QR_IPC, LL_DEBUG,
         "QMS process started on cpu #%d", qmsServer_->getServerId().getCpuNum());
       MvQueryRewriteServer::initQms(qmsServer_, heap_);

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qms/QmmQmm.h
----------------------------------------------------------------------
diff --git a/core/sql/qms/QmmQmm.h b/core/sql/qms/QmmQmm.h
index 0413d53..d8073eb 100644
--- a/core/sql/qms/QmmQmm.h
+++ b/core/sql/qms/QmmQmm.h
@@ -29,9 +29,6 @@
 #include "QRLogger.h"
 #include "Collections.h"
 
-#ifndef NA_LINUX
-#include <zsysc.h>
-#else
 #include "seabed/fs.h"
 #include "seabed/ms.h"
 #include "seabed/int/opts.h"
@@ -43,7 +40,6 @@ extern "C" {
 #include "zsysc.h"
 }
 
-#endif
 
 // Classes defined in this file.
 class QmmException;
@@ -226,7 +222,6 @@ class QRProcessStub : public NABasicObject
     virtual ~QRProcessStub()
       {}
 
-#ifdef NA_LINUX
     Int32 operator==(SB_Phandle_Type ph) const
       {
         return !memcmp((char*)&processHandle_, (char*)&ph, sizeof(SB_Phandle_Type));
@@ -241,35 +236,6 @@ class QRProcessStub : public NABasicObject
       {
         memcpy(&processHandle_, &ph, sizeof(SB_Phandle_Type));
       }
-#else
-    //int operator==(const zsys_ddl_phandle_def& ph) const
-    Int32 operator==(const short* ph) const
-      {
-        // @ZXros -- following won't compile now on Windows. Used in Qmm::handleClientExit() to see who died.
-#ifdef NA_NSK
-        //return !strncmp(processHandle_.u_z_data.z_byte, ph.u_z_data.z_byte, 20);
-        return !memcmp((char*)processHandle_, (char*)ph, 20);
-                        //sizeof(zsys_ddl_phandle_def));
-#else
-        return 0;
-#endif
-      }
-
-    const short* getProcessHandle() const
-      {
-        return &processHandle_[0];
-      }
-
-    //void setProcessHandle(const zsys_ddl_phandle_def& ph)
-    void setProcessHandle(const short* ph)
-      {
-        //processHandle_ = ph;
-        memcpy((char*)processHandle_, (char*)ph, 20);
-          //sizeof(zsys_ddl_phandle_def));// zsys_ddl_phandle_def_Size);
-      }
-
-#endif
-
     Int64 getLockoutEndTS() const
       {
         return lockoutEndTS_;
@@ -289,11 +255,7 @@ class QRProcessStub : public NABasicObject
     void setLockout();
 
     //zsys_ddl_phandle_def processHandle_;
-#ifdef NA_LINUX
     SB_Phandle_Type processHandle_;
-#else
-    short processHandle_[10];
-#endif
     Int64 lockoutEndTS_;
     Lng32 retryNumber_;
     CollHeap* heap_;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qms/QmsMain.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qms/QmsMain.cpp b/core/sql/qms/QmsMain.cpp
index ba10d74..1d438b9 100644
--- a/core/sql/qms/QmsMain.cpp
+++ b/core/sql/qms/QmsMain.cpp
@@ -32,14 +32,12 @@
 #include "QueryRewriteServer.h"
 #include "QRIpc.h"
 
-#if defined (NA_LINUX)
 #include "nsk/nskport.h"
 #include "seabed/ms.h"
 #include "seabed/fs.h"
 extern void my_mpi_fclose();
 #include "SCMVersHelp.h"
 DEFINE_DOVERS(tdm_arkqms)
-#endif
 
 /**
  * \file
@@ -66,16 +64,13 @@ static QmsGuaReceiveControlConnection* initializeIPC(IpcEnvironment*& env)
   return conn;
 }
 
-#ifdef NA_LINUX
 extern "C"
 {
 Int32 sq_fs_dllmain();
 }
-#endif
 
 Int32 main(Int32 argc, char *argv[])
 {
-#ifdef NA_LINUX
   dovers(argc, argv);
 
   try
@@ -93,7 +88,6 @@ Int32 main(Int32 argc, char *argv[])
     exit(1);
   }
   // LCOV_EXCL_STOP
-#endif
 
   NABoolean performSMDInit = FALSE;
   NABoolean performXMLInit = FALSE;
@@ -103,13 +97,6 @@ Int32 main(Int32 argc, char *argv[])
   // from a command-line in the shell that defines the env var.
   //Sleep(30000);
 
-#ifdef NA_WINNT
-  if (getenv("QMS_MSGBOX_PROCESS") != NULL)
-  {
-    MessageBox( NULL, "QMS Process Launched", (CHAR *)argv[0], MB_OK|MB_ICONINFORMATION );
-  };
-#endif
-
   QRLogger::instance().setModule(QRLogger::QRL_QMS);
   QRLogger::instance().initLog4cxx("log4cxx.qms.config");
  
@@ -126,11 +113,7 @@ Int32 main(Int32 argc, char *argv[])
 
   // If invoked via the message interface, -oss will be the program
   // parameter after the program name.
-#if defined (NA_WINNT) || defined (NA_LINUX)
   NABoolean commandLineInterface = (strncmp(argv[1], "-guardian", 9) != 0);
-#else
-  NABoolean commandLineInterface = (strncmp(argv[1], "-oss", 4) != 0);
-#endif
 
   // For message interface, initialize IPC so it will return to qmm from the
   // process creation code before we begin qms initialization.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qms/QmsRequest.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qms/QmsRequest.cpp b/core/sql/qms/QmsRequest.cpp
index f262aee..f074b9b 100644
--- a/core/sql/qms/QmsRequest.cpp
+++ b/core/sql/qms/QmsRequest.cpp
@@ -23,10 +23,6 @@
 
 #include "Platform.h" // Must precede zsysc.h or weird errors occur
 
-#ifndef NA_LINUX
-#include <zsysc.h>
-#endif
-
 #include "QmsRequest.h"
 #include "QmsQms.h"
 #include "QmsInitializer.h"
@@ -35,14 +31,6 @@
 using namespace QR;
 #define XML_BUFF_SIZE 32768
 
-#ifdef NA_NSK
-extern "C" 
-{
-  #include "cextdecs.h(PROCESSHANDLE_TO_FILENAME_, \
-                       PROCESSHANDLE_GETMINE_,     \
-                       PROCESS_GETINFO_)"
-}
-#elif defined (NA_LINUX)
 #include "seabed/fs.h"
 #include "seabed/ms.h"
 #include "seabed/int/opts.h"
@@ -53,7 +41,6 @@ extern "C" {
 #include "cextdecs/cextdecs.h"
 #include "zsysc.h"
 }
-#endif
 
 QRMessageRequest::~QRMessageRequest()
 {
@@ -182,22 +169,9 @@ void QRCommandLineRequest::getNextParameter(NAString& param)
 QmsGuaReceiveControlConnection::QmsGuaReceiveControlConnection(IpcEnvironment* env)
   : GuaReceiveControlConnection(env)
 {
-#ifndef NA_LINUX
-  // Get the name of this qms process.
-  short myProcHandle[10];
-  short actualLen;
-  PROCESSHANDLE_GETMINE_(myProcHandle);
-  PROCESSHANDLE_TO_FILENAME_(myProcHandle, procName_,
-                             PROCESSNAME_STRING_LEN, &actualLen);
-  procName_[actualLen] = '\0';
-#else // (NA_LINUX)
-
   memset(procName_, 0, sizeof(procName_));
   short retval = msg_mon_get_my_process_name(procName_, sizeof(procName_) - 1);
 
-#endif
-
-
   // If the process is "unnamed" (i.e., the name is not one we assign to a
   // public qms), mark it as private, so we'll know to terminate if we get a
   // close message.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qmscommon/QRDescriptor.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qmscommon/QRDescriptor.cpp b/core/sql/qmscommon/QRDescriptor.cpp
index a683702..1d2830f 100644
--- a/core/sql/qmscommon/QRDescriptor.cpp
+++ b/core/sql/qmscommon/QRDescriptor.cpp
@@ -1749,11 +1749,7 @@ void QRNumericVal::setNumericVal(Int64 unscaledVal, Int32 scale)
   // the new value.
   snprintf(buf, 
           sizeof(buf),
-          #ifdef NA_64BIT
           "%0*ld",
-          #else
-          "%0*Ld",
-          #endif // NA_64BIT
           scale + (unscaledVal < 0),  // add one for sign if negative
           unscaledVal);
   stringRep_ = buf;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/qmscommon/QRQueries.cpp
----------------------------------------------------------------------
diff --git a/core/sql/qmscommon/QRQueries.cpp b/core/sql/qmscommon/QRQueries.cpp
index 833a230..1d143ef 100644
--- a/core/sql/qmscommon/QRQueries.cpp
+++ b/core/sql/qmscommon/QRQueries.cpp
@@ -39,20 +39,7 @@
 /* Size specific types used here */
 typedef int             Int32;
 typedef unsigned int    UInt32;
-#if defined(NA_LINUX) && defined(NA_64BIT)
 typedef long Int64;
-#else
-typedef long long int Int64;
-#endif
-
-#undef SQLCLI_LIB_FUNC
-
-	#define SQLCLI_LIB_FUNC
-#ifdef NA_64BIT
-  /* dg64 - get rid of __declspec */
-  #undef SQLCLI_LIB_FUNC
-  #define SQLCLI_LIB_FUNC
-#endif
 
 #ifdef __cplusplus
 extern "C"
@@ -849,7 +836,6 @@ enum SQLSTATS_TYPE {
   SQLCLI_NO_STATS      = 0,
   /* SQLCLI_DEFAULT_STATS means the statistics is merged based on the statistics view type */
   SQLCLI_DEFAULT_STATS = 0, 
-  SQLCLI_MEASURE_STATS = 1,     
   SQLCLI_ACCUMULATED_STATS = 2, 
   SQLCLI_PERTABLE_STATS   = 3,  
   SQLCLI_ALL_STATS     = 4,
@@ -1202,38 +1188,32 @@ enum PREPARE_FLAGS
   PREPARE_NOT_A_NEW_OPERATION = 0x0020
 };
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AddModule (
-		/*IN*/ SQLMODULE_ID * module_name);
-
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ADDMODULE (
-		/*IN*/ SQLMODULE_ID * module_name);
-
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AllocDesc (
+Int32  SQL_EXEC_AllocDesc (
 	        /*INOUT*/ SQLDESC_ID * desc_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ALLOCDESC (
+Int32  SQL_EXEC_ALLOCDESC (
 	        /*INOUT*/ SQLDESC_ID * desc_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AllocDescBasic (
+Int32  SQL_EXEC_AllocDescBasic (
 	        /*INOUT*/ SQLDESC_ID * desc_id,
 		/*IN OPTIONAL*/ Int32  max_entries);
 
 
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AssocFileNumber (
+Int32  SQL_EXEC_AssocFileNumber (
                 /*IN*/ SQLSTMT_ID * statement_id,
 	        /*IN*/ short        file_number);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ASSOCFILENUMBER (
+Int32  SQL_EXEC_ASSOCFILENUMBER (
                 /*IN*/ SQLSTMT_ID * statement_id,
 	        /*IN*/ short        file_number);
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_GetDiskMaxSize (
+Int32  SQL_EXEC_GetDiskMaxSize (
 		/*IN*/ char *volname,
 		/*OUT*/ Int64 *totalCapacity,
 		/*OUT*/ Int64 *totalFreespace);
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_GetListOfDisks (
+Int32  SQL_EXEC_GetListOfDisks (
 	       	/*IN/OUT*/ char *diskBuf,
 		/* OUT */ Int32 *numTSEs,
 		/* OUT */ Int32 *maxTSELength,
@@ -1241,180 +1221,170 @@ SQLCLI_LIB_FUNC Int32  SQL_EXEC_GetListOfDisks (
 		);
 
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AllocStmt (
+Int32  SQL_EXEC_AllocStmt (
 		/*INOUT*/ SQLSTMT_ID * new_statement_id,
 		/*IN OPTIONAL*/ SQLSTMT_ID * cloned_statement);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ALLOCSTMT (
+Int32  SQL_EXEC_ALLOCSTMT (
 		/*INOUT*/ SQLSTMT_ID * new_statement_id,
 		/*IN OPTIONAL*/ SQLSTMT_ID * cloned_statement);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_AllocStmtForRS (
+Int32  SQL_EXEC_AllocStmtForRS (
                 /*IN*/ SQLSTMT_ID *callStmtId,
                 /*IN*/ Int32  resultSetIndex,
                 /*INOUT*/ SQLSTMT_ID *resultSetStmtId);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ALLOCSTMTFORRS (
+Int32  SQL_EXEC_ALLOCSTMTFORRS (
                 /*IN*/ SQLSTMT_ID *callStmtId,
                 /*IN*/ Int32  resultSetIndex,
                 /*INOUT*/ SQLSTMT_ID *resultSetStmtId);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_ClearDiagnostics (/*IN*/ SQLSTMT_ID *statement_id);
+Int32  SQL_EXEC_ClearDiagnostics (/*IN*/ SQLSTMT_ID *statement_id);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_CLEARDIAGNOSTICS (/*IN*/ SQLSTMT_ID *statement_id);
+Int32  SQL_EXEC_CLEARDIAGNOSTICS (/*IN*/ SQLSTMT_ID *statement_id);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_CLI_VERSION ();
+Int32  SQL_EXEC_CLI_VERSION ();
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_CloseStmt (
+Int32  SQL_EXEC_CloseStmt (
 		/*IN*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_CLOSESTMT (
+Int32  SQL_EXEC_CLOSESTMT (
 		/*IN*/ SQLSTMT_ID * statement_id);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_CreateContext(/*OUT*/ SQLCTX_HANDLE * context_handle,
 			    /*IN OPTIONAL*/ char* sqlAuthId, 
 			    /*IN OPTIONAL*/ Int32  suppressAutoXactStart);
   
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_CREATECONTEXT(/*OUT*/ SQLCTX_HANDLE * context_handle,
 			    /*IN OPTIONAL*/ char* sqlAuthId, 
 			    /*IN OPTIONAL*/ Int32  suppressAutoXactStart);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_CurrentContext(/*OUT*/ SQLCTX_HANDLE * contextHandle);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_CURRENTCONTEXT(/*OUT*/ SQLCTX_HANDLE * contextHandle);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_DeleteContext(/*IN*/ SQLCTX_HANDLE contextHandle);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_DELETECONTEXT(/*IN*/ SQLCTX_HANDLE contextHandle);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_ResetContext(/*IN*/ SQLCTX_HANDLE contextHandle, /*IN*/ void *contextMsg);
 
 
-SQLCLI_LIB_FUNC
 Int32  SQL_EXEC_RESETCONTEXT(/*IN*/ SQLCTX_HANDLE contextHandle, /*IN*/ void *contextMsg);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_DeallocDesc (
+Int32  SQL_EXEC_DeallocDesc (
 		/*IN*/ SQLDESC_ID * desc_id );
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_DEALLOCDESC (
+Int32  SQL_EXEC_DEALLOCDESC (
 		/*IN*/ SQLDESC_ID * desc_id );
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_DeallocStmt (
+Int32  SQL_EXEC_DeallocStmt (
 		/*IN*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_DEALLOCSTMT (
+Int32  SQL_EXEC_DEALLOCSTMT (
 		/*IN*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32  SQL_EXEC_DefineDesc (
+Int32  SQL_EXEC_DefineDesc (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN* (SQLWHAT_DESC) */ Int32 what_descriptor,
 		/*IN*/ SQLDESC_ID * sql_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DEFINEDESC (
+Int32 SQL_EXEC_DEFINEDESC (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN* (SQLWHAT_DESC) */ Int32 what_descriptor,
 		/*IN*/ SQLDESC_ID * sql_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DescribeStmt (
+Int32 SQL_EXEC_DescribeStmt (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DESCRIBESTMT (
+Int32 SQL_EXEC_DESCRIBESTMT (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC
 Int32 SQL_EXEC_DisassocFileNumber(/*IN*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC
 Int32 SQL_EXEC_DISASSOCFILENUMBER(/*IN*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DropContext (
+Int32 SQL_EXEC_DropContext (
 		/*IN*/ SQLCTX_HANDLE context_handle );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DROPCONTEXT (
+Int32 SQL_EXEC_DROPCONTEXT (
 		/*IN*/ SQLCTX_HANDLE context_handle );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Exec (
+Int32 SQL_EXEC_Exec (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_EXEC (
+Int32 SQL_EXEC_EXEC (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ExecClose (
+Int32 SQL_EXEC_ExecClose (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_EXECCLOSE (
+Int32 SQL_EXEC_EXECCLOSE (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ExecDirect(
+Int32 SQL_EXEC_ExecDirect(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_EXECDIRECT (
+Int32 SQL_EXEC_EXECDIRECT (
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ExecDirectDealloc(
+Int32 SQL_EXEC_ExecDirectDealloc(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_EXECDIRECTDEALLOC(
+Int32 SQL_EXEC_EXECDIRECTDEALLOC(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ExecFetch(
+Int32 SQL_EXEC_ExecFetch(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_EXECFETCH(
+Int32 SQL_EXEC_EXECFETCH(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ClearExecFetchClose(
+Int32 SQL_EXEC_ClearExecFetchClose(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
@@ -1423,7 +1393,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_ClearExecFetchClose(
 		/*IN*/ Int32 num_total_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_CLEAREXECFETCHCLOSE(
+Int32 SQL_EXEC_CLEAREXECFETCHCLOSE(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * input_descriptor,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
@@ -1433,63 +1403,63 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_CLEAREXECFETCHCLOSE(
 		/*IN*/ struct SQLCLI_PTR_PAIRS input_ptr_pairs[],
 		/*IN*/ struct SQLCLI_PTR_PAIRS output_ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Fetch(
+Int32 SQL_EXEC_Fetch(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_FETCH(
+Int32 SQL_EXEC_FETCH(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_FetchClose(
+Int32 SQL_EXEC_FetchClose(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_FETCHCLOSE(
+Int32 SQL_EXEC_FETCHCLOSE(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN OPTIONAL*/ SQLDESC_ID * output_descriptor,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_FetchMultiple(/*IN*/ SQLSTMT_ID * statement_id,
+Int32 SQL_EXEC_FetchMultiple(/*IN*/ SQLSTMT_ID * statement_id,
                             /*IN  OPTIONAL*/ SQLDESC_ID * output_descriptor,
                             /*IN*/                 Int32 rowset_size,
                             /*IN*/                 Int32 * rowset_status_ptr,
                             /*OUT*/                Int32 * rowset_nfetched,
                             /*IN*/                 Int32 num_quadruple_fields,
                                             ...);
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_FETCHMULTIPLE(/*IN*/ SQLSTMT_ID * statement_id,
+Int32 SQL_EXEC_FETCHMULTIPLE(/*IN*/ SQLSTMT_ID * statement_id,
                             /*IN  OPTIONAL*/ SQLDESC_ID * output_descriptor,
                             /*IN*/                 Int32 rowset_size,
                             /*IN*/                 Int32 * rowset_status_ptr,
                             /*OUT*/                Int32 * rowset_nfetched,
                             /*IN*/                 Int32 num_quadruple_fields,
                             /*IN*/   struct SQLCLI_QUAD_FIELDS   quad_fields[]);
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Cancel (
+Int32 SQL_EXEC_Cancel (
 		/*IN OPTIONAL*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_CANCEL (
+Int32 SQL_EXEC_CANCEL (
 		/*IN OPTIONAL*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescEntryCount(
+Int32 SQL_EXEC_GetDescEntryCount(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDESCENTRYCOUNT(
+Int32 SQL_EXEC_GETDESCENTRYCOUNT(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescEntryCountBasic(
+Int32 SQL_EXEC_GetDescEntryCountBasic(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*OUT*/ Int32 * num_entries);
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescItem(
+Int32 SQL_EXEC_GetDescItem(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 entry,
 		/*IN* (SQLDESC_ITEM_ID) */ Int32 what_to_get,
@@ -1499,7 +1469,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescItem(
 		/*OUT OPTIONAL*/ Int32 * len_of_item,
 		/*IN OPTIONAL*/ Int32 start_from_offset);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDESCITEM(
+Int32 SQL_EXEC_GETDESCITEM(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 entry,
 		/*IN* (SQLDESC_ITEM_ID) */ Int32 what_to_get,
@@ -1509,37 +1479,37 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDESCITEM(
 		/*OUT OPTIONAL*/ Int32 * len_of_item,
 		/*IN OPTIONAL*/ Int32 start_from_offset);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescItems(
+Int32 SQL_EXEC_GetDescItems(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ITEM desc_items[],
 		/*IN*/ SQLDESC_ID * value_num_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDESCITEMS(
+Int32 SQL_EXEC_GETDESCITEMS(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ITEM desc_items[],
 		/*IN*/ SQLDESC_ID * value_num_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescItems2(
+Int32 SQL_EXEC_GetDescItems2(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 no_of_desc_items,
 		/*IN*/ SQLDESC_ITEM desc_items[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDESCITEMS2(
+Int32 SQL_EXEC_GETDESCITEMS2(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 no_of_desc_items,
 		/*IN*/ SQLDESC_ITEM desc_items[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsStmtInfo(
+Int32 SQL_EXEC_GetDiagnosticsStmtInfo(
 		/*IN*/ Int32 *stmt_info_items,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSSTMTINFO(
+Int32 SQL_EXEC_GETDIAGNOSTICSSTMTINFO(
 		/*IN*/ Int32 *stmt_info_items,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsStmtInfo2(
+Int32 SQL_EXEC_GetDiagnosticsStmtInfo2(
 		/*IN OPTIONAL*/ SQLSTMT_ID * statement_id,
 		/*IN* (SQLDIAG_STMT_INFO_ITEM_ID) */ Int32 what_to_get,
 		/*OUT OPTIONAL*/ void * numeric_value,
@@ -1547,7 +1517,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsStmtInfo2(
 		/*IN OPTIONAL*/ Int32 max_string_len,
 		/*OUT OPTIONAL*/ Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSSTMTINFO2(
+Int32 SQL_EXEC_GETDIAGNOSTICSSTMTINFO2(
 		/*IN OPTIONAL*/ SQLSTMT_ID * statement_id,
 		/*IN* (SQLDIAG_STMT_INFO_ITEM_ID) */ Int32 what_to_get,
 		/*OUT OPTIONAL*/ void * numeric_value,
@@ -1555,17 +1525,17 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSSTMTINFO2(
 		/*IN OPTIONAL*/ Int32 max_string_len,
 		/*OUT OPTIONAL*/ Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsCondInfo(
+Int32 SQL_EXEC_GetDiagnosticsCondInfo(
 		/*IN*/ SQLDIAG_COND_INFO_ITEM *cond_info_items,
 		/*IN*/ SQLDESC_ID * cond_num_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO(
+Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO(
 		/*IN*/ SQLDIAG_COND_INFO_ITEM *cond_info_items,
 		/*IN*/ SQLDESC_ID * cond_num_descriptor,
 		/*IN*/ SQLDESC_ID * output_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsCondInfo2(
+Int32 SQL_EXEC_GetDiagnosticsCondInfo2(
 		/*IN* (SQLDIAG_COND_INFO_ITEM_ID) */ Int32 what_to_get,
 		/*IN*/ Int32 conditionNum,
 		/*OUT OPTIONAL*/ Int32 * numeric_value,
@@ -1573,7 +1543,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDiagnosticsCondInfo2(
 		/*IN OPTIONAL */ Int32 max_string_len,
 		/*OUT OPTIONAL*/ Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO2(
+Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO2(
 		/*IN* (SQLDIAG_COND_INFO_ITEM_ID) */ Int32 what_to_get,
 		/*IN*/ Int32 conditionNum,
 		/*OUT OPTIONAL*/ Int32 * numeric_value,
@@ -1581,64 +1551,64 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO2(
 		/*IN OPTIONAL */ Int32 max_string_len,
 		/*OUT OPTIONAL*/ Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC	Int32 SQL_EXEC_GetDiagnosticsCondInfo3 (
+Int32 SQL_EXEC_GetDiagnosticsCondInfo3 (
 		/*IN*/ Int32 no_of_condition_items,
 		/*IN*/ SQLDIAG_COND_INFO_ITEM_VALUE
 			  diag_cond_info_item_values[]);
 
-SQLCLI_LIB_FUNC	Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO3 (
+Int32 SQL_EXEC_GETDIAGNOSTICSCONDINFO3 (
 		/*IN*/ Int32 no_of_condition_items,
 		/*IN*/ SQLDIAG_COND_INFO_ITEM_VALUE
 			  diag_cond_info_item_values[]);
 
 /* This function retrieves the SQLSTATE from the statement diagnostics area
    if possible */  
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetMainSQLSTATE(
+Int32 SQL_EXEC_GetMainSQLSTATE(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/  Int32 sqlcode,
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETMAINSQLSTATE(
+Int32 SQL_EXEC_GETMAINSQLSTATE(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/  Int32 sqlcode,
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetCSQLSTATE(
+Int32 SQL_EXEC_GetCSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */,
 		/*IN*/  Int32 sqlcode);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETCSQLSTATE(
+Int32 SQL_EXEC_GETCSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */,
 		/*IN*/  Int32 sqlcode);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetCobolSQLSTATE(
+Int32 SQL_EXEC_GetCobolSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[5] */,
 		/*IN*/  Int32 sqlcode);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETCOBOLSQLSTATE(
+Int32 SQL_EXEC_GETCOBOLSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[5] */,
 		/*IN*/  Int32 sqlcode);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetSQLSTATE(
+Int32 SQL_EXEC_GetSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETSQLSTATE(
+Int32 SQL_EXEC_GETSQLSTATE(
 		/*OUT*/ char * sqlstate /* assumed to be char[6] */);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetSessionAttr(
+Int32 SQL_EXEC_GetSessionAttr(
 		/*IN* (SESSIONATTR_TYPE) */ Int32 attrName,
 		/*OUT OPTIONAL*/        Int32 * numeric_value,
 		/*OUT OPTIONAL*/        char * string_value,
 		/*IN OPTIONAL*/         Int32 max_string_len,
 		/*OUT OPTIONAL*/        Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC	Int32 SQL_EXEC_GetUniqueQueryIdAttrs (
+Int32 SQL_EXEC_GetUniqueQueryIdAttrs (
                 /*IN*/    char * uniqueQueryId,
 		/*IN*/    Int32 uniqueQueryIdLen,
 		/*IN*/    Int32 no_of_attrs,
 		/*INOUT*/ UNIQUEQUERYID_ATTR unique_queryid_attrs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStmtAttr(
+Int32 SQL_EXEC_GetStmtAttr(
                 /*IN*/                  SQLSTMT_ID * statement_id,
 		/*IN* (SQLATTR_TYPE) */ Int32 attrName,
 		/*OUT OPTIONAL*/        Int32 * numeric_value,
@@ -1646,7 +1616,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStmtAttr(
 		/*IN OPTIONAL*/         Int32 max_string_len,
 		/*OUT OPTIONAL*/        Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETSTMTATTR(
+Int32 SQL_EXEC_GETSTMTATTR(
                 /*IN*/                  SQLSTMT_ID * statement_id,
 		/*IN* (SQLATTR_TYPE) */ Int32 attrName,
 		/*OUT OPTIONAL*/        Int32 * numeric_value,
@@ -1654,19 +1624,19 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETSTMTATTR(
 		/*IN OPTIONAL*/         Int32 max_string_len,
 		/*OUT OPTIONAL*/        Int32 * len_of_item);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStmtAttrs(
+Int32 SQL_EXEC_GetStmtAttrs(
                 /*IN*/                  SQLSTMT_ID * statement_id,
                 /*IN*/                  Int32 number_of_attrs,
 		/*INOUT*/               SQLSTMT_ATTR attrs[],
 		/*OUT OPTIONAL*/        Int32 * num_returned);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETSTMTATTRS(
+Int32 SQL_EXEC_GETSTMTATTRS(
                 /*IN*/                  SQLSTMT_ID * statement_id,
                 /*IN*/                  Int32 number_of_attrs,
 		/*INOUT*/               SQLSTMT_ATTR attrs[],
 		/*OUT OPTIONAL*/        Int32 * num_returned);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETMPCATALOG(
+Int32 SQL_EXEC_GETMPCATALOG(
 		/*IN*/    char * AnsiObjName,
 		/*INOUT*/ char * MPObjName,
 		/*IN*/    Int32 MPObjNameMaxLen,
@@ -1675,28 +1645,28 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GETMPCATALOG(
 		/*IN*/    Int32 MPCatalogNameMaxLen,
 		/*OUT*/   Int32 * MPCatalogNameLen);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetPfsSize(
+Int32 SQL_EXEC_GetPfsSize(
 		/*OUT*/ Int32 *pfsSize,
 		/*OUT*/ Int32 *pfsCurUse,
                 /*OUT*/ Int32 *pfsMaxUse);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_CleanUpPfsResources();
+Int32 SQL_EXEC_CleanUpPfsResources();
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GoAway(
+Int32 SQL_EXEC_GoAway(
                 /*IN*/ SQLDESC_ID * tableNameDesc);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GOAWAY(
+Int32 SQL_EXEC_GOAWAY(
                 /*IN*/ SQLDESC_ID * tableNameDesc);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Prepare(
+Int32 SQL_EXEC_Prepare(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_PREPARE(
+Int32 SQL_EXEC_PREPARE(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLDESC_ID * sql_source);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Prepare2(
+Int32 SQL_EXEC_Prepare2(
      /*IN*/    SQLSTMT_ID * statement_id,
      /*IN*/    SQLDESC_ID * sql_source,
      /*INOUT*/ char * gencode_ptr,
@@ -1708,157 +1678,157 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_Prepare2(
      /*INOUT*/ Int32 * uniqueQueryIdLen,
      /*IN*/    UInt32 flags);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ResDescName(
+Int32 SQL_EXEC_ResDescName(
 		/*INOUT*/ SQLDESC_ID * statement_id,
 		/*IN OPTIONAL*/ SQLSTMT_ID * from_statement,
 		/*IN OPTIONAL (SQLWHAT_DESC) */ Int32 what_desc);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_RESDESCNAME(
+Int32 SQL_EXEC_RESDESCNAME(
 		/*INOUT*/ SQLDESC_ID * statement_id,
 		/*IN OPTIONAL*/ SQLSTMT_ID * from_statement,
 		/*IN OPTIONAL (SQLWHAT_DESC) */ Int32 what_desc);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_ResStmtName(
+Int32 SQL_EXEC_ResStmtName(
 		/*INOUT*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_RESSTMTNAME(
+Int32 SQL_EXEC_RESSTMTNAME(
 		/*INOUT*/ SQLSTMT_ID * statement_id);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetCursorName(
+Int32 SQL_EXEC_SetCursorName(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLSTMT_ID * cursor_name);
 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETCURSORNAME(
+Int32 SQL_EXEC_SETCURSORNAME(
 		/*IN*/ SQLSTMT_ID * statement_id,
 		/*IN*/ SQLSTMT_ID * cursor_name);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescEntryCount(
+Int32 SQL_EXEC_SetDescEntryCount(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETDESCENTRYCOUNT(
+Int32 SQL_EXEC_SETDESCENTRYCOUNT(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescEntryCountBasic(
+Int32 SQL_EXEC_SetDescEntryCountBasic(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 num_entries);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescItem(
+Int32 SQL_EXEC_SetDescItem(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 entry,
 		/*IN* (SQLDESC_ITEM_ID) */ Int32 what_to_set, 
 		/*IN OPTIONAL*/ long   numeric_value,
 		/*IN OPTIONAL*/ char * string_value);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETDESCITEM(
+Int32 SQL_EXEC_SETDESCITEM(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 entry,
 		/*IN* (SQLDESC_ITEM_ID) */ Int32 what_to_set,
 		/*IN OPTIONAL*/ long   numeric_value,
 		/*IN OPTIONAL*/ char * string_value);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescItems(
+Int32 SQL_EXEC_SetDescItems(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ITEM desc_items[],
 		/*IN*/ SQLDESC_ID * value_num_descriptor,
 		/*IN*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETDESCITEMS(
+Int32 SQL_EXEC_SETDESCITEMS(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ SQLDESC_ITEM desc_items[],
 		/*IN*/ SQLDESC_ID * value_num_descriptor,
 		/*IN*/ SQLDESC_ID * input_descriptor);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescItems2(
+Int32 SQL_EXEC_SetDescItems2(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 no_of_desc_items,
 		/*IN*/ SQLDESC_ITEM desc_items[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETDESCITEMS2(
+Int32 SQL_EXEC_SETDESCITEMS2(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 no_of_desc_items,
 		/*IN*/ SQLDESC_ITEM desc_items[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescPointers(
+Int32 SQL_EXEC_SetDescPointers(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 starting_entry,
 		/*IN*/ Int32 num_ptr_pairs,
                 ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETDESCPOINTERS(
+Int32 SQL_EXEC_SETDESCPOINTERS(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 starting_entry,
 		/*IN*/ Int32 num_ptr_pairs,
 		/*IN*/ struct SQLCLI_PTR_PAIRS ptr_pairs[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetRowsetDescPointers(SQLDESC_ID * desc_id,
+Int32 SQL_EXEC_SetRowsetDescPointers(SQLDESC_ID * desc_id,
                                            Int32 rowset_size,
                                            Int32 *rowset_status_ptr,
                                            Int32 starting_entry,
                                            Int32 num_quadruple_fields,
                                            ...);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETROWSETDESCPOINTERS(SQLDESC_ID * desc_id,
+Int32 SQL_EXEC_SETROWSETDESCPOINTERS(SQLDESC_ID * desc_id,
                                            Int32 rowset_size,
                                            Int32 *rowset_status_ptr,
                                            Int32 starting_entry,
                                            Int32 num_quadruple_fields,
                              struct SQLCLI_QUAD_FIELDS    quad_fields[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetStmtAttr(
+Int32 SQL_EXEC_SetStmtAttr(
                 /*IN*/                  SQLSTMT_ID * statement_id,
 		/*IN* (SQLATTR_TYPE) */ Int32 attrName,
 		/*IN OPTIONAL*/         Int32 numeric_value,
 		/*IN OPTIONAL*/         char * string_value);
 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETSTMTATTR(
+Int32 SQL_EXEC_SETSTMTATTR(
                 /*IN*/                  SQLSTMT_ID * statement_id,
 		/*IN* (SQLATTR_TYPE) */ Int32 attrName,
 		/*IN OPTIONAL*/         Int32 numeric_value,
 		/*IN OPTIONAL*/         char * string_value);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SwitchContext(
+Int32 SQL_EXEC_SwitchContext(
 		/*IN*/ SQLCTX_HANDLE context_handle,
 		/*OUT OPTIONAL*/ SQLCTX_HANDLE * prev_context_handle);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SWITCHCONTEXT(
+Int32 SQL_EXEC_SWITCHCONTEXT(
 		/*IN*/ SQLCTX_HANDLE context_handle,
 		/*OUT OPTIONAL*/ SQLCTX_HANDLE * prev_context_handle);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_Xact(
+Int32 SQL_EXEC_Xact(
 		/*IN* (SQLTRANS_COMMAND) */ Int32 command,
 		/*OUT OPTIONAL*/ SQLDESC_ID * transid_descriptor); 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_XACT(
+Int32 SQL_EXEC_XACT(
 		/*IN* (SQLTRANS_COMMAND) */ Int32 command,
 		/*OUT OPTIONAL*/ SQLDESC_ID * transid_descriptor); 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetAuthIDNew(
+Int32 SQL_EXEC_SetAuthIDNew(
 	/*IN*/                          char   * authID,
 	/*IN*/                          char   * credentials,
 	/* OUT Logon role name */       char   * logonRoleName,
 	/* OUT Logon role name len */   short  * logonRoleNameLen,
-	/* OUT User redef time       */ Int64  * redefTime);  // NA_64BIT
+	/* OUT User redef time       */ Int64  * redefTime);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetAuthID(
+Int32 SQL_EXEC_SetAuthID(
 	/*IN*/                          char   * authID,
 	/*IN SQLAUTHID_TYPE */          Int32    authIDType,
 	/* OUT Primary role name */     char   * primaryRoleName,
 	/* OUT Primary role name len */ short  * primaryRoleNameLen,
-        /* OUT User redef time       */ Int64  * redefTime);  // NA_64BIT
+        /* OUT User redef time       */ Int64  * redefTime);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SETAUTHID(
+Int32 SQL_EXEC_SETAUTHID(
 		/*IN*/                        char   * authID,
 		/*IN SQLAUTHID_TYPE */ Int32 authIDType,
 		/* OUT OPTIONAL primaryRole*/ char *primaryRole,
 		/* OUT OPTIONAL  role len*/ short *primaryRoleLen,
-                /* OUT OPTIONAL userRedefTime*/ Int64 *redefTime); // NA_64BIT
+                /* OUT OPTIONAL userRedefTime*/ Int64 *redefTime);
 
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_DecodeAndFormatKey(
+Int32 SQL_EXEC_DecodeAndFormatKey(
                /*IN*/void    * RCB_Pointer_Addr,    
 	       /*IN*/void    * KeyAddr,             
 	       /*IN*/Int32     KeyLength,          
@@ -1867,14 +1837,14 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_DecodeAndFormatKey(
 	       /*IN*/Int32     FormattedKeyBufLen,  
 	       /*OUT*/Int32  * NeededKeyBufLen  );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetPartitionKeyFromRow(
+Int32 SQL_EXEC_GetPartitionKeyFromRow(
 	       /*IN*/void    * RCB_Pointer_Addr,    
 	       /*IN*/void    * Row_Addr,          
 	       /*IN*/Int32     Row_Length,        
 	       /*INOUT*/void * KeyAddr,
 	       /*IN*/Int32     KeyLength);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_LocaleToUTF8 (
+Int32 SQL_EXEC_LocaleToUTF8 (
                /*IN*/Int32 conv_charset,
                /*IN*/void     * Input_Buffer_Addr,
                /*IN*/Int32      Input_Buffer_Length,
@@ -1886,7 +1856,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_LocaleToUTF8 (
                /*OUT*/Int32   * num_translated_char
    );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_UTF8ToLocale(
+Int32 SQL_EXEC_UTF8ToLocale(
                /*IN*/Int32 conv_charset,
                /*IN*/void     * Input_Buffer_Addr,
                /*IN*/Int32      Input_Buffer_Length,
@@ -1900,7 +1870,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_UTF8ToLocale(
                /*IN*/void     * substitution_char_addr
    );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_LocaleToUTF16 (
+Int32 SQL_EXEC_LocaleToUTF16 (
                /*IN*/Int32      conv_charset,
                /*IN*/void     * Input_Buffer_Addr,
                /*IN*/Int32      Input_Buffer_Length,
@@ -1913,7 +1883,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_LocaleToUTF16 (
                /*OUT*/Int32   * num_translated_char
    );
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_UTF16ToLocale(
+Int32 SQL_EXEC_UTF16ToLocale(
                /*IN*/Int32 conv_charset,
                /*IN*/void     * Input_Buffer_Addr,
                /*IN*/Int32      Input_Buffer_Length,
@@ -1927,7 +1897,7 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_UTF16ToLocale(
                /*OUT*/Int32   * num_translated_char,
                /*IN*/void     * substitution_char_addr
    );
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStatistics2(
+Int32 SQL_EXEC_GetStatistics2(
             /* IN */  	short statsReqType,
 	    /* IN */  	char *statsReqStr,
 	    /* IN */  	Int32 statsReqStrLen,
@@ -1938,14 +1908,14 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStatistics2(
 	    /* IN */ 	Int32 max_stats_desc,
 	    /* OUT */	Int32 *no_returned_stats_desc);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetStatisticsItems(
+Int32 SQL_EXEC_GetStatisticsItems(
             /* IN */  	short statsReqType,
 	    /* IN */  	char *queryId,
 	    /* IN */  	Int32 queryIdLen,
             /* IN */	Int32 no_of_stats_items,
 	    /* IN/OUT */   SQLSTATS_ITEM sqlstats_items[]);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetChildQueryInfo(
+Int32 SQL_EXEC_GetChildQueryInfo(
      /*IN*/    SQLSTMT_ID * statement_id,
      /*INOUT*/ char * uniqueQueryId,
      /*IN */   Int32 uniqueQueryIdMaxLen,
@@ -1959,15 +1929,15 @@ SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetChildQueryInfo(
 
 /* temporary functions -- for use by sqlcat simulator only */
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_AllocDesc (
+Int32 SQL_EXEC_AllocDesc (
 	        /*INOUT*/ SQLDESC_ID * desc_id,
 		/*IN OPTIONAL*/ Int32 max_entries);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_GetDescEntryCount(
+Int32 SQL_EXEC_GetDescEntryCount(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*OUT*/ Int32 * num_entries);
 
-SQLCLI_LIB_FUNC Int32 SQL_EXEC_SetDescEntryCount(
+Int32 SQL_EXEC_SetDescEntryCount(
 		/*IN*/ SQLDESC_ID * sql_descriptor,
 		/*IN*/ Int32 num_entries);
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/regress/compGeneral/EXPECTED006.SB
----------------------------------------------------------------------
diff --git a/core/sql/regress/compGeneral/EXPECTED006.SB b/core/sql/regress/compGeneral/EXPECTED006.SB
index aeed2f1..0caed73 100644
--- a/core/sql/regress/compGeneral/EXPECTED006.SB
+++ b/core/sql/regress/compGeneral/EXPECTED006.SB
@@ -940,16 +940,6 @@
 
 --- SQL operation complete.
 >>
->>control query default VALIDATE_RFORK_REDEF_TS 'ON';
-
---- SQL operation complete.
->>prepare xx from select * from t006t7;
-
---- SQL command prepared.
->>control query default VALIDATE_RFORK_REDEF_TS reset;
-
---- SQL operation complete.
->>
 >>control query default COMP_BOOL_108 'OFF';
 
 --- SQL operation complete.

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/regress/compGeneral/TEST006
----------------------------------------------------------------------
diff --git a/core/sql/regress/compGeneral/TEST006 b/core/sql/regress/compGeneral/TEST006
index 153e310..e31054f 100644
--- a/core/sql/regress/compGeneral/TEST006
+++ b/core/sql/regress/compGeneral/TEST006
@@ -440,10 +440,6 @@ control query default OVERRIDE_SYSKEY 'ON';
 prepare xx from select * from t006t7;
 control query default OVERRIDE_SYSKEY reset;
 
-control query default VALIDATE_RFORK_REDEF_TS 'ON';
-prepare xx from select * from t006t7;
-control query default VALIDATE_RFORK_REDEF_TS reset;
-
 control query default COMP_BOOL_108 'OFF';
 prepare xx from select * from t006t2, t006t3 where log(t006t2.a)  =  log(t006t3.a);
 control query default COMP_BOOL_108 reset;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/regress/executor/EXPECTED020
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED020 b/core/sql/regress/executor/EXPECTED020
index a41f8e8..a8bdc64 100644
--- a/core/sql/regress/executor/EXPECTED020
+++ b/core/sql/regress/executor/EXPECTED020
@@ -107,7 +107,6 @@ A            B
      4001              0          1          0          1
      4023              0          1          0          1
      4039              0          1          0          1
-     4419              0          1          0          4
      8436              0          1          0          0
      8550             30          1         60          0
      8550             31          1         60          0
@@ -175,7 +174,6 @@ A            B
      4001              0          1          0          1
      4023              0          1          0          1
      4039              0          1          0          1
-     4419              0          1          0          4
      8436              0          1          0          0
      8550             30          1         60          0
      8550             31          1         60          0
@@ -242,7 +240,6 @@ A            B
      4001              0          1          0          1
      4023              0          1          0          1
      4039              0          1          0          1
-     4419              0          1          0          4
      8436              0          1          0          0
      8550             30          1         60          0
      8550             31          1         60          0
@@ -310,7 +307,6 @@ A            B
      4001              0          1          0          1
      4023              0          1          0          1
      4039              0          1          0          1
-     4419              0          1          0          4
      8436              0          1          0          0
      8550             30          1         60          0
      8550             31          1         60          0

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/1522c8cd/core/sql/regress/hive/EXPECTED009
----------------------------------------------------------------------
diff --git a/core/sql/regress/hive/EXPECTED009 b/core/sql/regress/hive/EXPECTED009
index e318532..90250a7 100644
--- a/core/sql/regress/hive/EXPECTED009
+++ b/core/sql/regress/hive/EXPECTED009
@@ -214,7 +214,7 @@ A            B            C
 >>invoke t009hivecust1;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.T009HIVECUST1
--- Definition current  Wed Jul 12 21:37:45 2017
+-- Definition current  Tue Sep  5 08:23:44 2017
 
   (
     SYSKEY                           LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -263,7 +263,7 @@ A            B            C
 >>invoke t009hivecust2;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.T009HIVECUST2
--- Definition current  Wed Jul 12 21:37:55 2017
+-- Definition current  Tue Sep  5 08:23:55 2017
 
   (
     SYSKEY                           LARGEINT NO DEFAULT NOT NULL NOT DROPPABLE
@@ -434,7 +434,7 @@ T009T2
 >>invoke hive.sch_t009.t009t1;
 
 -- Definition of hive table T009T1
--- Definition current  Wed Jul 12 21:39:07 2017
+-- Definition current  Tue Sep  5 08:25:19 2017
 
   (
     A                                INT
@@ -516,7 +516,7 @@ ROW_ID      COLS
 >>invoke bblike1;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.BBLIKE1
--- Definition current  Wed Jul 12 21:39:20 2017
+-- Definition current  Tue Sep  5 08:25:34 2017
 
   (
     ROW_ID                           VARCHAR(100) CHARACTER SET ISO88591
@@ -533,7 +533,7 @@ ROW_ID      COLS
 >>invoke bblike2;
 
 -- Definition of Trafodion table TRAFODION.HIVE_T009.BBLIKE2
--- Definition current  Wed Jul 12 21:39:25 2017
+-- Definition current  Tue Sep  5 08:25:40 2017
 
   (
     ROW_ID                           VARCHAR(100) CHARACTER SET ISO88591
@@ -572,7 +572,7 @@ ROW_ID      COLS
 >>invoke hive.hive.store_sales;
 
 -- Definition of hive table STORE_SALES
--- Definition current  Wed Jul 12 21:39:32 2017
+-- Definition current  Tue Sep  5 08:25:49 2017
 
   (
     SS_SOLD_DATE_SK                  INT
@@ -633,7 +633,6 @@ DESCRIPTION
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
-  statement_index ...... ###
   affinity_value ....... ###
   max_max_cardinality    ###
   total_overflow_size    ###
@@ -917,7 +916,7 @@ DESCRIPTION
 >>invoke hive.hive.date_dim;
 
 -- Definition of hive table DATE_DIM
--- Definition current  Wed Jul 12 21:39:40 2017
+-- Definition current  Tue Sep  5 08:25:55 2017
 
   (
     D_DATE_SK                        INT
@@ -1001,7 +1000,7 @@ CREATE TABLE DATE_DIM
 ;
 
 REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.DATE_DIM;
-/* ObjectUID = 5537310018384739180 */
+/* ObjectUID = 1585406280815125826 */
 
 /* Trafodion DDL */
 
@@ -1080,7 +1079,6 @@ DESCRIPTION
   fragment_id ............ 0
   parent_frag ............ (none)
   fragment_type .......... master
-  statement_index ...... ###
   affinity_value ....... ###
   max_max_cardinality    ###
   total_overflow_size    ###
@@ -1152,7 +1150,7 @@ DESCRIPTION
 >>invoke hive.hive.date_dim;
 
 -- Definition of hive table DATE_DIM
--- Definition current  Wed Jul 12 21:39:56 2017
+-- Definition current  Tue Sep  5 08:26:10 2017
 
   (
     D_DATE_SK                        INT
@@ -1236,7 +1234,7 @@ CREATE TABLE DATE_DIM
 ;
 
 REGISTER /*INTERNAL*/ HIVE TABLE HIVE.HIVE.DATE_DIM;
-/* ObjectUID = 5537310018384739180 */
+/* ObjectUID = 1585406280815125826 */
 
 /* Trafodion DDL */
 
@@ -1288,8 +1286,6 @@ CREATE EXTERNAL TABLE DATE_DIM
 --- SQL operation complete.
 >>prepare s from select * from hive.hive.date_dim where d_date = date '2016-01-27';
 
-*** WARNING[6008] Statistics for column (D_DATE) from table HIVE.HIVE.DATE_DIM were not available. As a result, the access path chosen might not be the best possible.
-
 --- SQL command prepared.
 >>explain options 'p' s;