From 6e5eda0314e1c1aa9f6277a2e042b57e5d078c24 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 9 Jul 2004 13:28:52 +0200 Subject: [PATCH] Irix64 mipspro ndb compile fixes --- ndb/src/cw/cpcd/CPCD.cpp | 5 +++-- ndb/src/cw/cpcd/Process.cpp | 8 ++++---- ndb/src/mgmclient/CommandInterpreter.cpp | 21 ++++++++++++--------- ndb/src/ndbapi/NdbDictionaryImpl.cpp | 4 ++++ ndb/tools/desc.cpp | 5 +++-- 5 files changed, 26 insertions(+), 17 deletions(-) diff --git a/ndb/src/cw/cpcd/CPCD.cpp b/ndb/src/cw/cpcd/CPCD.cpp index f2878b7dea1..40a5fd49493 100644 --- a/ndb/src/cw/cpcd/CPCD.cpp +++ b/ndb/src/cw/cpcd/CPCD.cpp @@ -351,8 +351,9 @@ CPCD::loadProcessList(){ sess.loadFile(); loadingProcessList = false; + size_t i; Vector temporary; - for(size_t i = 0; ireadPid(); if(proc->m_processType == TEMPORARY){ @@ -360,7 +361,7 @@ CPCD::loadProcessList(){ } } - for(size_t i = 0; i ulimit; m_ulimit.split(ulimit); - for(size_t i = 0; i 0 && set_ulimit(ulimit[i]) != 0){ _exit(1); } @@ -286,7 +286,7 @@ CPCD::Process::do_exec() { BaseString * redirects[] = { &m_stdin, &m_stdout, &m_stderr }; int fds[3]; - for(int i = 0; i<3; i++){ + for(i = 0; i<3; i++){ if(redirects[i]->empty()){ #ifndef DEBUG dup2(fd, i); @@ -319,7 +319,7 @@ CPCD::Process::do_exec() { } /* Close all filedescriptors */ - for(int i = STDERR_FILENO+1; i < getdtablesize(); i++) + for(i = STDERR_FILENO+1; i < getdtablesize(); i++) close(i); execv(m_path.c_str(), argv); diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 061ae3be8f0..fe9be9bcd44 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -634,7 +634,8 @@ CommandInterpreter::executeHelp(char* parameters) void CommandInterpreter::executeShow(char* parameters) -{ +{ + int i; connect(); if (emptyString(parameters)) { ndbout << "Cluster Configuration" << endl @@ -652,7 +653,7 @@ CommandInterpreter::executeShow(char* parameters) api_nodes = 0, mgm_nodes = 0; - for(int i=0; i < state->no_of_nodes; i++) { + for(i=0; i < state->no_of_nodes; i++) { switch(state->node_states[i].node_type) { case NDB_MGM_NODE_TYPE_API: api_nodes++; @@ -673,7 +674,7 @@ CommandInterpreter::executeShow(char* parameters) << " NDB Node(s)" << endl; - for(int i=0; i < state->no_of_nodes; i++) { + for(i=0; i < state->no_of_nodes; i++) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_NDB) { ndbout << "DB node:\t" << state->node_states[i].node_id; if(state->node_states[i].version != 0) { @@ -695,7 +696,7 @@ CommandInterpreter::executeShow(char* parameters) << " API Node(s)" << endl; - for(int i=0; i < state->no_of_nodes; i++) { + for(i=0; i < state->no_of_nodes; i++) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_API) { ndbout << "API node:\t" << state->node_states[i].node_id; if(state->node_states[i].version != 0) { @@ -716,7 +717,7 @@ CommandInterpreter::executeShow(char* parameters) << " MGM Node(s)" << endl; - for(int i=0; i < state->no_of_nodes; i++) { + for(i=0; i < state->no_of_nodes; i++) { if(state->node_states[i].node_type == NDB_MGM_NODE_TYPE_MGM) { ndbout << "MGM node:\t" << state->node_states[i].node_id; if(state->node_states[i].version != 0) { @@ -759,6 +760,7 @@ CommandInterpreter::executeShow(char* parameters) void CommandInterpreter::executeClusterLog(char* parameters) { + int i; connect(); if (parameters != 0 && strlen(parameters) != 0) { enum ndb_mgm_clusterlog_level severity = NDB_MGM_CLUSTERLOG_ALL; @@ -846,10 +848,10 @@ CommandInterpreter::executeClusterLog(char* parameters) ndbout << "Cluster logging is disabled." << endl; - for(int i = 0; i<7;i++) + for(i = 0; i<7;i++) printf("enabled[%d] = %d\n", i, enabled[i]); ndbout << "Severities enabled: "; - for(int i = 1; i < 7; i++) { + for(i = 1; i < 7; i++) { if(enabled[i]) ndbout << names[i] << " "; } @@ -1298,14 +1300,15 @@ CommandInterpreter::executeLog(int processId, return; } int len=0; - for(Uint32 i=0; i; template class Vector >; +template class Vector; +template class Vector; +template class Bitmask<4>; + diff --git a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp index a5ff11edca9..e5b98c4c8e9 100644 --- a/ndb/tools/desc.cpp +++ b/ndb/tools/desc.cpp @@ -73,7 +73,8 @@ int main(int argc, const char** argv){ ndbout << "-- Indexes -- " << endl; ndbout << "PRIMARY KEY("; - for (unsigned j= 0; j < pTab->getNoOfPrimaryKeys(); j++) + unsigned j; + for (j= 0; j < pTab->getNoOfPrimaryKeys(); j++) { const NdbDictionary::Column * col = pTab->getColumn(j); ndbout << col->getName(); @@ -82,7 +83,7 @@ int main(int argc, const char** argv){ } ndbout << ") - UniqueHashIndex" << endl; - for (unsigned j= 0; j < list.count; j++) { + for (j= 0; j < list.count; j++) { NdbDictionary::Dictionary::List::Element& elt = list.elements[j]; const NdbDictionary::Index *pIdx = dict->getIndex(elt.name, argv[i]); if (!pIdx){