[Helix-client-dev] Re: CR/CN: Solaris-Sparc-GCC patches for GMPMetaEditor branch
Petar Basic <[email protected]> Tue, 12 Jan 2010 22:35:49 +0100
| Newsgroups | gmane.comp.multimedia.helix.devel |
|---|---|
| Message-ID | <[email protected]> |
Latest set of patches to fix the Solaris native compiler build: 1.) STL headers in encodesvc projects must precede Helix headers at some places. 2.) Reverted back GNUC conditional in math64.h since GCC build is not needed anymore. Build tested with: SYSTEM_ID=sunos-5.10-sparc-studio11 On Tue, Jan 12, 2010 at 1:19 PM, Petar Basic <[email protected]> wrote: > Additional fixes for Solaris native compiler. > > > On Mon, Jan 11, 2010 at 6:58 PM, Petar Basic <[email protected]> wrote: >> Modified by: pbasic at real.com >> Date: 2010/01/11 >> Project: GMP MetaEditor (meta3gp.exe) >> >> Synopsis: >> Solaris-Sparc-GCC patches for GMPMetaEditor branch >> >> Overview: >> This CR includes patches needed to successfully build/run meta3gp >> project with GCC on Solaris-Sparc. >> >> Checked into GMPMetaEditor branch immediately since I need to verify >> the build on the farm ASAP. Some points below can be discussed and >> improved on later, however, at this time they seem irrelevant in the >> context of GMPMetaEditor. >> >> Details: >> 1.) "audio/fixptutil/pub/math64.h" was failing to compile due to >> missing implementation of 64-bit operations for Solaris-Sparc-GCC >> combo. >> >> In the CVS log, one can find traces of Sparc specific blocks of code >> which according to CVS comments had some bugs and were replaced by >> platform independent (plain C) implementations for Solaris-SunStudio >> combo. Relevant ifdef statement has now been modified to also compile >> platform independent implementations under Solaris-Sparc-GCC combo. >> >> All tests performed by "audio/fixptutil/test/fixpttest.c" succeed, >> although the execution proves slow. Testing with MetaEditor reveals >> that these operations are not used during meta-data >> extraction/injection, so at this time optimization for >> Solaris-Sparc-GCC does not seem important. >> >> 2.) statvfs on Solaris fails if passed an empty path argument, which >> causes calling method CHXFileSpecUtils::IsDiskLocal to print out an >> error to the console. This is not acceptable for MetaEditor, >> especially since everything works correctly. The culprit is actually >> in MemoryMapDataFile::Bind method in >> "common/fileio/platform/unix/mmapdatf.cpp". The code has been updated >> to process empty paths as a special case before resorting to >> CHXFileSpecUtils::IsDiskLocal. Also, what seems as a duplicate code >> block due to a bad check-in has been removed. >> >> 3.) RMAShutdown entry point which is now required by plugin handler >> has been added to metaeditor.dll. >> >> 4.) Defaulting meta3gp executable to DTDriver synchronous mode since >> asynchronous mode is not implemented on Solaris. >> >> 5.) Fixed various build busters. >> >> 6.) Reordered library dependencies in a few projects to allow the >> Solaris linker to link all symbols correctly. >> >> Testing: >> Verified operation on GMP MetaEditor on Solaris 5.10 Sparc via >> standard MetaEditor test scripts. >> >> Files Modified: >> audio/fixptutil/pub/math64.h >> client/medpltfm/hxmedpltfmdll >> client/medpltfm/pub/chxmedpltfmkicker.h >> client/medpltfm/pub/chxmedpltfmsched.h >> common/fileio/platform/unix/mmapdatf.cpp >> datatype/mp4/filewriter/m4avsh.cpp >> datatype/mp4/filewriter/mp4atoms.h >> datatype/mp4/filewriter/mp4sm.cpp >> datatype/mp4/filewriter/ra10sh.cpp >> datatype/tools/dtdriver/apps/meta3gp/HXXmlInputParser.h >> datatype/tools/dtdriver/apps/meta3gp/Umakefil_meta3gp >> datatype/tools/dtdriver/apps/meta3gp/Umakefil_tests >> datatype/tools/dtdriver/apps/meta3gp/main.cpp >> datatype/tools/dtdriver/dtdrplin/dtdr_genr_lib >> datatype/tools/dtdriver/dtdrplin/dtdr_platform_dll >> datatype/tools/metaeditor/Umakefil >> datatype/tools/metaeditor/hxdll.cpp >> >> Platforms and Profiles Affected: >> All >> >> Image Size and Heap Use impact: >> None >> >> Platforms and Profiles Build Verified: >> system id: win32-i386-vc7, sunos-5.8-sparc-gcc-server >> profile: helix-client-all-defines >> >> Platforms and Profiles Functionality Verified: >> x86 Windows XP SP2 >> Sparc SunOS 5.10 >> >> Branch: >> GMPMetaEditor >> >> Copyright assignment: >> I am a RealNetworks employee or contractor. >> > _______________________________________________ Helix-client-dev mailing list [email protected] http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev
audio_fixptutil.3.diff
(application/octet-stream, 1.7 KB)
Index: pub/math64.h
===================================================================
RCS file: /cvsroot/audio/fixptutil/pub/math64.h,v
retrieving revision 1.34.14.1
diff -d -H -w -U30 -r1.34.14.1 math64.h
--- pub/math64.h 11 Jan 2010 17:33:28 -0000 1.34.14.1
+++ pub/math64.h 12 Jan 2010 21:08:29 -0000
@@ -634,61 +634,61 @@
int zlow, z;
__asm {
smull zlow, x, y, x
mov zlow, zlow, lsr n
rsb n,n,#32
orr z, zlow, x, lsl n
}
return z;
}
#define HAVE_FASTABS
static __inline int FASTABS(int x)
{
int s;
__asm {
eor s, x, x, asr #31
sub x, s, x, asr #31
}
return x;
}
///////////////////////////////////////////////////////////////////////////////////////
// platform independent implementations
///////////////////////////////////////////////////////////////////////////////////////
-#elif (defined(_MAC_UNIX) && defined(__i386__)) || defined(_HPUX) || defined(_SOLARIS)
+#elif (defined(_MAC_UNIX) && defined(__i386__)) || defined(_HPUX) || (defined(_SOLARIS) && !defined(__GNUC__))
#ifndef ASSERT
#define ASSERT(x)
#endif
#ifndef TICK
#define TICK()
#endif
#ifndef TOCK
#define TOCK(nsamples) 1
#endif
#define HAVE_PLATFORM_MACROS
static __inline int MulDiv64(int a, int b, int c)
{
long long t = (long long)a * (long long)b ;
return (int)(t / c) ;
}
/* Compute (a * b) >> 32, using 64-bit intermediate result */
static __inline int MulShift32(int x, int y)
{
long long t = (long long)x * (long long)y ;
return (int)(t >> 32);
}
/* Compute (a * b) >> 31, using 64-bit intermediate result */
static __inline int MulShift31(int x, int y)
{
client_encodesvc_common.3.diff
(application/octet-stream, 13.1 KB)
Index: util/hxsettingsadvisorutils.cpp
===================================================================
RCS file: /cvsroot/client/encodesvc/common/util/hxsettingsadvisorutils.cpp,v
retrieving revision 1.8
diff -d -H -w -U30 -r1.8 hxsettingsadvisorutils.cpp
--- util/hxsettingsadvisorutils.cpp 18 Dec 2009 20:14:07 -0000 1.8
+++ util/hxsettingsadvisorutils.cpp 12 Jan 2010 21:10:01 -0000
@@ -28,67 +28,69 @@
* If you wish to allow use of your version of this file only under
* the terms of the GPL, and not to allow others
* to use your version of this file under the terms of either the RPSL
* or RCSL, indicate your decision by deleting Paragraph 1 above
* and replace them with the notice and other provisions required by
* the GPL. If you do not delete Paragraph 1 above, a recipient may
* use your version of this file under the terms of any one of the
* RPSL, the RCSL or the GPL.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created. Copying, including reproducing, storing,
* adapting or translating, any or all of this material other than
* pursuant to the license terms referred to above requires the prior
* written consent of RealNetworks and its licensors
*
* This file, and the files included with this file, is distributed
* and made available by RealNetworks on an 'AS IS' basis, WITHOUT
* WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS
* AND ITS LICENSORS HEREBY DISCLAIM ALL SUCH WARRANTIES, INCLUDING
* WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
+// Solaris CC: STL headers must precede Helix headers
+#include "hxtxmlparser.h"
+
#include "hxtypes.h"
#include "hxcom.h"
#include "hxsettingsadvisorutils.h"
#include "pckunpck.h"
#include "ihxtsettingsadvisor.h"
#include "hxtlogutil.h"
-#include "hxtxmlparser.h"
#include "chxmapstringtoob.h"
#include "ihxtconstants.h"
// This is taken directly from Table A-1 in the H.264 spec (ITU T-REC H.264 200711)
const HXLevelLimit g_H264LevelLimits[] =
{
{HX_H264_LEVEL_1, 1485.0, 99, 64000},
{HX_H264_LEVEL_1B, 1485.0, 99, 128000},
{HX_H264_LEVEL_1_1, 3000.0, 396, 192000},
{HX_H264_LEVEL_1_2, 6000.0, 396, 384000},
{HX_H264_LEVEL_1_3, 11880.0, 396, 768000},
{HX_H264_LEVEL_2, 11880.0, 396, 2000000},
{HX_H264_LEVEL_2_1, 19800.0, 792, 4000000},
{HX_H264_LEVEL_2_2, 20250.0, 1620, 4000000},
{HX_H264_LEVEL_3, 40500.0, 1620, 10000000},
{HX_H264_LEVEL_3_1, 108000.0, 3600, 14000000},
{HX_H264_LEVEL_3_2, 216000.0, 5120, 20000000},
{HX_H264_LEVEL_4, 245760.0, 8192, 20000000},
{HX_H264_LEVEL_4_1, 245760.0, 8192, 50000000},
{HX_H264_LEVEL_4_2, 522240.0, 8704, 50000000},
{HX_H264_LEVEL_5, 589824.0, 22080, 135000000},
{HX_H264_LEVEL_5_1, 983040.0, 36864, 240000000},
{0, 0.0, 0, 0}
};
const HXLevelStringMap g_H263LevelMap[] =
{
{HX_H263_LEVEL_10, kValueH263Level10},
{HX_H263_LEVEL_20, kValueH263Level20},
{HX_H263_LEVEL_30, kValueH263Level30},
Index: util/hxtdirconv.cpp
===================================================================
RCS file: /cvsroot/client/encodesvc/common/util/hxtdirconv.cpp,v
retrieving revision 1.3
diff -d -H -w -U30 -r1.3 hxtdirconv.cpp
--- util/hxtdirconv.cpp 20 Oct 2009 18:01:27 -0000 1.3
+++ util/hxtdirconv.cpp 12 Jan 2010 21:10:02 -0000
@@ -20,61 +20,61 @@
* terms of the GNU General Public License Version 2 (the
* "GPL") in which case the provisions of the GPL are applicable
* instead of those above. If you wish to allow use of your version of
* this file only under the terms of the GPL, and not to allow others
* to use your version of this file under the terms of either the RPSL
* or RCSL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient may
* use your version of this file under the terms of any one of the
* RPSL, the RCSL or the GPL.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
-#include "hxcom.h"
+// Solaris CC: STL headers must precede Helix headers
#include "hxtdirconv.h"
#include "hxdir.h"
// For heap checking
#include "hxheap.h"
#ifdef _DEBUG
#undef HX_THIS_FILE
static const char HX_THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////
// Method:
// CHXTDirConv::GetNativePathname
// Purpose:
// Converts szPathname into a pathname in the platform's native format (for example,
// converts forward slashes to backward slashes on Windows)
HX_RESULT CHXTDirConv::GetNativePathname(const char* szPathname, std::string& strNativePathname)
{
HX_RESULT res = HXR_OK;
// Validate params
if (!szPathname || *szPathname == '\0')
{
HX_ASSERT(FALSE);
return HXR_POINTER;
}
strNativePathname = szPathname;
Index: util/pub/hxtdirconv.h
===================================================================
RCS file: /cvsroot/client/encodesvc/common/util/pub/hxtdirconv.h,v
retrieving revision 1.2
diff -d -H -w -U30 -r1.2 hxtdirconv.h
--- util/pub/hxtdirconv.h 13 Sep 2007 16:39:45 -0000 1.2
+++ util/pub/hxtdirconv.h 12 Jan 2010 21:10:10 -0000
@@ -23,49 +23,52 @@
* this file only under the terms of the GPL, and not to allow others
* to use your version of this file under the terms of either the RPSL
* or RCSL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient may
* use your version of this file under the terms of any one of the
* RPSL, the RCSL or the GPL.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
#ifndef _HXTDIRCONV_H
#define _HXTDIRCONV_H
+// Solaris CC: STL headers must precede Helix headers
#include <string>
+#include "hxcom.h"
+
struct CHXTDirConv
{
static HX_RESULT GetNativePathname(const char* szPathname, std::string& strNativePathname);
static HX_RESULT GetInternalPathname(const char* szPathname, std::string& strInternalPathname);
};
// Note: Usage of these defines is deprecated
#if defined(_WIN32) || defined(_UNIX)
#define HXT_PATH_SEPARATOR_STRING OS_SEPARATOR_STRING
#define HXT_SEPARATOR_CHAR OS_SEPARATOR_CHAR
#endif // defined(_WIN32) || defined(_UNIX)
#endif // _HXTDIRCONV_H
Index: xmlparser/hlxxmlparser.cpp
===================================================================
RCS file: /cvsroot/client/encodesvc/common/xmlparser/hlxxmlparser.cpp,v
retrieving revision 1.7
diff -d -H -w -U30 -r1.7 hlxxmlparser.cpp
--- xmlparser/hlxxmlparser.cpp 3 Dec 2009 04:55:13 -0000 1.7
+++ xmlparser/hlxxmlparser.cpp 12 Jan 2010 21:10:19 -0000
@@ -24,64 +24,66 @@
* to use your version of this file under the terms of either the RPSL
* or RCSL, indicate your decision by deleting the provisions above
* and replace them with the notice and other provisions required by
* the GPL. If you do not delete the provisions above, a recipient may
* use your version of this file under the terms of any one of the
* RPSL, the RCSL or the GPL.
*
* This file is part of the Helix DNA Technology. RealNetworks is the
* developer of the Original Code and owns the copyrights in the
* portions it created.
*
* This file, and the files included with this file, is distributed
* and made available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY
* KIND, EITHER EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS
* ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET
* ENJOYMENT OR NON-INFRINGEMENT.
*
* Technology Compatibility Kit Test Suite(s) Location:
* http://www.helixcommunity.org/content/tck
*
* Contributor(s):
*
* ***** END LICENSE BLOCK ***** */
#ifdef _WIN32
#pragma warning (disable : 4786)
#endif
+// Solaris CC: STL headers must precede Helix headers
+#include "hxtxmlparser.h"
+
#include "hxcom.h"
#include "hxassert.h"
-#include "hxtxmlparser.h"
#include "xmltok.h"
#include "xmlparse.h"
#include <stdio.h>
#include "utstring.h"
#include "hxtdirconv.h"
#include "hxheap.h"
#ifdef _DEBUG
#undef HX_THIS_FILE
static char HX_THIS_FILE[] = __FILE__;
#endif
CHXTElement CHXTElement::zm_DefaultElement;
CHXTAttribute CHXTAttribute::zm_DefaultAttribute("", "");
static HX_RESULT ConvertANSIToUTF8(const char* szOrig, string& sResult);
static HX_RESULT ConvertUTF8ToANSI(const char* szOrig, string& sResult);
static HX_RESULT ConvertANSIToUTF8(const char* szOrig, string& sTranslated)
{
HX_RESULT res = HXR_OK;
sTranslated = "";
// Validate params
if (!szOrig || strlen(szOrig) == 0)
{
//HX_ASSERT(FALSE);
Index: xmlparser/pub/hxtxmlparser.h
===================================================================
RCS file: /cvsroot/client/encodesvc/common/xmlparser/pub/hxtxmlparser.h,v
retrieving revision 1.5
diff -d -H -w -U30 -r1.5 hxtxmlparser.h
--- xmlparser/pub/hxtxmlparser.h 18 Aug 2009 20:02:55 -0000 1.5
+++ xmlparser/pub/hxtxmlparser.h 12 Jan 2010 21:10:22 -0000
@@ -59,68 +59,70 @@
member and a vector of it's child elements in the m_vElements member.
Basic Usage:
HX_RESULT ParserResult;
CHXTParser* pParser = new CHXTParser();
realstring sBuffer = "<? xml .... some xml ....";
ParserResult = pParser->ParserBuffer(sBuffer.c_str(), sBuffer.size());
OR
ParserResult = pParser->ParseFile("somexmlfile.xml")
if( FAILED(ParserResult) )
{
char* szError;
UINT32 nErrorLineNum;
pParser->GetLastError(&szError, &nErrorLineNum);
}
else
{
CHXTElement* pRootElement = pParser->GetRootElement();
char* szElementName;
szElementName = pRootElement->GetName();
}
Also see the accompianing HLXXmlParserTest.cpp file for a more complete example
*/
+// Solaris CC: STL headers must precede Helix headers
+#include <vector>
+#include <string>
+#include <stack>
#include "hxcom.h"
#include <stdio.h>
-#include <vector>
#include "utstring.h"
-#include <string>
-#include <stack>
+
using namespace std;
class CHXTAttribute
{
public:
CHXTAttribute();
CHXTAttribute(const char* szName, const char* szValue);
CHXTAttribute(const CHXTAttribute& rhs);
~CHXTAttribute();
CHXTAttribute& operator=(const CHXTAttribute& rhs);
const char* GetName() const;
string GetXMLSafeNameUTF8() const;
const char* GetValue() const;
string GetXMLSafeValueUTF8() const;
void SetName(const char* szName);
void SetNameUTF8(const char* szName);
void SetValue(const char* szValue);
void SetValueUTF8(const char* szValue);
bool operator!() const
{
return ! operator bool();
}
operator bool () const
{
if ( m_pData )