This is the mail archive of the libstdc++@sources.redhat.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] libstdc++-v3 changes for glibc2.1



Here are the results of some libstdcxx-v3 + cshadow-headers experiments
that I have run over the week-end on a linux box with a glibc-2.1.3.

I tried to bootstrap a compiler on a i686-pc-linux-gnu (With Alan's patch on i386.md but that's not the
point here) and --enable-libstdcxx-v3 --enable-c-cpplib --enable-cshadow-headers.
That failed for multiple reasons:

First: it seems that the current settings of libstdc++-v3 is highly dependent
on the use of the newest glibc which is not installed on my machine. This was
easy to correct with some typedefs as the new glibc is careful to provide
preprocessor macros (first two hunks of the patch below). Reading 
Ulrich latest messages, maybe the best approach would have been to 
create a file specific for glibc-2.1 targets and not clutter the 
current file (let me know -- and please give me hints on how to do
that -- and I'll update the patch)...

Then, I had some troubles with the newly integrated libsupc++ because
::size_t (and eventually others) was used instead of std::size_t 
(rest of the patch below).

Then there was a small problem realted with automake:

One header is exception and there is a source file called exception.cc. Both those
files are declared properly within Makefile.am but exception.cc being newer than
exception, make was attempting to regenerate it from exception.cc (of course with the
wrong options). I corrected that by touching the file exception, but there should be better
ways to do that (possibly by stating an explicit dependency
exception:
in Makefile.am, but I'm not sure this is the best solution, renaming exception.cc might be better).

Finally, I had problems with libtool because it seems that the tag CXX is defined with one
set of options to g++ at configure time but used with a slightly different set when one is doing
make bootstrap. Can libtool guru (Alexandre?) point what the proper correction is ?
Just typing make at the libstdc++-v3 level seems to work fine...

Then, the all test framework was mostly failing but this seems related to the fact that some
include directory were not searched (and by the way install dirs where searched which makes
in-build-directory-checking difficult), but I think this has been the topic of some mail
exchange already.

ChangeLog:

2000-10-15 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>

    * include/c_std/unistd.h: Define some types only when
    defined in the original unistd.h.
    * include/c_std/bits/std_cstddef.h: Explicitly ask for
    the definition of size_t, ptrdiff_t and NULL.

    * libsupc++/exception.cc: Use namespace std.
    * libsupc++/new: DITTO.
    * libsupc++/new_op.cc: DITTO.
    * libsupc++/new_opnt.cc: DITTO.
    * libsupc++/new_opv.cc: DITTO.
    * libsupc++/new_opvnt.cc: DITTO.
    * libsupc++/tinfo.cc: DITTO.
    * libsupc++/tinfo.h: DITTO.
    * libsupc++/vec.cc: DITTO.

    * libsupc++/Makefile.am: Blank lines removal.
    * include/c_std/bits/wrap_unistd.h: DITTO.

Index: include/c_std/unistd.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/unistd.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 unistd.h
*** unistd.h	2000/10/12 12:44:57	1.1
--- unistd.h	2000/10/16 10:49:51
***************
*** 43,56 ****
--- 43,70 ----
   
    // Expose global C names, including non-standard ones, but shadow
    // some names and types with the std:: C++ version.
+ #ifdef __gid_t_defined
    using _C_legacy::gid_t;
+ #endif
+ #ifdef __uid_t_defined
    using _C_legacy::uid_t;
+ #endif
+ #ifdef __off_t_defined
    using _C_legacy::off_t;
+ #endif
+ #ifdef __off64_t_defined
    using _C_legacy::off64_t;
+ #endif
+ #ifdef __useconds_t_defined
    using _C_legacy::useconds_t;
+ #endif
+ #ifdef __pid_t_defined
    using _C_legacy::pid_t;
+ #endif
    using _C_legacy::intptr_t;
+ #ifdef __socklen_t_defined
    using _C_legacy::socklen_t;
+ #endif
  
    using _C_legacy::access;
    using _C_legacy::euidaccess;
Index: include/c_std/bits/std_cstddef.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/std_cstddef.h,v
retrieving revision 1.3
diff -c -3 -p -r1.3 std_cstddef.h
*** std_cstddef.h	2000/10/12 12:45:58	1.3
--- std_cstddef.h	2000/10/16 10:49:51
*************** namespace _C_legacy {
*** 38,43 ****
--- 38,46 ----
    extern "C" {
  #     define _IN_C_LEGACY_
  #     pragma GCC system_header
+ #define __need_size_t
+ #define __need_ptrdiff_t
+ #define __need_NULL
  #     include_next <stddef.h>
    }
  } // namespace _C_legacy
*************** namespace std {
*** 53,60 ****
  # undef _IN_C_LEGACY_
  
  #endif
- 
- 
- 
- 
- 
--- 56,58 ----
Index: include/c_std/bits/wrap_unistd.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/c_std/bits/wrap_unistd.h,v
retrieving revision 1.1
diff -c -3 -p -r1.1 wrap_unistd.h
*** wrap_unistd.h	2000/10/12 12:44:57	1.1
--- wrap_unistd.h	2000/10/16 10:49:51
*************** namespace _C_legacy {
*** 45,79 ****
  # undef _IN_C_LEGACY_
  
  #endif
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
- 
--- 45,47 ----
Index: libsupc++/Makefile.am
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/Makefile.am,v
retrieving revision 1.9
diff -c -3 -p -r1.9 Makefile.am
*** Makefile.am	2000/10/15 08:45:32	1.9
--- Makefile.am	2000/10/16 10:49:52
*************** LTCXXCOMPILE = $(LIBTOOL) --mode=compile
*** 140,147 ****
  # in libtool since this would add -lstdc++ to the link line which of
  # course is impossible.
  CXXLINK = $(LIBTOOL) --mode=link "$(CC)" @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
- 
- 
- 
- 
- 
--- 140,142 ----
Index: libsupc++/exception.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/exception.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 exception.cc
*** exception.cc	2000/10/06 23:31:22	1.1
--- exception.cc	2000/10/16 10:49:52
***************
*** 31,37 ****
  
  #include "typeinfo"
  #include "exception"
! #include <stddef.h>
  #include "gansidecl.h" /* Needed to support macros used in eh-common.h. */
  #include "eh-common.h"
  
--- 31,37 ----
  
  #include "typeinfo"
  #include "exception"
! #include <cstddef>
  #include "gansidecl.h" /* Needed to support macros used in eh-common.h. */
  #include "eh-common.h"
  
*************** struct cp_eh_info
*** 119,125 ****
  extern "C" cp_eh_info **__get_eh_info (); 	// actually void **
  
  /* Exception allocate and free, defined in libgcc2. */
! extern "C" void *__eh_alloc(size_t);
  extern "C" void __eh_free(void *);
  
  /* Is P the type_info node for a pointer of some kind?  */
--- 119,125 ----
  extern "C" cp_eh_info **__get_eh_info (); 	// actually void **
  
  /* Exception allocate and free, defined in libgcc2. */
! extern "C" void *__eh_alloc(std::size_t);
  extern "C" void __eh_free(void *);
  
  /* Is P the type_info node for a pointer of some kind?  */
Index: libsupc++/new
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/new,v
retrieving revision 1.1
diff -c -3 -p -r1.1 new
*** new	2000/10/10 23:43:26	1.1
--- new	2000/10/16 10:49:52
*************** namespace std {
*** 52,69 ****
  } // namespace std
  
  // replaceable signatures
! void *operator new (size_t) throw (std::bad_alloc);
! void *operator new[] (size_t) throw (std::bad_alloc);
  void operator delete (void *) throw();
  void operator delete[] (void *) throw();
! void *operator new (size_t, const std::nothrow_t&) throw();
! void *operator new[] (size_t, const std::nothrow_t&) throw();
  void operator delete (void *, const std::nothrow_t&) throw();
  void operator delete[] (void *, const std::nothrow_t&) throw();
  
  // default placement versions of operator new
! inline void *operator new(size_t, void *place) throw() { return place; }
! inline void *operator new[](size_t, void *place) throw() { return place; }
  } // extern "C++"
  
  #endif
--- 52,69 ----
  } // namespace std
  
  // replaceable signatures
! void *operator new (std::size_t) throw (std::bad_alloc);
! void *operator new[] (std::size_t) throw (std::bad_alloc);
  void operator delete (void *) throw();
  void operator delete[] (void *) throw();
! void *operator new (std::size_t, const std::nothrow_t&) throw();
! void *operator new[] (std::size_t, const std::nothrow_t&) throw();
  void operator delete (void *, const std::nothrow_t&) throw();
  void operator delete[] (void *, const std::nothrow_t&) throw();
  
  // default placement versions of operator new
! inline void *operator new(std::size_t, void *place) throw() { return place; }
! inline void *operator new[](std::size_t, void *place) throw() { return place; }
  } // extern "C++"
  
  #endif
Index: libsupc++/new_op.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/new_op.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 new_op.cc
*** new_op.cc	2000/10/06 23:31:22	1.1
--- new_op.cc	2000/10/16 10:49:52
***************
*** 31,41 ****
  using std::new_handler;
  using std::bad_alloc;
  
! extern "C" void *malloc (size_t);
  extern new_handler __new_handler;
  
  void *
! operator new (size_t sz) throw (std::bad_alloc)
  {
    void *p;
  
--- 31,41 ----
  using std::new_handler;
  using std::bad_alloc;
  
! extern "C" void *malloc (std::size_t);
  extern new_handler __new_handler;
  
  void *
! operator new (std::size_t sz) throw (std::bad_alloc)
  {
    void *p;
  
Index: libsupc++/new_opnt.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/new_opnt.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 new_opnt.cc
*** new_opnt.cc	2000/10/06 23:31:22	1.1
--- new_opnt.cc	2000/10/16 10:49:52
***************
*** 31,41 ****
  using std::new_handler;
  using std::bad_alloc;
  
! extern "C" void *malloc (size_t);
  extern new_handler __new_handler;
  
  void *
! operator new (size_t sz, const std::nothrow_t&) throw()
  {
    void *p;
  
--- 31,41 ----
  using std::new_handler;
  using std::bad_alloc;
  
! extern "C" void *malloc (std::size_t);
  extern new_handler __new_handler;
  
  void *
! operator new (std::size_t sz, const std::nothrow_t&) throw()
  {
    void *p;
  
Index: libsupc++/new_opv.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/new_opv.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 new_opv.cc
*** new_opv.cc	2000/10/06 23:31:22	1.1
--- new_opv.cc	2000/10/16 10:49:52
***************
*** 30,36 ****
  #include "new"
  
  void *
! operator new[] (size_t sz) throw (std::bad_alloc)
  {
    return ::operator new(sz);
  }
--- 30,36 ----
  #include "new"
  
  void *
! operator new[] (std::size_t sz) throw (std::bad_alloc)
  {
    return ::operator new(sz);
  }
Index: libsupc++/new_opvnt.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/new_opvnt.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 new_opvnt.cc
*** new_opvnt.cc	2000/10/06 23:31:22	1.1
--- new_opvnt.cc	2000/10/16 10:49:52
***************
*** 30,36 ****
  #include "new"
  
  void *
! operator new[] (size_t sz, const std::nothrow_t& nothrow) throw()
  {
    return ::operator new(sz, nothrow);
  }
--- 30,36 ----
  #include "new"
  
  void *
! operator new[] (std::size_t sz, const std::nothrow_t& nothrow) throw()
  {
    return ::operator new(sz, nothrow);
  }
Index: libsupc++/tinfo.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/tinfo.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 tinfo.cc
*** tinfo.cc	2000/10/06 23:31:22	1.1
--- tinfo.cc	2000/10/16 10:49:52
***************
*** 29,35 ****
  
  #pragma implementation "typeinfo"
  
! #include <stddef.h>
  #include "tinfo.h"
  #include "new"			// for placement new
  
--- 29,35 ----
  
  #pragma implementation "typeinfo"
  
! #include <cstddef>
  #include "tinfo.h"
  #include "new"			// for placement new
  
*************** operator== (const std::type_info& arg) c
*** 73,79 ****
  
  extern "C" void
  __rtti_class (void *addr, const char *name,
! 	      const __class_type_info::base_info *bl, size_t bn)
  { new (addr) __class_type_info (name, bl, bn); }
  
  extern "C" void
--- 73,79 ----
  
  extern "C" void
  __rtti_class (void *addr, const char *name,
! 	      const __class_type_info::base_info *bl, std::size_t bn)
  { new (addr) __class_type_info (name, bl, bn); }
  
  extern "C" void
*************** do_upcast (sub_kind access_path,
*** 274,280 ****
        return contained_nonpublic_p (access_path);
      }
    
!   for (size_t i = n_bases; i--;)
      {
        upcast_result result2;
        void *p = objptr;
--- 274,280 ----
        return contained_nonpublic_p (access_path);
      }
    
!   for (std::size_t i = n_bases; i--;)
      {
        upcast_result result2;
        void *p = objptr;
*************** do_dyncast (int boff, sub_kind access_pa
*** 366,372 ****
        return false;
      }
    bool result_ambig = false;
!   for (size_t i = n_bases; i--;)
      {
        dyncast_result result2;
        void *p;
--- 366,372 ----
        return false;
      }
    bool result_ambig = false;
!   for (std::size_t i = n_bases; i--;)
      {
        dyncast_result result2;
        void *p;
*************** do_find_public_subobj (int boff, const t
*** 513,519 ****
    if (objptr == subptr && subtype == *this)
      return contained_public;
    
!   for (size_t i = n_bases; i--;)
      {
        if (base_list[i].access != PUBLIC)
          continue; // Not public, can't be here.
--- 513,519 ----
    if (objptr == subptr && subtype == *this)
      return contained_public;
    
!   for (std::size_t i = n_bases; i--;)
      {
        if (base_list[i].access != PUBLIC)
          continue; // Not public, can't be here.
*************** __do_find_public_src (ptrdiff_t src2dst,
*** 767,773 ****
    if (obj_ptr == src_ptr && *this == *src_type)
      return __contained_public;
    
!   for (size_t i = __base_count; i--;)
      {
        if (!__base_info[i].__is_public_p ())
          continue; // Not public, can't be here.
--- 767,773 ----
    if (obj_ptr == src_ptr && *this == *src_type)
      return __contained_public;
    
!   for (std::size_t i = __base_count; i--;)
      {
        if (!__base_info[i].__is_public_p ())
          continue; // Not public, can't be here.
*************** __do_dyncast (ptrdiff_t src2dst,
*** 894,900 ****
      }
  
    bool result_ambig = false;
!   for (size_t i = __base_count; i--;)
      {
        __dyncast_result result2 (result.whole_details);
        void const *base = obj_ptr;
--- 894,900 ----
      }
  
    bool result_ambig = false;
!   for (std::size_t i = __base_count; i--;)
      {
        __dyncast_result result2 (result.whole_details);
        void const *base = obj_ptr;
*************** __do_upcast (const __class_type_info *ds
*** 1089,1095 ****
    if (src_details & __flags_unknown_mask)
      src_details = __flags;
    
!   for (size_t i = __base_count; i--;)
      {
        __upcast_result result2 (src_details);
        const void *base = obj_ptr;
--- 1089,1095 ----
    if (src_details & __flags_unknown_mask)
      src_details = __flags;
    
!   for (std::size_t i = __base_count; i--;)
      {
        __upcast_result result2 (src_details);
        const void *base = obj_ptr;
Index: libsupc++/tinfo.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/tinfo.h,v
retrieving revision 1.2
diff -c -3 -p -r1.2 tinfo.h
*** tinfo.h	2000/10/10 23:50:39	1.2
--- tinfo.h	2000/10/16 10:49:52
***************
*** 2,7 ****
--- 2,8 ----
  // Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000 Free Software Foundation
  
  #include "typeinfo"
+ #include <cstddef>
  
  // Class declarations shared between the typeinfo implementation files.
  
*************** struct __class_type_info : public __user
*** 200,208 ****
    };
  
    const base_info *base_list;
!   size_t n_bases;
  
!   __class_type_info (const char *name, const base_info *bl, size_t bn)
      : __user_type_info (name), base_list (bl), n_bases (bn) {}
  
    public:
--- 201,209 ----
    };
  
    const base_info *base_list;
!   std::size_t n_bases;
  
!   __class_type_info (const char *name, const base_info *bl, std::size_t bn)
      : __user_type_info (name), base_list (bl), n_bases (bn) {}
  
    public:
Index: libsupc++/vec.cc
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libsupc++/vec.cc,v
retrieving revision 1.1
diff -c -3 -p -r1.1 vec.cc
*** vec.cc	2000/10/06 23:31:22	1.1
--- vec.cc	2000/10/16 10:49:52
*************** namespace __cxxabiv1
*** 41,49 ****
  
  /* allocate and construct array */
  extern "C" void *
! __cxa_vec_new (size_t element_count,
!                size_t element_size,
!                size_t padding_size,
                 void (*constructor) (void *),
                 void (*destructor) (void *))
  {
--- 41,49 ----
  
  /* allocate and construct array */
  extern "C" void *
! __cxa_vec_new (std::size_t element_count,
!                std::size_t element_size,
!                std::size_t padding_size,
                 void (*constructor) (void *),
                 void (*destructor) (void *))
  {
*************** __cxa_vec_new (size_t element_count,
*** 53,73 ****
  }
  
  extern "C" void *
! __cxa_vec_new2 (size_t element_count,
!                 size_t element_size,
!                 size_t padding_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *),
!                 void *(*alloc) (size_t),
                  void (*dealloc) (void *))
  {
!   size_t size = element_count * element_size + padding_size;
    char *base = static_cast <char *> (alloc (size));
    
    if (padding_size)
      {
        base += padding_size;
!       reinterpret_cast <size_t *> (base)[-1] = element_count;
      }
    try
      {
--- 53,73 ----
  }
  
  extern "C" void *
! __cxa_vec_new2 (std::size_t element_count,
!                 std::size_t element_size,
!                 std::size_t padding_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *),
!                 void *(*alloc) (std::size_t),
                  void (*dealloc) (void *))
  {
!   std::size_t size = element_count * element_size + padding_size;
    char *base = static_cast <char *> (alloc (size));
    
    if (padding_size)
      {
        base += padding_size;
!       reinterpret_cast <std::size_t *> (base)[-1] = element_count;
      }
    try
      {
*************** __cxa_vec_new2 (size_t element_count,
*** 84,104 ****
  }
  
  extern "C" void *
! __cxa_vec_new3 (size_t element_count,
!                 size_t element_size,
!                 size_t padding_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *),
!                 void *(*alloc) (size_t),
!                 void (*dealloc) (void *, size_t))
  {
!   size_t size = element_count * element_size + padding_size;
    char *base = static_cast <char *> (alloc (size));
    
    if (padding_size)
      {
        base += padding_size;
!       reinterpret_cast <size_t *> (base)[-1] = element_count;
      }
    try
      {
--- 84,104 ----
  }
  
  extern "C" void *
! __cxa_vec_new3 (std::size_t element_count,
!                 std::size_t element_size,
!                 std::size_t padding_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *),
!                 void *(*alloc) (std::size_t),
!                 void (*dealloc) (void *, std::size_t))
  {
!   std::size_t size = element_count * element_size + padding_size;
    char *base = static_cast <char *> (alloc (size));
    
    if (padding_size)
      {
        base += padding_size;
!       reinterpret_cast <std::size_t *> (base)[-1] = element_count;
      }
    try
      {
*************** __cxa_vec_new3 (size_t element_count,
*** 117,128 ****
  /* construct array */
  extern "C" void
  __cxa_vec_ctor (void *array_address,
!                 size_t element_count,
!                 size_t element_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *))
  {
!   size_t ix = 0;
    char *ptr = static_cast <char *> (array_address);
    
    try
--- 117,128 ----
  /* construct array */
  extern "C" void
  __cxa_vec_ctor (void *array_address,
!                 std::size_t element_count,
!                 std::size_t element_size,
                  void (*constructor) (void *),
                  void (*destructor) (void *))
  {
!   std::size_t ix = 0;
    char *ptr = static_cast <char *> (array_address);
    
    try
*************** __cxa_vec_ctor (void *array_address,
*** 144,155 ****
  extern "C" void
  __cxa_vec_cctor (void *dest_array,
  		 void *src_array,
! 		 size_t element_count,
! 		 size_t element_size,
  		 void (*constructor) (void *, void *),
  		 void (*destructor) (void *))
  {
!   size_t ix = 0;
    char *dest_ptr = static_cast <char *> (dest_array);
    char *src_ptr = static_cast <char *> (src_array);
  
--- 144,155 ----
  extern "C" void
  __cxa_vec_cctor (void *dest_array,
  		 void *src_array,
! 		 std::size_t element_count,
! 		 std::size_t element_size,
  		 void (*constructor) (void *, void *),
  		 void (*destructor) (void *))
  {
!   std::size_t ix = 0;
    char *dest_ptr = static_cast <char *> (dest_array);
    char *src_ptr = static_cast <char *> (src_array);
  
*************** __cxa_vec_cctor (void *dest_array,
*** 171,184 ****
  /* destruct array */
  extern "C" void
  __cxa_vec_dtor (void *array_address,
!                 size_t element_count,
!                 size_t element_size,
                  void (*destructor) (void *))
  {
    if (destructor)
      {
        char *ptr = static_cast <char *> (array_address);
!       size_t ix = element_count;
        bool unwinding = std::uncaught_exception ();
        
        ptr += element_count * element_size;
--- 171,184 ----
  /* destruct array */
  extern "C" void
  __cxa_vec_dtor (void *array_address,
!                 std::size_t element_count,
!                 std::size_t element_size,
                  void (*destructor) (void *))
  {
    if (destructor)
      {
        char *ptr = static_cast <char *> (array_address);
!       std::size_t ix = element_count;
        bool unwinding = std::uncaught_exception ();
        
        ptr += element_count * element_size;
*************** __cxa_vec_dtor (void *array_address,
*** 207,214 ****
  /* destruct and release array */
  extern "C" void
  __cxa_vec_delete (void *array_address,
!                   size_t element_size,
!                   size_t padding_size,
                    void (*destructor) (void *))
  {
    __cxa_vec_delete2 (array_address, element_size, padding_size,
--- 207,214 ----
  /* destruct and release array */
  extern "C" void
  __cxa_vec_delete (void *array_address,
!                   std::size_t element_size,
!                   std::size_t padding_size,
                    void (*destructor) (void *))
  {
    __cxa_vec_delete2 (array_address, element_size, padding_size,
*************** __cxa_vec_delete (void *array_address,
*** 218,225 ****
  
  extern "C" void
  __cxa_vec_delete2 (void *array_address,
!                   size_t element_size,
!                   size_t padding_size,
                    void (*destructor) (void *),
                    void (*dealloc) (void *))
  {
--- 218,225 ----
  
  extern "C" void
  __cxa_vec_delete2 (void *array_address,
!                   std::size_t element_size,
!                   std::size_t padding_size,
                    void (*destructor) (void *),
                    void (*dealloc) (void *))
  {
*************** __cxa_vec_delete2 (void *array_address,
*** 227,233 ****
    
    if (padding_size)
      {
!       size_t element_count = reinterpret_cast <size_t *> (base)[-1];
        base -= padding_size;
        try
          {
--- 227,233 ----
    
    if (padding_size)
      {
!       std::size_t element_count = reinterpret_cast <std::size_t *> (base)[-1];
        base -= padding_size;
        try
          {
*************** __cxa_vec_delete2 (void *array_address,
*** 246,262 ****
  
  extern "C" void
  __cxa_vec_delete3 (void *array_address,
!                   size_t element_size,
!                   size_t padding_size,
                    void (*destructor) (void *),
!                   void (*dealloc) (void *, size_t))
  {
    char *base = static_cast <char *> (array_address);
!   size_t size = 0;
    
    if (padding_size)
      {
!       size_t element_count = reinterpret_cast <size_t *> (base)[-1];
        base -= padding_size;
        size = element_count * element_size + padding_size;
        try
--- 246,262 ----
  
  extern "C" void
  __cxa_vec_delete3 (void *array_address,
!                   std::size_t element_size,
!                   std::size_t padding_size,
                    void (*destructor) (void *),
!                   void (*dealloc) (void *, std::size_t))
  {
    char *base = static_cast <char *> (array_address);
!   std::size_t size = 0;
    
    if (padding_size)
      {
!       std::size_t element_count = reinterpret_cast <std::size_t *> (base)[-1];
        base -= padding_size;
        size = element_count * element_size + padding_size;
        try

 --------------------------------------------------------------------
 Theodore Papadopoulo
 Email: Theodore.Papadopoulo@sophia.inria.fr Tel: (33) 04 92 38 76 01
 --------------------------------------------------------------------



PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]