/elec/propeller-clock

To get this branch, use:
bzr branch http://bzr.ed.am/elec/propeller-clock
57 by edam
added ulibc
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 <cstddef>
20
#include <string.h>
21
22
#ifndef __HEADER_CSTRING
23
#define __HEADER_CSTRING 1
24
25
26
namespace std{
27
#if ! defined(__AVR__)
28
	using ::strcoll;
29
	using ::strerror;
30
	using ::strxfrm;
31
#endif // ! defined(__AVR__)
32
33
	using ::memchr;
34
	using ::memcmp;
35
	using ::memcpy;
36
	using ::memmove;
37
	using ::memset;
38
	using ::strcat;
39
	using ::strchr;
40
	using ::strcmp;
41
	using ::strcpy;
42
	using ::strcspn;
43
	using ::strlen;
44
	using ::strncat;
45
	using ::strncmp;
46
	using ::strncpy;
47
	using ::strpbrk;
48
	using ::strrchr;
49
	using ::strspn;
50
	using ::strstr;
51
	using ::strtok;
52
53
#ifndef __CORRECT_ISO_CPP_STRING_H_PROTO
54
	//Extra definitions required in c++ spec
55
56
	inline void* memchr(void* s, int c, size_t n){
57
		return memchr(const_cast<const void *>(s), c, n);
58
	}
59
60
	inline char* strchr(char* s, int c){
61
		return strchr(const_cast<const char *>(s), c);
62
	}
63
64
	inline char* strpbrk(char* s1, const char* s2){
65
		return strpbrk(const_cast<const char *>(s1), s2);
66
	}
67
68
	inline char* strrchr(char* s, int c){
69
		return strrchr(const_cast<const char *>(s), c);
70
	}
71
72
	inline char* strstr(char* s1, const char* s2){
73
		return strstr(const_cast<const char *>(s1), s2);
74
	}
75
#endif
76
}
77
78
#endif
79