Whole document tree
    

Whole document tree

std_cstdlib.h Source File
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

std_cstdlib.h

Go to the documentation of this file.
00001 // -*- C++ -*- forwarding header.
00002 
00003 // Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
00004 //
00005 // This file is part of the GNU ISO C++ Library.  This library is free
00006 // software; you can redistribute it and/or modify it under the
00007 // terms of the GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 
00016 // You should have received a copy of the GNU General Public License along
00017 // with this library; see the file COPYING.  If not, write to the Free
00018 // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
00019 // USA.
00020 
00021 // As a special exception, you may use this file as part of a free software
00022 // library without restriction.  Specifically, if other files instantiate
00023 // templates or use macros or inline functions from this file, or you compile
00024 // this file and link it with other files to produce an executable, this
00025 // file does not by itself cause the resulting executable to be covered by
00026 // the GNU General Public License.  This exception does not however
00027 // invalidate any other reasons why the executable file might be covered by
00028 // the GNU General Public License.
00029 
00030 //
00031 // ISO C++ 14882: 20.4.6  C library
00032 //
00033 
00034 #ifndef _CPP_CSTDLIB
00035 #define _CPP_CSTDLIB 1
00036 
00037 #include <bits/c++config.h>
00038 #include <bits/std_cstddef.h>
00039 
00040 #pragma GCC system_header
00041 #include <stdlib.h>
00042 
00043 // Get rid of those macros defined in <stdlib.h> in lieu of real functions.
00044 #undef abort
00045 #undef abs
00046 #undef atexit
00047 #undef atof
00048 #undef atoi
00049 #undef atol
00050 #undef bsearch
00051 #undef calloc
00052 #undef div
00053 #undef exit
00054 #undef free
00055 #undef getenv
00056 #undef labs
00057 #undef ldiv
00058 #undef malloc
00059 #undef mblen
00060 #undef mbstowcs
00061 #undef mbtowc
00062 #undef qsort
00063 #undef rand
00064 #undef realloc
00065 #undef srand
00066 #undef strtod
00067 #undef strtol
00068 #undef strtoul
00069 #undef system
00070 #undef wcstombs
00071 #undef wctomb
00072 
00073 namespace std 
00074 {
00075   using ::div_t;
00076   using ::ldiv_t;
00077 
00078   using ::abort;
00079   using ::abs;
00080   using ::atexit;
00081   using ::atof;
00082   using ::atoi;
00083   using ::atol;
00084   using ::bsearch;
00085   using ::calloc;
00086   using ::div;
00087   using ::exit;
00088   using ::free;
00089   using ::getenv;
00090   using ::labs;
00091   using ::ldiv;
00092   using ::malloc;
00093   using ::mblen;
00094   using ::mbstowcs;
00095   using ::mbtowc;
00096   using ::qsort;
00097   using ::rand;
00098   using ::realloc;
00099   using ::srand;
00100   using ::strtod;
00101   using ::strtol;
00102   using ::strtoul;
00103   using ::system;
00104   using ::wcstombs;
00105   using ::wctomb;
00106 
00107   inline long 
00108   abs(long __i) { return labs(__i); }
00109 
00110   inline ldiv_t
00111   div(long __i, long __j) { return ldiv(__i, __j); }
00112 } 
00113 
00114 #if _GLIBCPP_USE_C99
00115 
00116 #undef _Exit
00117 #undef llabs
00118 #undef lldiv
00119 #undef atoll
00120 #undef strtoll
00121 #undef strtoull
00122 #undef strtof
00123 #undef strtold
00124 
00125 namespace __gnu_cxx
00126 {
00127   using ::lldiv_t;
00128   using ::_Exit;
00129 
00130   inline long long 
00131   abs(long long __x) { return __x >= 0 ? __x : -__x; }
00132 
00133   inline long long 
00134   llabs(long long __x) { return __x >= 0 ? __x : -__x; }
00135 
00136   inline lldiv_t 
00137   div(long long __n, long long __d)
00138   { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00139 
00140   inline lldiv_t 
00141   lldiv(long long __n, long long __d)
00142   { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
00143 
00144   using ::atoll;
00145   using ::strtof;
00146   using ::strtoll;
00147   using ::strtoull;
00148   using ::strtold; 
00149 } 
00150 
00151 namespace std
00152 {
00153   using __gnu_cxx::lldiv_t;
00154   using __gnu_cxx::_Exit;
00155   using __gnu_cxx::abs;
00156   using __gnu_cxx::llabs; 
00157   using __gnu_cxx::div;
00158   using __gnu_cxx::lldiv;
00159   using __gnu_cxx::atoll;
00160   using __gnu_cxx::strtof;
00161   using __gnu_cxx::strtoll;
00162   using __gnu_cxx::strtoull;
00163   using __gnu_cxx::strtold;
00164 }
00165 #endif
00166 
00167 #endif 

Generated on Mon Apr 8 03:11:33 2002 for libstdc++-v3 Source by doxygen1.2.15