These changes are the raw update to qemu-2.6.
[kvmfornfv.git] / qemu / roms / ipxe / src / include / string.h
1 #ifndef _STRING_H
2 #define _STRING_H
3
4 /** @file
5  *
6  * String functions
7  *
8  */
9
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11
12 #include <stddef.h>
13 #include <bits/string.h>
14
15 /* Architecture-specific code is expected to provide these functions,
16  * but may instead explicitly choose to use the generic versions.
17  */
18 void * memset ( void *dest, int character, size_t len ) __nonnull;
19 void * memcpy ( void *dest, const void *src, size_t len ) __nonnull;
20 void * memmove ( void *dest, const void *src, size_t len ) __nonnull;
21 extern void * generic_memset ( void *dest, int character,
22                                size_t len ) __nonnull;
23 extern void * generic_memcpy ( void *dest, const void *src,
24                                size_t len ) __nonnull;
25 extern void * generic_memmove ( void *dest, const void *src,
26                                 size_t len ) __nonnull;
27
28 extern int __pure memcmp ( const void *first, const void *second,
29                            size_t len ) __nonnull;
30 extern void * __pure memchr ( const void *src, int character,
31                               size_t len ) __nonnull;
32 extern void * memswap ( void *dest, void *src, size_t len ) __nonnull;
33 extern int __pure strcmp ( const char *first, const char *second ) __nonnull;
34 extern int __pure strncmp ( const char *first, const char *second,
35                             size_t max ) __nonnull;
36 extern size_t __pure strlen ( const char *src ) __nonnull;
37 extern size_t __pure strnlen ( const char *src, size_t max ) __nonnull;
38 extern char * __pure strchr ( const char *src, int character ) __nonnull;
39 extern char * __pure strrchr ( const char *src, int character ) __nonnull;
40 extern char * __pure strstr ( const char *haystack,
41                               const char *needle ) __nonnull;
42 extern char * strcpy ( char *dest, const char *src ) __nonnull;
43 extern char * strncpy ( char *dest, const char *src, size_t max ) __nonnull;
44 extern char * strcat ( char *dest, const char *src ) __nonnull;
45 extern char * __malloc strdup ( const char *src ) __nonnull;
46 extern char * __malloc strndup ( const char *src, size_t max ) __nonnull;
47 extern char * __pure strpbrk ( const char *string,
48                                const char *delim ) __nonnull;
49 extern char * strsep ( char **string, const char *delim ) __nonnull;
50
51 extern char * __pure strerror ( int errno );
52
53 #endif /* _STRING_H */