Commit 820a9c5f authored by unknown's avatar unknown
Browse files

Portability fixes:

 - Moved a few DBUG_ENTER statements after the variable declarations to satisfy some
   compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r) in ndb/src/common/portlib/NdbMutex.c
   and ndb/src/common/portlib/NdbThread.c
 - portability fix for FreeBSD 4.x and HPUX: replaced atoll() with strtoll() in 
   ndb/tools/config.cpp


ndb/src/common/portlib/NdbMutex.c:
   - Moved a few DBUG_ENTER statements after the variable declarations to satisfy some
     compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r)
ndb/src/common/portlib/NdbThread.c:
   - Moved a DBUG_ENTER statement after the variable declarations to satisfy some
     compilers (e.g. gcc-2.95.x, gcc-2.96, IBM xlc_r)
ndb/tools/config.cpp:
   - portability fix for FreeBSD 4.x and HPUX: replaced atoll() with strtoll()
parent bcaff837
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -23,9 +23,9 @@

NdbMutex* NdbMutex_Create(void)
{
  DBUG_ENTER("NdbMutex_Create");
  NdbMutex* pNdbMutex;
  int result;
  DBUG_ENTER("NdbMutex_Create");
  
  pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex));
  DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex));
@@ -42,8 +42,8 @@ NdbMutex* NdbMutex_Create(void)

int NdbMutex_Destroy(NdbMutex* p_mutex)
{
  DBUG_ENTER("NdbMutex_Destroy");
  int result;
  DBUG_ENTER("NdbMutex_Destroy");

  if (p_mutex == NULL)
    DBUG_RETURN(-1);
+1 −1
Original line number Diff line number Diff line
@@ -71,10 +71,10 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
		      const char* p_thread_name,
                      NDB_THREAD_PRIO thread_prio)
{
  DBUG_ENTER("NdbThread_Create");
  struct NdbThread* tmpThread;
  int result;
  pthread_attr_t thread_attr;
  DBUG_ENTER("NdbThread_Create");

  (void)thread_prio; /* remove warning for unused parameter */

+1 −1
Original line number Diff line number Diff line
@@ -359,7 +359,7 @@ Match::eval(NdbMgmHandle h, const Iter& iter)
  } 
  else if(iter.get(m_key, &val64) == 0)
  {
    if(atoll(m_value.c_str()) != val64)
    if(strtoll(m_value.c_str(), (char **)NULL, 10) != val64)
      return 0;
  }
  else if(iter.get(m_key, &valc) == 0)