diff --git a/include/cxx/cassert b/include/cxx/cassert new file mode 100755 index 0000000000000000000000000000000000000000..f44b6cd79290d933dbdbdc9d1ee2fd53d85137ca --- /dev/null +++ b/include/cxx/cassert @@ -0,0 +1,49 @@ +//*************************************************************************** +// include/cxx/cassert +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CASSERT +#define __INCLUDE_CXX_CASSERT + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <assert.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +#endif // __INCLUDE_CXX_CASSERT diff --git a/include/cxx/cctype b/include/cxx/cctype new file mode 100755 index 0000000000000000000000000000000000000000..043adad6876b7093524453ea484ff936afb80d0a --- /dev/null +++ b/include/cxx/cctype @@ -0,0 +1,49 @@ +//*************************************************************************** +// include/cxx/cctype +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CCTYPE +#define __INCLUDE_CXX_CCTYPE + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <ctype.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +#endif // __INCLUDE_CXX_CCTYPE diff --git a/include/cxx/cerrno b/include/cxx/cerrno new file mode 100755 index 0000000000000000000000000000000000000000..ba23e33ea4300e7f492e50422c508982140f4e7c --- /dev/null +++ b/include/cxx/cerrno @@ -0,0 +1,49 @@ +//*************************************************************************** +// include/cxx/cerrno +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CERRNO +#define __INCLUDE_CXX_CERRNO + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <errno.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +#endif // __INCLUDE_CXX_CERRNO diff --git a/include/cxx/climits b/include/cxx/climits new file mode 100755 index 0000000000000000000000000000000000000000..73f565273ee19d88d1ce21df6d7154f3aa980a00 --- /dev/null +++ b/include/cxx/climits @@ -0,0 +1,49 @@ +//*************************************************************************** +// include/cxx/climits +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CLIMITS +#define __INCLUDE_CXX_CLIMITS + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <limits.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +#endif // __INCLUDE_CXX_CLIMITS diff --git a/include/cxx/cmath b/include/cxx/cmath new file mode 100755 index 0000000000000000000000000000000000000000..3d348f2e99cddc24feaeeba58b3d08274591115c --- /dev/null +++ b/include/cxx/cmath @@ -0,0 +1,75 @@ +//*************************************************************************** +// include/cxx/cmath +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CMATH +#define __INCLUDE_CXX_CMATH + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <math.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::acos; + using ::asin; + using ::atan; + using ::atan2; + using ::ceil; + using ::cos; + using ::cosh; + using ::exp; + using ::fabs; + using ::floor; + using ::fmod; + using ::frexp; + using ::ldexp; + using ::log; + using ::log10; + using ::modf; + using ::pow; + using ::sin; + using ::sinh; + using ::sqrt; + using ::tan; + using ::tanh; +} + +#endif // __INCLUDE_CXX_CMATH diff --git a/include/cxx/csignal b/include/cxx/csignal new file mode 100755 index 0000000000000000000000000000000000000000..aaf385d9c86725c5abae99d104be128194463a97 --- /dev/null +++ b/include/cxx/csignal @@ -0,0 +1,72 @@ +//*************************************************************************** +// include/cxx/csignal +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CSIGNAL +#define __INCLUDE_CXX_CSIGNAL + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <signal.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::sigset_t; + using ::sigval; + using ::sigevent; + using ::siginfo; + using ::siginfo_t; + using ::sigaction; + using ::kill; + using ::sigemptyset; + using ::sigfillset; + using ::sigaddset; + using ::sigdelset; + using ::sigismember; + using ::sigaction; + using ::sigprocmask; + using ::sigpending; + using ::sigsuspend; + using ::sigwaitinfo; + using ::sigtimedwait; + using ::sigqueue; +} + +#endif // CSIGNAL_HEADER diff --git a/include/cxx/cstdarg b/include/cxx/cstdarg new file mode 100755 index 0000000000000000000000000000000000000000..cbef3edf8e9d6d7b51fdb85e82a95a2abfe6d19f --- /dev/null +++ b/include/cxx/cstdarg @@ -0,0 +1,49 @@ +//*************************************************************************** +// include/cxx/cstdarg +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CSTDARG +#define __INCLUDE_CXX_CSTDARG + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <stdard.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +#endif // __INCLUDE_CXX_CSTDARG diff --git a/include/cxx/cstddef b/include/cxx/cstddef new file mode 100755 index 0000000000000000000000000000000000000000..d932eecf0099f54a8976376ed85082402266816d --- /dev/null +++ b/include/cxx/cstddef @@ -0,0 +1,97 @@ +//*************************************************************************** +// include/cxx/cstddef +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CCTYPE +#define __INCLUDE_CXX_CCTYPE + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <nuttx/config.h> +#include <nuttx/compiler.h> +#include <stddef.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + // NuttX specific types + + using ::sbyte; + using ::ubyte; + using ::uint8; + using ::boolean; + using ::sint16; + using ::uint16; + using ::sint32; + using ::uint32; +#ifdef CONFIG_HAVE_LONG_LONG + using ::sint64; + using ::uint64; +#endif + using ::irqstate_t; + + // Standard types + + using ::float32; +#ifndef CONFIG_HAVE_DOUBLE + using ::double_t; + using ::float64; +#else + using ::double_t; + using ::float64; +#endif + using ::mode_t; + using ::size_t; + using ::ssize_t; + using ::off_t; + using ::blksize_t; + using ::blkcnt_t; + using ::fpos_t; + using ::uid_t; + using ::gid_t; + using ::dev_t; + using ::ino_t; + using ::sig_atomic_t; + using ::pid_t; + + using ::socklen_t; + using ::sa_family_t; +} + +#endif // __INCLUDE_CXX_CCTYPE diff --git a/include/cxx/cstdio b/include/cxx/cstdio new file mode 100755 index 0000000000000000000000000000000000000000..aeab44792da913bab17619314b7d093f5afa65e2 --- /dev/null +++ b/include/cxx/cstdio @@ -0,0 +1,86 @@ +//*************************************************************************** +// include/cxx/cstdio +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CCTYPE +#define __INCLUDE_CXX_CCTYPE + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <nuttx/config.h> +#include <stdio.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::FILE; + using ::fpos_t; + using ::size_t; + using ::fclose; + using ::fflush; + using ::feof; + using ::ferror; + using ::fgetc; + using ::fgetpos; + using ::fgets; + using ::fopen; + using ::fprintf; + using ::fputc; + using ::fputs; + using ::fread; + using ::fseek; + using ::fsetpos; + using ::ftell; + using ::fwrite; + using ::gets; + using ::printf; + using ::puts; + using ::rename; + using ::sprintf; + using ::snprintf; + using ::ungetc; + using ::vprintf; + using ::vfprintf; + using ::vsprintf; + using ::vsnprintf; + using ::fdopen; + using ::statfs; +} + +#endif // __INCLUDE_CXX_CCTYPE diff --git a/include/cxx/cstdlib b/include/cxx/cstdlib new file mode 100755 index 0000000000000000000000000000000000000000..06bb10fc418028b8958aeb09abe879edbd0ac4ab --- /dev/null +++ b/include/cxx/cstdlib @@ -0,0 +1,79 @@ +//*************************************************************************** +// include/cxx/cstdlib +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CSTDLIB +#define __INCLUDE_CXX_CSTDLIB + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <nuttx/config.h> +#include <stdlib.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::srand; + using ::rand; + +#ifndef CONFIG_DISABLE_ENIVRON + using ::getenv; + using ::putenv; + using ::clearenv; + using ::setenv; + using ::unsetenv; +#endif + + using ::exit; + using ::abort; + using ::atexit; + + using ::strtol; + using ::strtod; + + using ::malloc; + using ::free; + using ::realloc; + using ::memalign; + using ::zalloc; + using ::calloc; + using ::mallinfo; +} + +#endif // __INCLUDE_CXX_CSTDLIB diff --git a/include/cxx/cstring b/include/cxx/cstring new file mode 100755 index 0000000000000000000000000000000000000000..664aa97de0f58e636213f32972b69a4b9244d21d --- /dev/null +++ b/include/cxx/cstring @@ -0,0 +1,79 @@ +//*************************************************************************** +// include/cxx/cstring +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CSTRING +#define __INCLUDE_CXX_CSTRING + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <nuttx/config.h> +#include <string.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::size_t; + using ::strchr; + using ::strdup; + using ::strerror; + using ::strlen; + using ::strcat; + using ::strncat; + using ::strcmp; + using ::strncmp; + using ::strcasecmp; + using ::strncasecmp; + using ::strcpy; + using ::strncpy; + using ::strpbrk; + using ::strchr; + using ::strrchr; + using ::strspn; + using ::strcspn; + using ::strstr; + using ::strtok; + using ::strtok_r; + using ::memset; + using ::memcpy; + using ::memcmp; + using ::memmove; +} + +#endif // __INCLUDE_CXX_CSTRING diff --git a/include/cxx/ctime b/include/cxx/ctime new file mode 100755 index 0000000000000000000000000000000000000000..f9ebaa937ef6a2c8cc471a93194a53288791b261 --- /dev/null +++ b/include/cxx/ctime @@ -0,0 +1,72 @@ +//*************************************************************************** +// include/cxx/ctime +// +// Copyright (C) 2009 Gregory Nutt. All rights reserved. +// Author: Gregory Nutt <spudmonkey@racsa.co.cr> +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions +// are met: +// +// 1. Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// 2. Redistributions in binary form must reproduce the above copyright +// notice, this list of conditions and the following disclaimer in +// the documentation and/or other materials provided with the +// distribution. +// 3. Neither the name NuttX nor the names of its contributors may be +// used to endorse or promote products derived from this software +// without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +// COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +// BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +// OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +// POSSIBILITY OF SUCH DAMAGE. +// +//*************************************************************************** + +#ifndef __INCLUDE_CXX_CTIME +#define __INCLUDE_CXX_CTIME + +//*************************************************************************** +// Included Files +//*************************************************************************** + +#include <time.h> + +//*************************************************************************** +// Namespace +//*************************************************************************** + +namespace std +{ + using ::size_t; + using ::time_t; + using ::clockid_t; + using ::timer_t; + using ::timespec; + using ::timeval; + using ::tm; + using ::itimerspec; + using ::sigevent; + using ::clock_settime; + using ::clock_gettime; + using ::lock_getres; + using ::mktime; + using ::gmtime_r; + using ::timer_create; + using ::timer_delete; + using ::timer_settime; + using ::timer_gettime; + using ::timer_getoverrun; +} + +#endif // __INCLUDE_CXX_CTIME