Home | History | Annotate | Download | only in include
      1 /* -*- c++ -*- */
      2 /*
      3  * Copyright (C) 2009 The Android Open Source Project
      4  * All rights reserved.
      5  *
      6  * Redistribution and use in source and binary forms, with or without
      7  * modification, are permitted provided that the following conditions
      8  * are met:
      9  *  * Redistributions of source code must retain the above copyright
     10  *    notice, this list of conditions and the following disclaimer.
     11  *  * Redistributions in binary form must reproduce the above copyright
     12  *    notice, this list of conditions and the following disclaimer in
     13  *    the documentation and/or other materials provided with the
     14  *    distribution.
     15  *
     16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
     17  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
     18  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
     19  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
     20  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
     21  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
     22  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
     23  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
     24  * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     25  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
     26  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     27  * SUCH DAMAGE.
     28  */
     29 
     30 #ifndef BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
     31 #define BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
     32 
     33 /*
     34  * Standard C++ Library wrapper around the C stdlib.h header file.
     35  */
     36 #include <stdlib.h>
     37 
     38 extern "C++" {
     39 
     40 namespace std {
     41 
     42 using ::exit;
     43 using ::abort;
     44 using ::atexit;
     45 #if 0 /* MISSING FROM BIONIC */
     46 using ::on_exit;
     47 #endif
     48 
     49 using ::getenv;
     50 using ::putenv;
     51 using ::setenv;
     52 using ::unsetenv;
     53 
     54 using ::mktemp;
     55 using ::mkstemp;
     56 
     57 using ::strtol;
     58 using ::strtoll;
     59 using ::strtoul;
     60 using ::strtoull;
     61 using ::strtod;
     62 using ::strtof;
     63 
     64 using ::atoi;
     65 using ::atol;
     66 using ::atoll;
     67 using ::atof;
     68 
     69 using ::abs;
     70 using ::labs;
     71 using ::llabs;
     72 
     73 using ::realpath;
     74 using ::system;
     75 
     76 using ::bsearch;
     77 using ::qsort;
     78 
     79 using ::jrand48;
     80 using ::mrand48;
     81 using ::nrand48;
     82 using ::lrand48;
     83 using ::seed48;
     84 using ::srand48;
     85 
     86 using ::rand;
     87 using ::srand;
     88 using ::random;
     89 using ::srandom;
     90 
     91 using ::malloc;
     92 using ::free;
     93 using ::calloc;
     94 using ::realloc;
     95 
     96 using ::unlockpt;
     97 using ::ptsname;
     98 using ::ptsname_r;
     99 using ::getpt;
    100 using ::grantpt;
    101 
    102 using ::div_t;
    103 using ::div;
    104 using ::ldiv_t;
    105 using ::ldiv;
    106 using ::lldiv_t;
    107 using ::lldiv;
    108 
    109 using ::mblen;
    110 using ::mbstowcs;
    111 using ::mbtowc;
    112 using ::wctomb;
    113 using ::wcstombs;
    114 
    115 #if __ANDROID_API__ >= 9
    116 using ::clearenv;
    117 #endif
    118 
    119 }  // namespace std
    120 
    121 }  // extern C++
    122 
    123 #endif  // BIONIC_LIBSTDCPP_INCLUDE_CSTDLIB__
    124