[SCM] OCE packaging branch, debian, updated. debian/0.11-1

tpaviot tpaviot at gmail.com
Thu Dec 13 19:16:43 UTC 2012


The following commit has been merged in the debian branch:
commit 4a1888ce5c2e87f013c185a91110a9507d4286f3
Author: tpaviot <tpaviot at gmail.com>
Date:   Thu Nov 8 17:36:55 2012 +0100

    Use initptr_t under Win/mingw64 (sizeof(long)<sizeof(void*))

diff --git a/inc/TDF_LabelMapHasher.lxx b/inc/TDF_LabelMapHasher.lxx
index 38cb925..b63ff58 100644
--- a/inc/TDF_LabelMapHasher.lxx
+++ b/inc/TDF_LabelMapHasher.lxx
@@ -35,7 +35,7 @@
 inline         Standard_Integer TDF_LabelMapHasher::HashCode
 //#endif
 (const TDF_Label& aLab, const Standard_Integer Upper) 
-{ return 1 + ( (int) (labs((long int) aLab.myLabelNode) % Upper) ); }
+{ return 1 + ( (int) (labs((intptr_t) aLab.myLabelNode) % Upper) ); }
 
  
 //=======================================================================
diff --git a/src/OSD/OSD_DirectoryIterator.cxx b/src/OSD/OSD_DirectoryIterator.cxx
index 5ad4912..d2c19e2 100644
--- a/src/OSD/OSD_DirectoryIterator.cxx
+++ b/src/OSD/OSD_DirectoryIterator.cxx
@@ -208,7 +208,7 @@ OSD_DirectoryIterator :: OSD_DirectoryIterator (
                          ) {
 
  myFlag   = Standard_False;
- myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
+ myHandle = ( intptr_t )INVALID_HANDLE_VALUE;
 
  where.SystemName ( myPlace );
 
@@ -223,7 +223,7 @@ void OSD_DirectoryIterator :: Destroy () {
 
  if ( myData != NULL ) HeapFree (  GetProcessHeap (), 0, myData  );
 
- if (  myHandle != ( Standard_Integer )INVALID_HANDLE_VALUE  )
+ if (  myHandle != ( intptr_t )INVALID_HANDLE_VALUE  )
 
   FindClose (  ( HANDLE )myHandle  );
 
@@ -231,7 +231,7 @@ void OSD_DirectoryIterator :: Destroy () {
 
 Standard_Boolean OSD_DirectoryIterator :: More () {
 
- if (  myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE  ) {
+ if (  myHandle == ( intptr_t )INVALID_HANDLE_VALUE  ) {
  
   TCollection_AsciiString wc = myPlace + TEXT( "/" ) + myMask;
 
@@ -239,11 +239,11 @@ Standard_Boolean OSD_DirectoryIterator :: More () {
             GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS, sizeof ( WIN32_FIND_DATA )
            );
 
-  myHandle = ( Standard_Integer )FindFirstFile (
+  myHandle = ( intptr_t )FindFirstFile (
                                   wc.ToCString (), ( PWIN32_FIND_DATA )myData
                                  );
 
-  if (  myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE  )
+  if (  myHandle == ( intptr_t )INVALID_HANDLE_VALUE  )
   
    _osd_wnt_set_error ( myError, OSD_WDirectoryIterator );
   
@@ -259,7 +259,7 @@ Standard_Boolean OSD_DirectoryIterator :: More () {
  } else if ( !myFlag ) {
  
   FindClose (  ( HANDLE )myHandle  );
-  myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
+  myHandle = ( intptr_t )INVALID_HANDLE_VALUE;
  
  }  // end if
 
diff --git a/src/OSD/OSD_EnvironmentIterator.cxx b/src/OSD/OSD_EnvironmentIterator.cxx
index d20007b..139ba77 100644
--- a/src/OSD/OSD_EnvironmentIterator.cxx
+++ b/src/OSD/OSD_EnvironmentIterator.cxx
@@ -102,7 +102,7 @@ Standard_Integer OSD_EnvironmentIterator::Error()const{
 OSD_EnvironmentIterator :: OSD_EnvironmentIterator () {
 
  myEnv   = GetEnvironmentStrings ();
- myCount = ( Standard_Integer )myEnv;
+ myCount = ( intptr_t )myEnv;
 
 }  // end constructor
 
diff --git a/src/OSD/OSD_File.cxx b/src/OSD/OSD_File.cxx
index d9011e1..0024362 100644
--- a/src/OSD/OSD_File.cxx
+++ b/src/OSD/OSD_File.cxx
@@ -939,7 +939,7 @@ void OSD_File :: Build (
 
   RAISE(  TEXT( "OSD_File :: Build (): incorrent call - no filename given" )  );
 
- myFileChannel = ( Standard_Integer )_open_file ( fName.ToCString (), Mode, OPEN_NEW );
+ myFileChannel = ( intptr_t )_open_file ( fName.ToCString (), Mode, OPEN_NEW );
 
  if (  ( HANDLE )myFileChannel == INVALID_HANDLE_VALUE  )
 
@@ -978,7 +978,7 @@ void OSD_File :: Open (
 
   RAISE(  TEXT( "OSD_File :: Open (): incorrent call - no filename given" )  );
 
- myFileChannel = ( Standard_Integer )_open_file ( fName.ToCString (), Mode, OPEN_OLD );
+ myFileChannel = ( intptr_t )_open_file ( fName.ToCString (), Mode, OPEN_OLD );
 
  if (  ( HANDLE )myFileChannel == INVALID_HANDLE_VALUE  ) {
 
@@ -1012,7 +1012,7 @@ void OSD_File :: Append (
 
   RAISE(  TEXT( "OSD_File :: Append (): incorrent call - no filename given" )  );
 
- myFileChannel = ( Standard_Integer )_open_file ( fName.ToCString (), Mode, OPEN_APPEND, &fNew );
+ myFileChannel = ( intptr_t )_open_file ( fName.ToCString (), Mode, OPEN_APPEND, &fNew );
 
  if (  ( HANDLE )myFileChannel == INVALID_HANDLE_VALUE  )
 
@@ -1571,7 +1571,7 @@ void OSD_File :: Close () {
 
  CloseHandle (  ( HANDLE )myFileChannel  );
 
- myFileChannel = ( Standard_Integer )INVALID_HANDLE_VALUE;
+ myFileChannel = ( intptr_t )INVALID_HANDLE_VALUE;
  myIO          = 0;
 
 }  // end OSD_File :: Close
@@ -1606,7 +1606,7 @@ OSD_KindFile OSD_File :: KindOfFile () const {
    RAISE(  TEXT( "OSD_File :: KindOfFile (): incorrent call - no filename given" )  );
 
   flags = _get_file_type (
-            fName.ToCString (), ( Standard_Integer )INVALID_HANDLE_VALUE
+            fName.ToCString (), ( intptr_t )INVALID_HANDLE_VALUE
            );
 
  } else
@@ -2241,7 +2241,7 @@ static DWORDLONG __fastcall _get_line ( Standard_PCharacter& buffer, DWORD dwBuf
  }  // end while
 
 #ifdef VAC
- retVal  = (DWORDLONG) ( ( (unsigned __int64) ((DWORD) buffer + dwBuffSize) ) << 32 );
+ retVal  = (DWORDLONG) ( ( (unsigned __int64) ((DWORD)(intptr_t) buffer + dwBuffSize) ) << 32 );
  retVal = (DWORDLONG) ( (unsigned __int64) retVal & (((unsigned __int64) 0xFFFFFFFF) << 32) );
 #else
  retVal  = (   (  ( DWORDLONG )( ( DWORD )buffer + dwBuffSize )  ) << 32   );
@@ -2674,7 +2674,7 @@ Standard_Integer __fastcall _get_file_type (
  DWORD            dwType;
  int              fileType;
 
- fileType = fileHandle == ( Standard_Integer )INVALID_HANDLE_VALUE ?
+ fileType = fileHandle == ( intptr_t )INVALID_HANDLE_VALUE ?
                           FILE_TYPE_DISK :
                           GetFileType (  ( HANDLE )fileHandle  );
 
diff --git a/src/OSD/OSD_FileIterator.cxx b/src/OSD/OSD_FileIterator.cxx
index e102bec..c4e1443 100644
--- a/src/OSD/OSD_FileIterator.cxx
+++ b/src/OSD/OSD_FileIterator.cxx
@@ -292,7 +292,7 @@ OSD_FileIterator :: OSD_FileIterator (
                     ) {
 
  myFlag   = Standard_False;
- myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
+ myHandle = ( intptr_t )INVALID_HANDLE_VALUE;
 
  where.SystemName ( myPlace );
 
@@ -307,7 +307,7 @@ void OSD_FileIterator :: Destroy () {
 
  if ( myData != NULL ) HeapFree (  GetProcessHeap (), 0, myData  );
 
- if (  myHandle != ( Standard_Integer )INVALID_HANDLE_VALUE  )
+ if (  myHandle != ( intptr_t )INVALID_HANDLE_VALUE  )
 
   FindClose (  ( HANDLE )myHandle  );
 
@@ -315,7 +315,7 @@ void OSD_FileIterator :: Destroy () {
 
 Standard_Boolean OSD_FileIterator :: More () {
 
- if (  myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE  ) {
+ if (  myHandle == ( intptr_t )INVALID_HANDLE_VALUE  ) {
  
   TCollection_AsciiString wc = myPlace + TEXT( "/" ) + myMask;
 
@@ -323,11 +323,11 @@ Standard_Boolean OSD_FileIterator :: More () {
             GetProcessHeap (), HEAP_GENERATE_EXCEPTIONS, sizeof ( WIN32_FIND_DATA )
            );
 
-  myHandle = ( Standard_Integer )FindFirstFile (
+  myHandle = ( intptr_t )FindFirstFile (
                                   wc.ToCString (), ( PWIN32_FIND_DATA )myData
                                  );
 
-  if (  myHandle == ( Standard_Integer )INVALID_HANDLE_VALUE  )
+  if (  myHandle == ( intptr_t )INVALID_HANDLE_VALUE  )
   
    _osd_wnt_set_error ( myError, OSD_WDirectoryIterator );
   
@@ -343,7 +343,7 @@ Standard_Boolean OSD_FileIterator :: More () {
  } else if ( !myFlag ) {
  
   FindClose (  ( HANDLE )myHandle  );
-  myHandle = ( Standard_Integer )INVALID_HANDLE_VALUE;
+  myHandle = ( intptr_t )INVALID_HANDLE_VALUE;
  
  }  // end if
 
diff --git a/src/OSD/OSD_FileNode.cxx b/src/OSD/OSD_FileNode.cxx
index 3ea7fb1..d8e8b96 100644
--- a/src/OSD/OSD_FileNode.cxx
+++ b/src/OSD/OSD_FileNode.cxx
@@ -482,7 +482,7 @@ static void __fastcall _test_raise ( TCollection_AsciiString, Standard_CString )
 
 OSD_FileNode::OSD_FileNode () {
 
- myFileChannel = ( Standard_Integer )INVALID_HANDLE_VALUE;
+ myFileChannel = ( intptr_t )INVALID_HANDLE_VALUE;
 
 }  // end constructor ( 1 )
 
@@ -493,7 +493,7 @@ OSD_FileNode::OSD_FileNode () {
 
 OSD_FileNode::OSD_FileNode ( const OSD_Path& Name ) {
 
- myFileChannel = ( Standard_Integer )INVALID_HANDLE_VALUE;
+ myFileChannel = ( intptr_t )INVALID_HANDLE_VALUE;
  myPath        = Name;
 
 }  // end constructor ( 2 )
@@ -563,7 +563,7 @@ void OSD_FileNode::Remove () {
  TEST_RAISE(  TEXT( "Remove" )  );
 
  switch (  _get_file_type (  fName.ToCString (),
-                             ( Standard_Integer )INVALID_HANDLE_VALUE )  ) {
+                             ( intptr_t )INVALID_HANDLE_VALUE )  ) {
 
   case FLAG_FILE:
 
@@ -611,7 +611,7 @@ void OSD_FileNode::Move ( const OSD_Path& NewPath ) {
  NewPath.SystemName ( fNameDst );
 
  switch (  _get_file_type ( fName.ToCString (),
-                            ( Standard_Integer )INVALID_HANDLE_VALUE )  ) {
+                            ( intptr_t )INVALID_HANDLE_VALUE )  ) {
 
   case FLAG_FILE:
 
@@ -662,7 +662,7 @@ void OSD_FileNode::Copy ( const OSD_Path& ToPath ) {
  ToPath.SystemName ( fNameDst );
 
  switch (  _get_file_type ( fName.ToCString (),
-                            ( Standard_Integer )INVALID_HANDLE_VALUE )  ) {
+                            ( intptr_t )INVALID_HANDLE_VALUE )  ) {
 
   case FLAG_FILE:
 
@@ -715,7 +715,7 @@ OSD_Protection OSD_FileNode::Protection () {
         ) == NULL ||
         !_osd_wnt_sd_to_protection (
           pSD, retVal,
-          _get_file_type (  fName.ToCString (), ( Standard_Integer )INVALID_HANDLE_VALUE  ) ==
+          _get_file_type (  fName.ToCString (), ( intptr_t )INVALID_HANDLE_VALUE  ) ==
           FLAG_DIRECTORY
          )
  )
@@ -747,7 +747,7 @@ void OSD_FileNode::SetProtection ( const OSD_Protection& Prot ) {
  pSD = _osd_wnt_protection_to_sd (
         Prot,
         _get_file_type ( fName.ToCString (),
-                         ( Standard_Integer )INVALID_HANDLE_VALUE  ) ==
+                         ( intptr_t )INVALID_HANDLE_VALUE  ) ==
         FLAG_DIRECTORY,
         (char *)fName.ToCString ()
        );
@@ -881,7 +881,7 @@ Standard_Integer OSD_FileNode::UserId () {
 
   FreeFileSecurity ( pSD );
  
- return ( Standard_Integer )retVal;
+ return ( intptr_t )retVal;
 
 }  // end OSD_FileNode :: UserId
 
@@ -914,7 +914,7 @@ Standard_Integer OSD_FileNode::GroupId () {
 
   _osd_wnt_set_error ( myError, OSD_WFileNode );
 
- return ( Standard_Integer )retVal;
+ return ( intptr_t )retVal;
 
 }  // end OSD_FileNode :: GroupId
 
diff --git a/src/OSD/OSD_Process.cxx b/src/OSD/OSD_Process.cxx
index ed04a20..5c0cd07 100644
--- a/src/OSD/OSD_Process.cxx
+++ b/src/OSD/OSD_Process.cxx
@@ -324,7 +324,7 @@ Standard_Integer OSD_Process :: UserId () {
  if ( hProcessToken != INVALID_HANDLE_VALUE ) CloseHandle ( hProcessToken );
  if ( pTKowner      != NULL                 ) FreeTokenInformation ( pTKowner );
 
- return ( Standard_Integer )retVal;
+ return ( intptr_t )retVal;
 
 }  // end OSD_Process :: UserId
 
diff --git a/src/OSD/OSD_SharedMemory.cxx b/src/OSD/OSD_SharedMemory.cxx
index fc23a7f..a4353d1 100644
--- a/src/OSD/OSD_SharedMemory.cxx
+++ b/src/OSD/OSD_SharedMemory.cxx
@@ -227,7 +227,7 @@ void OSD_SharedMemory :: Build () {
 
   else
 
-   myId = ( Standard_Integer )hFileMapping;
+   myId = ( intptr_t )hFileMapping;
 
  }  // end else
 
@@ -264,7 +264,7 @@ void OSD_SharedMemory :: Open (
 
   else
 
-   myId = ( Standard_Integer )hFileMapping;
+   myId = ( intptr_t )hFileMapping;
 
   CloseHandle ( hFileMapping );
 
diff --git a/src/OSD/OSD_Thread.cxx b/src/OSD/OSD_Thread.cxx
index 811b72b..3c0b538 100644
--- a/src/OSD/OSD_Thread.cxx
+++ b/src/OSD/OSD_Thread.cxx
@@ -142,7 +142,7 @@ static DWORD WINAPI WNTthread_func (LPVOID data)
   WNTthread_data *adata = (WNTthread_data*)data;
   void* ret = adata->func ( adata->data );
   free ( adata );
-  return (DWORD)ret;
+  return (intptr_t)ret;
 }
 #endif
 
diff --git a/src/OSD/OSD_WNT.cxx b/src/OSD/OSD_WNT.cxx
index ddde3d9..92a6132 100644
--- a/src/OSD/OSD_WNT.cxx
+++ b/src/OSD/OSD_WNT.cxx
@@ -1014,7 +1014,7 @@ BOOL MoveDirectory ( LPCTSTR oldDir, LPCTSTR newDir ) {
  DIR_RESPONSE        response;
  DWORD               level;
 
- if (   (  level = ( DWORD )TlsGetValue ( dwLevel )  ) == NULL   ) {
+ if (   (  level = ( intptr_t )TlsGetValue ( dwLevel )  ) == NULL   ) {
 
   ++level;
   TlsSetValue (  dwLevel, ( LPVOID )level  );
diff --git a/src/OSD/OSD_WNT_1.cxx b/src/OSD/OSD_WNT_1.cxx
index 3ecbe10..2269c2d 100644
--- a/src/OSD/OSD_WNT_1.cxx
+++ b/src/OSD/OSD_WNT_1.cxx
@@ -242,7 +242,7 @@ LPWORD lpwAlign (LPWORD lpIn)
 {
   ULONG ul;
 
-  ul = (ULONG) lpIn;
+  ul = (intptr_t) lpIn;
   ul +=3;
   ul >>=2;
   ul <<=2;
diff --git a/src/OSD/OSD_signal_WNT.cxx b/src/OSD/OSD_signal_WNT.cxx
index aee28d4..720d5dc 100644
--- a/src/OSD/OSD_signal_WNT.cxx
+++ b/src/OSD/OSD_signal_WNT.cxx
@@ -218,7 +218,7 @@ extern "C" Standard_EXPORT void _debug_break ( Standard_PCharacter );
 
 MB_DESC fatalErrorDesc[] = {
 									  
-                 { MBT_ICON,   ( int )IDI_HAND              },
+                 { MBT_ICON,   ( intptr_t )IDI_HAND              },
                  { MBT_BUTTON, IDYES,    TEXT( "Continue" ) },
                  { MBT_BUTTON, IDNO,     TEXT( "Debugger" ) },
                  { MBT_BUTTON, IDCANCEL, TEXT( "Stop"     ) }
diff --git a/src/Units/Units_Token.cxx b/src/Units/Units_Token.cxx
index 9d7f71a..ad94be5 100644
--- a/src/Units/Units_Token.cxx
+++ b/src/Units/Units_Token.cxx
@@ -394,7 +394,7 @@ void Units_Token::Dump(const Standard_Integer ashift,
   TCollection_AsciiString mean = Mean();
 
   for(i=0; i<ashift; i++)cout<<"  ";
-  cout << "Units_Token::Dump of " << hex << (long ) this << dec << endl;
+  cout << "Units_Token::Dump of " << hex << (intptr_t) this << dec << endl;
   for(i=0; i<ashift; i++)cout<<"  ";
   cout<<word.ToCString()<<endl;
   for(i=0; i<ashift; i++)cout<<"  ";

-- 
OCE packaging



More information about the debian-science-commits mailing list