Apache OpenOffice (AOO) Bugzilla – Issue 796
OpenOffice relys on #define STLPORT_VERION < 321 to determine which STL is available
Last modified: 2003-12-06 14:52:32 UTC
I have found 93 uses of STLPORT_VERSION as a method of distiguishing between the old and the new STL standard. #if SLTPORT_VERSION < 321 #include <abc.h> #else #include <abc> #endif This code is aimed at STLport, and does not allow native STL's to be used. The bigger problem for SGI is that o32 binaries (for older SGI hardware) can only be compiled using the old STL, and hence this should be a build option. % find * -name '*xx' | xargs grep STLPORT_VERSION basic/source/classes/sbxmod.cxx:#if STLPORT_VERSION < 321 bridges/source/cpp_uno/gcc2_solaris_sparc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_solaris_sparc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_macosx_powerpc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_powerpc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_powerpc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_intel/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_intel/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_netbsd_sparc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_netbsd_sparc/except.cxx:#if STLPORT_VERSION<321 codemaker/source/codemaker/global.cxx:#if STLPORT_VERSION < 400 connectivity/source/inc/java/lang/Object.hxx:#if STLPORT_VERSION>=321 extensions/source/javavm/jvmargs.hxx:#if STLPORT_VERSION < 321 extensions/source/address/inc/propset.hxx:#if STLPORT_VERSION<321 extensions/source/address/core/services.cxx:#if STLPORT_VERSION<321 extensions/source/address/core/parser.cxx:#if STLPORT_VERSION<321 extensions/source/address/core/address.cxx:#if STLPORT_VERSION<321 extensions/source/addressbook/propset.hxx:#if STLPORT_VERSION < 321 extensions/source/addressbook/services.cxx:#if STLPORT_VERSION < 321 extensions/source/addressbook/parser.cxx:#if STLPORT_VERSION < 321 extensions/source/addressbook/address.cxx:#if STLPORT_VERSION < 321 extensions/source/plugin/unx/unxmgr.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/evtlstnr.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/nfuncs.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/plcom.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/service.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/context.cxx:#if STLPORT_VERSION>=321 extensions/source/plugin/base/manager.cxx:#if STLPORT_VERSION>=321 package/source/zippackage/AttributeList.cxx:#if STLPORT_VERSION<321 rdbmaker/source/codemaker/global.cxx:#if STLPORT_VERSION < 400 registry/source/regmap.hxx:#if STLPORT_VERSION<321 sc/source/ui/docshell/docsh4.cxx:#if STLPORT_VERSION>=321 sc/source/core/tool/token.cxx:#if STLPORT_VERSION<321 setup2/source/custom/jvmsetup/jvmscan.hxx:#if STLPORT_VERSION < 321 so3/source/dialog/plfilter.cxx:#if STLPORT_VERSION>=321 sot/source/sdstor/stgcache.cxx:#if STLPORT_VERSION<321 svtools/inc/itemset.hxx:#if STLPORT_VERSION<321 svtools/source/items/itemset.cxx:#if STLPORT_VERSION>=321 svx/source/form/fmshimp.cxx:#if STLPORT_VERSION>=321 sw/source/ui/app/appenv.cxx:#if STLPORT_VERSION>=321 sw/source/ui/app/applab.cxx:#if STLPORT_VERSION>=321 sw/source/ui/dbui/dbmgr.cxx:#if STLPORT_VERSION>=321 sw/source/ui/wrtsh/wrtsh1.cxx:#if STLPORT_VERSION>=321 sw/source/ui/shells/textsh2.cxx:#if STLPORT_VERSION>=321 sw/source/ui/uiview/viewprt.cxx:#if STLPORT_VERSION>=321 sw/source/ui/wizard/wizgo2.cxx:#if STLPORT_VERSION>=321 tools/bootstrp/allmake.hxx:#if STLPORT_VERSION < 321 tools/bootstrp/allmake.hxx:#endif // STLPORT_VERSION < 321 tools/bootstrp/allmake.cxx:#if STLPORT_VERSION < 321 tools/bootstrp/allmake.cxx:#endif // STLPORT_VERSION < 321 transex3/source/wrdtrans.cxx:#if STLPORT_VERSION < 321 transex3/source/wrdtrans.cxx:#endif // STLPORT_VERSION < 321 unoidl/backends/beurd/burdutil.cxx:#if STLPORT_VERSION>=321 vcl/unx/source/app/vsound.hxx:#if STLPORT_VERSION>=321 vos/source/evtque.cxx:#if STLPORT_VERSION<321 xml2cmp/source/x2cclass/x2cstl.hxx:#if STLPORT_VERSION < 321 xml2cmp/source/x2cclass/x2cstl.hxx:#endif // STLPORT_VERSION < 321
Created attachment 178 [details] /tools/bootstrp/allmake.hxx : Solution to different issue, cause by same problem
Created attachment 179 [details] tools/bootstrp/allmake.cxx : as above
Actually, consistently using #if defined(STLPORT_VERSION) && STLPORT_VERSION < 321 sounds to be better than just testing for STLPORT_VERSION < 321 and won't break any existing setups. Another thing to check for are any accourences of #if STLPORT_VERSION == 400 There is no reason to change these: bridges/source/cpp_uno/gcc2_solaris_sparc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_solaris_sparc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_macosx_powerpc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_powerpc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_powerpc/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_intel/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_linux_intel/except.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_netbsd_sparc/cpp2uno.cxx:#if STLPORT_VERSION<321 bridges/source/cpp_uno/gcc2_netbsd_sparc/except.cxx:#if STLPORT_VERSION<321 as they are architecture specific. Otherwise, patch(es) are welcome.
Hi, I introduced the STLPORT_VERSION conditional long ago as a help for transition from STLPort 3.2.1 to STLPort 4.0. At that time we were not certain that STLPort 4.0 would work as expected so we needed a way out. This stuff is obsolete. We will never ever go back to STLPort 3.2.1 so the conditional should simply be removed and only new style header names should be used. John, do I understand you right that you need old style headers like vector.h for the o32 binaries? Than we are in deep trouble since most new code use new style header and the std namespace. The whole STLport usage is a bit delicate since there are many potential conflicts with native headers. On the other hand, just using the native STL implementations were not an option when we introduced the STLPort. The quality of the implementations were far to diverging at that time. I doubt that there is an easy way to support native STL implementations (maybe with the exception of the SGI STL), at least not old style ones. Additionally we have some dependencies on non standard stuff like slist, rope and hash_map. I would welcome any effort to make our usage of the STL more standard conforming, although I don't think that this should go as far as to remove the usage of the aforementioned non standard containers. Heiner -- Jens-Heiner Rechtien Release Engineer Star Office Software Entwicklungs GmbH Jens-Heiner.Rechtien@germany.sun.com
> John, do I understand you right that you need old style headers > like vector.h for the o32 binaries? Than we are in deep trouble > since most new code use new style header and the std namespace. Very necessary. The logical question is who in there right mind would run OO on a SGI machine that only supports o32 binaries. If SGI's plans for OO are anything like Mozilla (which I am also working on) then n32 is the only binaries we are working towards, with mips3 arch as prefered. > The quality of the implementations were far to diverging at that time. Fair point. > Additionally we have some dependencies on non standard stuff like slist, rope and hash_map. I agree, not using these would be a far worse loss for efficiency than it would gain in portability. Given that STLport is Open Source, any platform wishing to use there native STL can add these if necessary. I would presume we could do a complex check in configure.in to ensure that the required containers are present.
reassign
So, what happens to this issue? Do I get a large & clean patch that takes out all STL_VERSION or should I take them out assuming those who need will submit #ifdef XXX #include <oldheader.h> #endif pathces? Or?
I cant seem to see the problems in OO627, so perhaps we should just leave it for now ... other fires to fight?
Sure. I'm closing it for now as 'worksforme' and going home to sleep. If it comes back, we can either reopen it or have a brand new issue. just helps to keep stuff that is urgent and at hand in view.
Going thru and checking OO627B from the tree, I have run into this problem again. Personally I would like to see these #if 's left in the tree, and modified as per these two patches for two reasons. Firstly so that programmers continue the practise of explicitly indicating they are using the new stl. Secondly to existing old stl around in case SGI needs to work on o32 binaries/libraries, or to allow another platform which is having problems with STLport but have and older style STL, attempt to get this to work. It would be nice if these two went into the tree sooner than later, however I agree we should tackle all these at once, and so I am willing to create a patch for all these files to add the #if defined (STLPORT_VERSION) CC -KPIC -c -n32 -ansi -ptused -OPT:Olimit=20523 -I. -I. -I../inc -I../inc - I../unx/inc -I../unxirxm3.pro/inc -I. - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/sal/inc - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/vos/inc -I. - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/solver/627/unxirxm3.pr o/inc - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/solver/627/unxirxm3.pr o/inc/external - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/solenv/unxirxm3/inc - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/solenv/inc - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/res -I/usr/include - I/usr/include/CC/stlport - I/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/solenv/inc/Xp31 - I/projects/sise/mozilla/devel/workpits/oo/java_1.2.2/usr/java/include - I/projects/sise/mozilla/devel/workpits/oo/java_1.2.2/usr/java/include/irix - I/projects/sise/mozilla/devel/workpits/oo/java_1.2.2/usr/java/include/native_thr eads/include -I/usr/include -I/usr/include -I. -I../res -I. -O -LANG:std - woff 1009,1021,1107,1110,1155,1171,1183,1185,1188,1233,1234,1257,1440,1516,1681,1682 -DIRIX -DUNX -DVCL -DC730 -DC730 -DMIPS -DTF_UCB -DENABLEUNICODE - DTF_SDBAPI -DTF_FILTER -DCVER=C730 -D_USE_NAMESPACE -DVCL -D_STD_NO_NAMESPACE - D_VOS_NO_NAMESPACE -D_UNO_NO_NAMESPACE -D__DMAKE -DUNIX -DSUPD=627 - DBUILD=6382 -DSOLAR_PLUGIN -DVCL -DSO3 -DPRODUCT -DNDEBUG -DPRODUCT_FULL - DOPTIMIZE -DEXCEPTIONS_OFF -DCUI -DSRC627 -DBOOTSTRAPPER -DTF_ONE51 - D_TOOLS_STRINGLIST -DMULTITHREAD - o ../unxirxm3.pro/obj/allmake.o /projects/sise/mozilla/devel/workpits/oo/OO627B/ workarea/tools/bootstrp/allmake.cxx cc-1005 CC: ERROR File = /projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/tools/bootstrp/allmak e.hxx, Line = 70 The source file "tools/presys.h" is unavailable. #include <tools/presys.h> ^ 1 catastrophic error detected in the compilation of "/projects/sise/mozilla/devel/workpits/oo/OO627B/workarea/tools/bootstrp/allm ake.cxx".
allmake.cxx patch applied in 1.5.4.1 allmake.hxx patch applied in 1.3.4.1
Verifying issue is no longer around. Please close.
Closing