OpenCores
URL https://opencores.org/ocsvn/altor32/altor32/trunk

Subversion Repositories altor32

[/] [altor32/] [trunk/] [gcc-x64/] [or1knd-elf/] [or1knd-elf/] [include/] [string.h] - Blame information for rev 35

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 35 ultra_embe
/*
2
 * string.h
3
 *
4
 * Definitions for memory and string functions.
5
 */
6
 
7
#ifndef _STRING_H_
8
#define _STRING_H_
9
 
10
#include "_ansi.h"
11
#include <sys/reent.h>
12
#include <sys/cdefs.h>
13
#include <sys/features.h>
14
 
15
#define __need_size_t
16
#define __need_NULL
17
#include <stddef.h>
18
 
19
_BEGIN_STD_C
20
 
21
_PTR     _EXFUN(memchr,(const _PTR, int, size_t));
22
int      _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
23
_PTR     _EXFUN(memcpy,(_PTR, const _PTR, size_t));
24
_PTR     _EXFUN(memmove,(_PTR, const _PTR, size_t));
25
_PTR     _EXFUN(memset,(_PTR, int, size_t));
26
char    *_EXFUN(strcat,(char *, const char *));
27
char    *_EXFUN(strchr,(const char *, int));
28
int      _EXFUN(strcmp,(const char *, const char *));
29
int      _EXFUN(strcoll,(const char *, const char *));
30
char    *_EXFUN(strcpy,(char *, const char *));
31
size_t   _EXFUN(strcspn,(const char *, const char *));
32
char    *_EXFUN(strerror,(int));
33
size_t   _EXFUN(strlen,(const char *));
34
char    *_EXFUN(strncat,(char *, const char *, size_t));
35
int      _EXFUN(strncmp,(const char *, const char *, size_t));
36
char    *_EXFUN(strncpy,(char *, const char *, size_t));
37
char    *_EXFUN(strpbrk,(const char *, const char *));
38
char    *_EXFUN(strrchr,(const char *, int));
39
size_t   _EXFUN(strspn,(const char *, const char *));
40
char    *_EXFUN(strstr,(const char *, const char *));
41
 
42
#ifndef _REENT_ONLY
43
char    *_EXFUN(strtok,(char *, const char *));
44
#endif
45
 
46
size_t   _EXFUN(strxfrm,(char *, const char *, size_t));
47
 
48
#ifndef __STRICT_ANSI__
49
char    *_EXFUN(strtok_r,(char *, const char *, char **));
50
 
51
int      _EXFUN(bcmp,(const void *, const void *, size_t));
52
void     _EXFUN(bcopy,(const void *, void *, size_t));
53
void     _EXFUN(bzero,(void *, size_t));
54
int      _EXFUN(ffs,(int));
55
char    *_EXFUN(index,(const char *, int));
56
_PTR     _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
57
_PTR     _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
58
_PTR     _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t));
59
_PTR     _EXFUN(memrchr,(const _PTR, int, size_t));
60
char    *_EXFUN(rindex,(const char *, int));
61
char    *_EXFUN(stpcpy,(char *, const char *));
62
char    *_EXFUN(stpncpy,(char *, const char *, size_t));
63
int      _EXFUN(strcasecmp,(const char *, const char *));
64
char    *_EXFUN(strcasestr,(const char *, const char *));
65
char    *_EXFUN(strchrnul,(const char *, int));
66
#endif
67
#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 500)
68
char    *_EXFUN(strdup,(const char *));
69
#endif
70
#ifndef __STRICT_ANSI__
71
char    *_EXFUN(_strdup_r,(struct _reent *, const char *));
72
#endif
73
#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 700)
74
char    *_EXFUN(strndup,(const char *, size_t));
75
#endif
76
#ifndef __STRICT_ANSI__
77
char    *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t));
78
/* There are two common strerror_r variants.  If you request
79
   _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX
80
   version.  POSIX requires that #undef strerror_r will still let you
81
   invoke the underlying function, but that requires gcc support.  */
82
#ifdef _GNU_SOURCE
83
char    *_EXFUN(strerror_r,(int, char *, size_t));
84
#else
85
# ifdef __GNUC__
86
int      _EXFUN(strerror_r,(int, char *, size_t)) __asm__ (__ASMNAME ("__xpg_strerror_r"));
87
# else
88
int      _EXFUN(__xpg_strerror_r,(int, char *, size_t));
89
#  define strerror_r __xpg_strerror_r
90
# endif
91
#endif
92
size_t   _EXFUN(strlcat,(char *, const char *, size_t));
93
size_t   _EXFUN(strlcpy,(char *, const char *, size_t));
94
int      _EXFUN(strncasecmp,(const char *, const char *, size_t));
95
size_t   _EXFUN(strnlen,(const char *, size_t));
96
char    *_EXFUN(strsep,(char **, const char *));
97
char    *_EXFUN(strlwr,(char *));
98
char    *_EXFUN(strupr,(char *));
99
#ifndef DEFS_H  /* Kludge to work around problem compiling in gdb */
100
char  *_EXFUN(strsignal, (int __signo));
101
#endif
102
#ifdef __CYGWIN__
103
int     _EXFUN(strtosigno, (const char *__name));
104
#endif
105
 
106
/* Recursive version of strerror.  */
107
char *  _EXFUN(_strerror_r, (struct _reent *, int, int, int *));
108
 
109
#if defined _GNU_SOURCE && defined __GNUC__
110
#define strdupa(__s) \
111
        (__extension__ ({const char *__in = (__s); \
112
                         size_t __len = strlen (__in) + 1; \
113
                         char * __out = (char *) __builtin_alloca (__len); \
114
                         (char *) memcpy (__out, __in, __len);}))
115
#define strndupa(__s, __n) \
116
        (__extension__ ({const char *__in = (__s); \
117
                         size_t __len = strnlen (__in, (__n)) + 1; \
118
                         char *__out = (char *) __builtin_alloca (__len); \
119
                         __out[__len-1] = '\0'; \
120
                         (char *) memcpy (__out, __in, __len-1);}))
121
#endif /* _GNU_SOURCE && __GNUC__ */
122
 
123
/* These function names are used on Windows and perhaps other systems.  */
124
#ifndef strcmpi
125
#define strcmpi strcasecmp
126
#endif
127
#ifndef stricmp
128
#define stricmp strcasecmp
129
#endif
130
#ifndef strncmpi
131
#define strncmpi strncasecmp
132
#endif
133
#ifndef strnicmp
134
#define strnicmp strncasecmp
135
#endif
136
 
137
#endif /* ! __STRICT_ANSI__ */
138
 
139
#include <sys/string.h>
140
 
141
_END_STD_C
142
 
143
#endif /* _STRING_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.