This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [gcc-in-cxx] replacing qsort with std::sort
On Mon, Aug 31, 2009 at 6:07 PM, Richard Henderson<rth@redhat.com> wrote:
> On 08/31/2009 08:26 AM, Pedro Lamarão wrote:
>>
>> I'll try to include cstdlib in system.h to see if that's enough.
>
> Note the existing
>
> #ifdef HAVE_STDLIB_H
> # include <stdlib.h>
> #endif
>
> You may wish to convert this to
>
> #ifdef __cplusplus
> # include <cstdlib>
> #elif defined(HAVE_STDLIB_H)
> # include <stdlib.h>
> #endif
>
> and similarly for all of the other C headers
> that the C++ standard wraps.
In which case you'd need a strathegic using namespace std; somewhere.
Richard.