/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock

« back to all changes in this revision

Viewing changes to src/utility/cstdlib

  • Committer: edam
  • Date: 2012-02-25 01:31:43 UTC
  • Revision ID: tim@ed.am-20120225013143-9fet2y2d3fjlrwez
added ulibc

Show diffs side-by-side

added added

removed removed

 
1
/*      Copyright (C) 2005 Garrett A. Kajmowicz
 
2
 
 
3
        This file is part of the uClibc++ Library.
 
4
        This library is free software; you can redistribute it and/or
 
5
        modify it under the terms of the GNU Lesser General Public
 
6
        License as published by the Free Software Foundation; either
 
7
        version 2.1 of the License, or (at your option) any later version.
 
8
 
 
9
        This library is distributed in the hope that it will be useful,
 
10
        but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
12
        Lesser General Public License for more details.
 
13
 
 
14
        You should have received a copy of the GNU Lesser General Public
 
15
        License along with this library; if not, write to the Free Software
 
16
        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
17
*/
 
18
 
 
19
#include <stdlib.h>
 
20
#include <basic_definitions>
 
21
 
 
22
#ifndef __HEADER_CSTDLIB
 
23
#define __HEADER_CSTDLIB 1
 
24
 
 
25
 
 
26
#ifdef abs
 
27
#undef abs
 
28
#endif
 
29
 
 
30
namespace std{
 
31
#if ! defined(__AVR__)
 
32
        using ::atexit;
 
33
        using ::getenv;
 
34
        using ::system;
 
35
#endif // ! defined(__AVR__)
 
36
        using ::abort;
 
37
        using ::abs;
 
38
        using ::atol;
 
39
        using ::atof;
 
40
        using ::atoi;
 
41
        using ::bsearch;
 
42
        using ::calloc;
 
43
        using ::div;
 
44
        using ::exit;
 
45
        using ::free;
 
46
        using ::labs;
 
47
        using ::ldiv;
 
48
        using ::malloc;
 
49
        using ::qsort;
 
50
        using ::rand;
 
51
        using ::realloc;
 
52
        using ::srand;
 
53
        using ::strtod;
 
54
        using ::strtol;
 
55
        using ::strtoul;
 
56
#ifdef __UCLIBCXX_HAS_WCHAR__
 
57
        using ::mblen;
 
58
        using ::mbstowcs;
 
59
        using ::mbtowc;
 
60
        using ::wctomb;
 
61
        using ::wcstombs;
 
62
#endif
 
63
 
 
64
        inline long abs(long i){
 
65
                return labs(i);
 
66
        }
 
67
 
 
68
        inline ldiv_t div(long i, long j){
 
69
                return ldiv(i, j);
 
70
        }
 
71
 
 
72
}
 
73
 
 
74
 
 
75
 
 
76
#endif
 
77