[Common-dev] Re: [Client-dev] CR: merging GCC 4.0 fixes for Mac/Unix from head to hxclient_1_5_0_cayenne

[Common-dev] Re: [Client-dev] CR: merging GCC 4.0 fixes for Mac/Unix from head to hxclient_1_5_0_cayenne

Greg Wright gwright at real.com
Wed Apr 13 13:13:10 PDT 2005


All the Uint8 changes are in mac only code right?

Looks good,
--greg.



Greg Robbins wrote:
> Merging minor changes from head to allow compilation under GCC 4.0 and 
> Xcode 2.0 on hxclient_1_5_0_cayenne
> 
> Files modified:
> client/common/container/plghand2.cpp
> common/system/dllpath.cpp
> common/system/platform/unix/pthreadthreads.cpp
> common/netio/pub/platform/unix/hxsocket.h
> common/util/platform/mac/MoreFilesX.c
> common/util/pub/platform/mac/MoreFilesX.h
> 
> Branch: hxclient_1_5_0_cayenne
> 
> Overview: minor syntactic changes for more compilation under GCC 4.0 and 
> with Xcode 2.0
> 
> Platforms affected: Mac, Unix
> 
> 
> Index: client/common/container/plghand2.cpp
> ===================================================================
> RCS file: /cvsroot/client/common/container/plghand2.cpp,v
> retrieving revision 1.32
> diff -u -w -r1.32 plghand2.cpp
> --- client/common/container/plghand2.cpp    9 Jul 2004 18:44:16 -0000    
> 1.32
> +++ client/common/container/plghand2.cpp    13 Apr 2005 18:06:48 -0000
> @@ -6577,7 +6577,7 @@
>  #elif defined(_MAC_MACHO)
>      FSRef targetFSRef;
>      Boolean isDir;
> -    OSStatus err = ::FSPathMakeRef(pszFileNameWithPath, &targetFSRef, 
> &isDir);
> +    OSStatus err = ::FSPathMakeRef((const UInt8 *)pszFileNameWithPath, 
> &targetFSRef, &isDir);
>      if (err == noErr)
>      {
>          Boolean resolveAliasChains = true;
> @@ -6586,7 +6586,7 @@
>          err = FSResolveAliasFileWithMountFlags(&targetFSRef, 
> resolveAliasChains, &targetIsDir, &wasAlias, kResolveAliasFileNoUI);
>          if (err == noErr && wasAlias)
>          {
> -        err = FSRefMakePath(&targetFSRef, pszFileNameWithPath, (1<<10));
> +        err = FSRefMakePath(&targetFSRef, (UInt8 *)pszFileNameWithPath, 
> (1<<10));
>        }
>      }
>      statError = Stat(pszFileNameWithPath, &stat_stuct);
> 
> 
> 
> Index: common/system/dllpath.cpp
> ===================================================================
> RCS file: /cvsroot/common/system/dllpath.cpp,v
> retrieving revision 1.9
> diff -u -w -r1.9 dllpath.cpp
> --- common/system/dllpath.cpp    9 Jul 2004 18:19:44 -0000    1.9
> +++ common/system/dllpath.cpp    13 Apr 2005 18:07:49 -0000
> @@ -263,7 +263,7 @@
>        if(putenv(ptr))
>          theError = HXR_FAILED;
>      }
> -#elif defined (_SOLARIS)
> +#elif defined (_SOLARIS) || defined(_MAC_UNIX)
>      if(putenv((char *)(const char*)strResultPath))
>          theError = HXR_FAILED;
>  #else
> @@ -288,7 +288,7 @@
>        char *ptr = (char *)((const char *)m_strPathEnvVar);
>      if(putenv(ptr))
>          theError = HXR_FAILED;
> -#elif defined (_SOLARIS)
> +#elif defined (_SOLARIS) || defined (_MAC_UNIX)
>      if(putenv((char*)(const char *)m_strPathEnvVar))
>          theError = HXR_FAILED;
>  #else
> 
> Index: common/system/platform/unix/pthreadthreads.cpp
> ===================================================================
> RCS file: /cvsroot/common/system/platform/unix/pthreadthreads.cpp,v
> retrieving revision 1.10
> diff -u -w -r1.10 pthreadthreads.cpp
> --- common/system/platform/unix/pthreadthreads.cpp    27 Oct 2004 
> 23:41:10 -0000    1.10
> +++ common/system/platform/unix/pthreadthreads.cpp    13 Apr 2005 
> 18:07:49 -0000
> @@ -62,7 +62,7 @@
> 
>  ULONG32 HXUnixThread::GetCurrentThreadID()
>  {
> -    return pthread_self();
> +    return (ULONG32) pthread_self();
>  }
> 
>  //=======================================================================
> @@ -84,7 +84,7 @@
>      HX_RESULT retVal = HXR_OK;
>      pthread_t threadID=0;
>      int nCode = pthread_create( &threadID, NULL, pfExecFunc, pArg );
> -    ulThreadID = threadID;
> +    ulThreadID = (ULONG32) threadID;
>      if(nCode!=0)
>      {
>          ulThreadID = 0;
> @@ -102,13 +102,13 @@
> 
>  void HXPthreadThread::_thread_cancel(ULONG32 ulThreadID)
>  {
> -    pthread_cancel( ulThreadID );
> +    pthread_cancel( (pthread_t) ulThreadID );
>  }
> 
>  ULONG32 HXPthreadThread::_thread_join(ULONG32 ulThreadID)
>  {
>      void* pvRetVal = NULL;
> -    pthread_join( ulThreadID, &pvRetVal );
> +    pthread_join( (pthread_t) ulThreadID, &pvRetVal );
>      return (ULONG32)(PTR_INT)pvRetVal;
>  }
> 
> 
> Index: common/netio/pub/platform/unix/hxsocket.h
> ===================================================================
> RCS file: /cvsroot/common/netio/pub/platform/unix/hxsocket.h,v
> retrieving revision 1.1
> diff -u -w -r1.1 hxsocket.h
> --- common/netio/pub/platform/unix/hxsocket.h    21 Jan 2004 22:04:59 
> -0000    1.1
> +++ common/netio/pub/platform/unix/hxsocket.h    13 Apr 2005 18:07:49 -0000
> @@ -4,7 +4,7 @@
>  #ifndef HX_SOCKLEN_T
>  #if defined (_AIX42)
>  #define HX_SOCKLEN_T size_t
> -#elif defined(_AIX43) || defined(_FREEBSD5) || defined(_FREEBSD4) || 
> defined(_OPENBSD) ||defined(_NETBSD) || defined(_LINUX) || (defined 
> (__GNUC__) && defined(_SOLARIS))
> +#elif defined(_AIX43) || defined(_FREEBSD5) || defined(_FREEBSD4) || 
> defined(_OPENBSD) ||defined(_NETBSD) || defined(_LINUX) || 
> defined(_MAC_UNIX) || (defined (__GNUC__) && defined(_SOLARIS))
>  #define HX_SOCKLEN_T socklen_t
>  #else
>  #define HX_SOCKLEN_T int
> 
> 
> 
> Index: common/util/platform/mac/MoreFilesX.c
> ===================================================================
> RCS file: /cvsroot/common/util/platform/mac/MoreFilesX.c,v
> retrieving revision 1.7
> diff -u -w -r1.7 MoreFilesX.c
> --- common/util/platform/mac/MoreFilesX.c    9 Jul 2004 18:23:03 
> -0000    1.7
> +++ common/util/platform/mac/MoreFilesX.c    13 Apr 2005 18:07:49 -0000
> @@ -2189,7 +2189,7 @@
>  /*****************************************************************************/ 
> 
> 
>  OSErr
> -FSLockRange(
> +FSLockRangeMoreFiles(
>      SInt16 refNum,
>      SInt32 rangeLength,
>      SInt32 rangeStart)
> @@ -2212,7 +2212,7 @@
>  /*****************************************************************************/ 
> 
> 
>  OSErr
> -FSUnlockRange(
> +FSUnlockRangeMoreFiles(
>      SInt16 refNum,
>      SInt32 rangeLength,
>      SInt32 rangeStart)
> Index: common/util/pub/platform/mac/MoreFilesX.h
> ===================================================================
> RCS file: /cvsroot/common/util/pub/platform/mac/MoreFilesX.h,v
> retrieving revision 1.3
> diff -u -w -r1.3 MoreFilesX.h
> --- common/util/pub/platform/mac/MoreFilesX.h    9 Jul 2004 18:23:21 
> -0000    1.3
> +++ common/util/pub/platform/mac/MoreFilesX.h    13 Apr 2005 18:08:13 -0000
> @@ -1369,7 +1369,7 @@
>  #pragma mark FSLockRange
> 
>  OSErr
> -FSLockRange(
> +FSLockRangeMoreFiles(
>      SInt16 refNum,
>      SInt32 rangeLength,
>      SInt32 rangeStart);
> @@ -1392,7 +1392,7 @@
>  #pragma mark FSUnlockRange
> 
>  OSErr
> -FSUnlockRange(
> +FSUnlockRangeMoreFiles(
>      SInt16 refNum,
>      SInt32 rangeLength,
>      SInt32 rangeStart);
> 
> _______________________________________________
> Client-dev mailing list
> Client-dev at helixcommunity.org
> http://lists.helixcommunity.org/mailman/listinfo/client-dev
> 



More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.