You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by kn...@apache.org on 2003/05/21 23:08:04 UTC

cvs commit: xml-xerces/c/src/xercesc/util AutoSense.hpp RefHash3KeysIdPool.c

knoaman     2003/05/21 14:08:04

  Modified:    c/src/xercesc/dom/impl DOMDeepNodeListPool.c
               c/src/xercesc/util AutoSense.hpp RefHash3KeysIdPool.c
  Log:
  gcc 2.95.x is generating an internal error for some template definitions, so
  we use the default memory manger in such cases.
  
  Revision  Changes    Path
  1.7       +16 -1     xml-xerces/c/src/xercesc/dom/impl/DOMDeepNodeListPool.c
  
  Index: DOMDeepNodeListPool.c
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/dom/impl/DOMDeepNodeListPool.c,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DOMDeepNodeListPool.c	15 May 2003 18:25:54 -0000	1.6
  +++ DOMDeepNodeListPool.c	21 May 2003 21:08:03 -0000	1.7
  @@ -336,6 +336,20 @@
       }
       else
       {
  +    // Revisit: the gcc compiler 2.95.x is generating an
  +    // internal compiler error message. So we use the default
  +    // memory manager for now.
  +#if defined (XML_GCC_VERSION) && (XML_GCC_VERSION < 29600)
  +        newBucket = new DOMDeepNodeListPoolTableBucketElem<TVal>
  +        (
  +            key1
  +            , key2
  +            , key3
  +            , valueToAdopt
  +            , fBucketList[hashVal]
  +            , fMemoryManager
  +        );
  +#else
           newBucket = new (fMemoryManager) DOMDeepNodeListPoolTableBucketElem<TVal>
           (
               key1
  @@ -345,6 +359,7 @@
               , fBucketList[hashVal]
               , fMemoryManager
           );
  +#endif
           fBucketList[hashVal] = newBucket;
       }
   
  
  
  
  1.12      +15 -0     xml-xerces/c/src/xercesc/util/AutoSense.hpp
  
  Index: AutoSense.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/AutoSense.hpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- AutoSense.hpp	12 May 2003 09:44:19 -0000	1.11
  +++ AutoSense.hpp	21 May 2003 21:08:04 -0000	1.12
  @@ -56,6 +56,10 @@
   
   /*
    * $Log$
  + * Revision 1.12  2003/05/21 21:08:04  knoaman
  + * gcc 2.95.x is generating an internal error for some template definitions, so
  + * we use the default memory manger in such cases.
  + *
    * Revision 1.11  2003/05/12 09:44:19  gareth
    * Port to NetBSD. Patch by Hiramatsu Yoshifumi.
    *
  @@ -324,5 +328,17 @@
   #else
       #error Code requires port to current development environment
   #endif
  +
  +// ---------------------------------------------------------------------------
  +//  The gcc compiler 2.95... is generating an internal error for some template
  +//  definitions. So, if we are compiling with gcc, have a specific define that
  +//  we can later use in the code.
  +// ---------------------------------------------------------------------------
  +#if defined(__GNUC__)
  +#define XML_GCC_VERSION (__GNUC__ * 10000 \
  +                         + __GNUC_MINOR__ * 100 \
  +                         + __GNUC_PATCHLEVEL__)
  +#endif
  +
   
   #endif
  
  
  
  1.5       +10 -0     xml-xerces/c/src/xercesc/util/RefHash3KeysIdPool.c
  
  Index: RefHash3KeysIdPool.c
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/util/RefHash3KeysIdPool.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RefHash3KeysIdPool.c	16 May 2003 06:01:52 -0000	1.4
  +++ RefHash3KeysIdPool.c	21 May 2003 21:08:04 -0000	1.5
  @@ -56,6 +56,10 @@
   
   /**
    * $Log$
  + * Revision 1.5  2003/05/21 21:08:04  knoaman
  + * gcc 2.95.x is generating an internal error for some template definitions, so
  + * we use the default memory manger in such cases.
  + *
    * Revision 1.4  2003/05/16 06:01:52  knoaman
    * Partial implementation of the configurable memory manager.
    *
  @@ -336,7 +340,14 @@
       }
        else
       {
  +    // Revisit: the gcc compiler 2.95.x is generating an
  +    // internal compiler error message. So we use the default
  +    // memory manager for now.
  +#if defined (XML_GCC_VERSION) && (XML_GCC_VERSION < 29600)
  +        newBucket = new RefHash3KeysTableBucketElem<TVal>(key1, key2, key3, valueToAdopt, fBucketList[hashVal]);
  +#else
           newBucket = new (fMemoryManager) RefHash3KeysTableBucketElem<TVal>(key1, key2, key3, valueToAdopt, fBucketList[hashVal]);
  +#endif
           fBucketList[hashVal] = newBucket;
       }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org