head	1.5;
access;
symbols
	RELENG_9_1_0_RELEASE:1.3.2.2
	RELENG_9_1:1.3.2.2.0.2
	RELENG_9_1_BP:1.3.2.2
	RELENG_9:1.3.0.2;
locks; strict;
comment	@# @;


1.5
date	2012.11.26.21.55.08;	author svnexp;	state Exp;
branches;
next	1.4;

1.4
date	2012.10.22.18.25.04;	author dim;	state Exp;
branches;
next	1.3;

1.3
date	2012.03.14.14.40.22;	author theraven;	state Exp;
branches
	1.3.2.1;
next	1.2;

1.2
date	2012.03.14.00.09.36;	author theraven;	state Exp;
branches;
next	1.1;

1.1
date	2011.11.25.20.59.04;	author theraven;	state Exp;
branches;
next	;

1.3.2.1
date	2012.05.22.18.30.14;	author theraven;	state dead;
branches;
next	1.3.2.2;

1.3.2.2
date	2012.05.22.18.30.14;	author theraven;	state Exp;
branches;
next	1.3.2.3;

1.3.2.3
date	2012.11.21.18.41.40;	author svnexp;	state Exp;
branches;
next	1.3.2.4;

1.3.2.4
date	2012.12.19.16.26.43;	author svnexp;	state Exp;
branches;
next	1.3.2.5;

1.3.2.5
date	2014.03.05.20.01.45;	author svnexp;	state Exp;
branches;
next	;


desc
@@


1.5
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243572
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243572 | dim | 2012-11-26 21:32:31 +0000 (Mon, 26 Nov 2012) | 15 lines
## SVN ##
## SVN ## Pull in r168610 from upstream libc++:
## SVN ##
## SVN ##   When using libc++ headers on FreeBSD, in combination with -std=c++98,
## SVN ##   -ansi or -std=c++03, the long long type is not supported.  So in this
## SVN ##   case, several functions and types, like lldiv_t, strtoll(), are not
## SVN ##   declared.
## SVN ##
## SVN ## This should make it possible to use the libc++ headers in c++98 mode.
## SVN ##
## SVN ## Note: libc++ is originally designed as a c++0x or higher library, so you
## SVN ## should still take care when using it with c++98 or c++03.
## SVN ##
## SVN ## Noted by:	Yamaya Takashi <yamayan@@kbh.biglobe.ne.jp>
## SVN ## MFC after:	1 week
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@// -*- C++ -*-
//===--------------------------- cstdlib ----------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDLIB
#define _LIBCPP_CSTDLIB

/*
    cstdlib synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

namespace std
{

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11

}  // std

*/

#include <__config>
#include <stdlib.h>
#ifdef _MSC_VER
#include "support/win32/locale_win32.h"
#endif // _MSC_VER

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

using ::size_t;
using ::div_t;
using ::ldiv_t;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::lldiv_t;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::atof;
using ::atoi;
using ::atol;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::atoll;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::strtod;
using ::strtof;
using ::strtold;
using ::strtol;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::strtoll;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::strtoul;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::strtoull;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::rand;
using ::srand;
using ::calloc;
using ::free;
using ::malloc;
using ::realloc;
using ::abort;
using ::atexit;
using ::exit;
using ::_Exit;
using ::getenv;
using ::system;
using ::bsearch;
using ::qsort;
using ::abs;
using ::labs;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::llabs;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::div;
using ::ldiv;
#ifndef _LIBCPP_HAS_NO_LONG_LONG
using ::lldiv;
#endif // _LIBCPP_HAS_NO_LONG_LONG
using ::mblen;
using ::mbtowc;
using ::wctomb;
using ::mbstowcs;
using ::wcstombs;
#ifdef _LIBCPP_HAS_QUICK_EXIT
using ::at_quick_exit;
using ::quick_exit;
#endif
#ifdef _LIBCPP_HAS_C11_FEATURES
using ::aligned_alloc;
#endif

// MSVC already has the correct prototype in <stdlib.h.h> #ifdef __cplusplus
#if !defined(_MSC_VER) && !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
#ifndef _LIBCPP_HAS_NO_LONG_LONG
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
#endif // _LIBCPP_HAS_NO_LONG_LONG

inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __y);}
#ifndef _LIBCPP_HAS_NO_LONG_LONG
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
#endif // _LIBCPP_HAS_NO_LONG_LONG
#endif // _MSC_VER

_LIBCPP_END_NAMESPACE_STD

#endif  // _LIBCPP_CSTDLIB
@


1.4
log
@SVN rev 241903 on 2012-10-22 18:25:04Z by dim

Import libc++ trunk r165949.  Among other improvements and bug fixes,
this has many visibility problems fixed, which should help with
compiling certain ports that exercise C++11 mode (i.e. Firefox).

Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
which are referred to in all the source files.

MFC after:	1 month
@
text
@d100 1
d102 1
d106 1
d108 1
d113 1
d115 1
d117 1
d119 1
d136 1
d138 1
d141 1
d143 1
d160 1
d162 1
d165 1
d167 1
@


1.3
log
@SVN rev 232972 on 2012-03-14 14:40:22Z by theraven

Import a slightly newer libc++, with some bugs fixed that were found by running
the test suite on FreeBSD.

Approved by:	dim (mentor)
@
text
@d77 3
d141 3
d147 2
a148 2
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) {return  labs(__x);}
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) {return llabs(__x);}
d150 2
a151 2
inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) {return  ldiv(__x, __y);}
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) {return lldiv(__x, __y);}
@


1.3.2.1
log
@file cstdlib was added on branch RELENG_9 on 2012-05-22 18:32:26 +0000
@
text
@d1 150
@


1.3.2.2
log
@SVN rev 235798 on 2012-05-22 18:30:14Z by theraven

Merged libcxxrt and libc++.  Now available for testing on 9-stable with
-stdlib=libc++.  Changes to libstdc++ not yet merged, so it is not yet possible
to mix libstdc++ and libc++ in the same program.

Merged revisions: 226702,226785,227006,227755,227983,227987,228531,228630,228761,229067,230127,232950,233098,234715-234716,234772
@
text
@a0 150
// -*- C++ -*-
//===--------------------------- cstdlib ----------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CSTDLIB
#define _LIBCPP_CSTDLIB

/*
    cstdlib synopsis

Macros:

    EXIT_FAILURE
    EXIT_SUCCESS
    MB_CUR_MAX
    NULL
    RAND_MAX

namespace std
{

Types:

    size_t
    div_t
    ldiv_t
    lldiv_t                                                               // C99

double    atof (const char* nptr);
int       atoi (const char* nptr);
long      atol (const char* nptr);
long long atoll(const char* nptr);                                        // C99
double             strtod  (const char* restrict nptr, char** restrict endptr);
float              strtof  (const char* restrict nptr, char** restrict endptr); // C99
long double        strtold (const char* restrict nptr, char** restrict endptr); // C99
long               strtol  (const char* restrict nptr, char** restrict endptr, int base);
long long          strtoll (const char* restrict nptr, char** restrict endptr, int base); // C99
unsigned long      strtoul (const char* restrict nptr, char** restrict endptr, int base);
unsigned long long strtoull(const char* restrict nptr, char** restrict endptr, int base); // C99
int rand(void);
void srand(unsigned int seed);
void* calloc(size_t nmemb, size_t size);
void free(void* ptr);
void* malloc(size_t size);
void* realloc(void* ptr, size_t size);
void abort(void);
int atexit(void (*func)(void));
void exit(int status);
void _Exit(int status);
char* getenv(const char* name);
int system(const char* string);
void* bsearch(const void* key, const void* base, size_t nmemb, size_t size,
              int (*compar)(const void *, const void *));
void qsort(void* base, size_t nmemb, size_t size,
           int (*compar)(const void *, const void *));
int         abs(      int j);
long        abs(     long j);
long long   abs(long long j);                                             // C++0X
long       labs(     long j);
long long llabs(long long j);                                             // C99
div_t     div(      int numer,       int denom);
ldiv_t    div(     long numer,      long denom);
lldiv_t   div(long long numer, long long denom);                          // C++0X
ldiv_t   ldiv(     long numer,      long denom);
lldiv_t lldiv(long long numer, long long denom);                          // C99
int mblen(const char* s, size_t n);
int mbtowc(wchar_t* restrict pwc, const char* restrict s, size_t n);
int wctomb(char* s, wchar_t wchar);
size_t mbstowcs(wchar_t* restrict pwcs, const char* restrict s, size_t n);
size_t wcstombs(char* restrict s, const wchar_t* restrict pwcs, size_t n);

}  // std

*/

#include <__config>
#include <stdlib.h>
#ifdef _MSC_VER
#include "support/win32/locale_win32.h"
#endif // _MSC_VER

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

_LIBCPP_BEGIN_NAMESPACE_STD

using ::size_t;
using ::div_t;
using ::ldiv_t;
using ::lldiv_t;
using ::atof;
using ::atoi;
using ::atol;
using ::atoll;
using ::strtod;
using ::strtof;
using ::strtold;
using ::strtol;
using ::strtoll;
using ::strtoul;
using ::strtoull;
using ::rand;
using ::srand;
using ::calloc;
using ::free;
using ::malloc;
using ::realloc;
using ::abort;
using ::atexit;
using ::exit;
using ::_Exit;
using ::getenv;
using ::system;
using ::bsearch;
using ::qsort;
using ::abs;
using ::labs;
using ::llabs;
using ::div;
using ::ldiv;
using ::lldiv;
using ::mblen;
using ::mbtowc;
using ::wctomb;
using ::mbstowcs;
using ::wcstombs;
#ifdef _LIBCPP_HAS_QUICK_EXIT
using ::at_quick_exit;
using ::quick_exit;
#endif

// MSVC already has the correct prototype in <stdlib.h.h> #ifdef __cplusplus
#if !defined(_MSC_VER) && !defined(__sun__)
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) {return  labs(__x);}
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) {return llabs(__x);}

inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) {return  ldiv(__x, __y);}
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) {return lldiv(__x, __y);}
#endif // _MSC_VER

_LIBCPP_END_NAMESPACE_STD

#endif  // _LIBCPP_CSTDLIB
@


1.3.2.3
log
@## SVN ##
## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/ 243376
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r243376 | dim | 2012-11-21 18:38:56 +0000 (Wed, 21 Nov 2012) | 14 lines
## SVN ##
## SVN ## MFC r241903:
## SVN ##
## SVN ##   Import libc++ trunk r165949.  Among other improvements and bug fixes,
## SVN ##   this has many visibility problems fixed, which should help with
## SVN ##   compiling certain ports that exercise C++11 mode (i.e. Firefox).
## SVN ##
## SVN ##   Also, belatedly add the LICENSE.TXT and accompanying CREDITS.TXT files,
## SVN ##   which are referred to in all the source files.
## SVN ##
## SVN ## MFC r241907:
## SVN ##
## SVN ##   Fix two -Wsystem-header warnings in libc++ that were exposed by the new
## SVN ##   ATF import.  These have also been sent upstream.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@a76 3
int at_quick_exit(void (*func)(void))                                     // C++11
void quick_exit(int status);                                              // C++11
void *aligned_alloc(size_t alignment, size_t size);                       // C11
a137 3
#ifdef _LIBCPP_HAS_C11_FEATURES
using ::aligned_alloc;
#endif
d141 2
a142 2
inline _LIBCPP_INLINE_VISIBILITY long      abs(     long __x) _NOEXCEPT {return  labs(__x);}
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
d144 2
a145 2
inline _LIBCPP_INLINE_VISIBILITY  ldiv_t div(     long __x,      long __y) _NOEXCEPT {return  ldiv(__x, __y);}
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x, long long __y) _NOEXCEPT {return lldiv(__x, __y);}
@


1.3.2.4
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/244436
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ## r244436 | dim | 2012-12-19 16:22:46 +0000 (Wed, 19 Dec 2012) | 20 lines
## SVN ##
## SVN ## MFC r243572:
## SVN ##
## SVN ##   Pull in r168610 from upstream libc++:
## SVN ##
## SVN ##     When using libc++ headers on FreeBSD, in combination with -std=c++98,
## SVN ##     -ansi or -std=c++03, the long long type is not supported.  So in this
## SVN ##     case, several functions and types, like lldiv_t, strtoll(), are not
## SVN ##     declared.
## SVN ##
## SVN ##   This should make it possible to use the libc++ headers in c++98 mode.
## SVN ##
## SVN ##   Note: libc++ is originally designed as a c++0x or higher library, so you
## SVN ##   should still take care when using it with c++98 or c++03.
## SVN ##
## SVN ##   Noted by:	Yamaya Takashi <yamayan@@kbh.biglobe.ne.jp>
## SVN ##
## SVN ## MFC r243673 (by theraven):
## SVN ##
## SVN ##   Merge new libc++ into head.
## SVN ##
## SVN ## ------------------------------------------------------------------------
## SVN ##
@
text
@a99 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a100 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a103 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a104 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a108 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a109 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a110 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a111 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a127 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a128 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a130 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a131 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a147 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a148 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
a150 1
#ifndef _LIBCPP_HAS_NO_LONG_LONG
a151 1
#endif // _LIBCPP_HAS_NO_LONG_LONG
@


1.3.2.5
log
@## SVN ## Exported commit - http://svnweb.freebsd.org/changeset/base/262801
## SVN ## CVS IS DEPRECATED: http://wiki.freebsd.org/CvsIsDeprecated
@
text
@d87 1
a87 1
#ifdef _LIBCPP_MSVCRT
d89 1
a89 1
#endif // _LIBCPP_MSVCRT
d157 2
a158 2
// MSVCRT already has the correct prototype in <stdlib.h> #ifdef __cplusplus
#if !defined(_LIBCPP_MSVCRT) && !defined(__sun__) && !defined(_AIX)
d168 1
a168 1
#endif // _LIBCPP_MSVCRT
@


1.2
log
@SVN rev 232950 on 2012-03-14 00:09:36Z by theraven

Import new versions of libcxxrt and libc++.
Please tests any C++ code you care about with -stdlib=libc++!

Approved by:	dim (mentor)
@
text
@d134 4
@


1.1
log
@SVN rev 227983 on 2011-11-25 20:59:04Z by theraven

Import libc++ / libcxxrt into base.  Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
@
text
@d135 2
a136 1
#ifndef _MSC_VER // MSVC already has the correct prototype in <stdlib.h.h> #ifdef __cplusplus
@

