Upgraded GRUB2 to 2.00 release.
[AROS.git] / arch / all-pc / boot / grub2-aros / grub-core / lib / posix_wrap / string.h
blob77fbe383b925a022c2e8ef8500ae6649ade6467e
1 /*
2 * GRUB -- GRand Unified Bootloader
3 * Copyright (C) 2009, 2010 Free Software Foundation, Inc.
5 * GRUB is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
10 * GRUB is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
19 #ifndef GRUB_POSIX_STRING_H
20 #define GRUB_POSIX_STRING_H 1
22 #include <grub/misc.h>
24 static inline grub_size_t
25 strlen (const char *s)
27 return grub_strlen (s);
30 static inline int
31 strcmp (const char *s1, const char *s2)
33 return grub_strcmp (s1, s2);
36 static inline int
37 strcasecmp (const char *s1, const char *s2)
39 return grub_strcasecmp (s1, s2);
42 #ifdef GRUB_UTIL
43 static inline void *
44 memcpy (void *dest, const void *src, grub_size_t n)
46 return grub_memcpy (dest, src, n);
49 static inline int
50 memcmp (const void *s1, const void *s2, size_t n)
52 return grub_memcmp (s1, s2, n);
55 #endif
57 static inline char *
58 strcpy (char *dest, const char *src)
60 return grub_strcpy (dest, src);
63 static inline char *
64 strstr (const char *haystack, const char *needle)
66 return grub_strstr (haystack, needle);
69 static inline char *
70 strchr (const char *s, int c)
72 return grub_strchr (s, c);
75 static inline char *
76 strncpy (char *dest, const char *src, size_t n)
78 return grub_strncpy (dest, src, n);
81 static inline char *
82 strcat (char *dest, const char *src)
84 return grub_strcat (dest, src);
87 static inline char *
88 strncat (char *dest, const char *src, size_t n)
90 return grub_strncat (dest, src, n);
93 static inline int
94 strcoll (const char *s1, const char *s2)
96 return grub_strcmp (s1, s2);
99 static inline void *
100 memchr (const void *s, int c, size_t n)
102 return grub_memchr (s, c, n);
105 #endif