mirror of https://github.com/ipxe/ipxe.git
4.3BSD says that bcopy and bzero are defined in strings.h, not string.h
parent
a213876382
commit
1a0ca661c2
|
@ -59,7 +59,6 @@ char * strpbrk(const char * cs,const char * ct);
|
||||||
char * strtok(char * s,const char * ct);
|
char * strtok(char * s,const char * ct);
|
||||||
char * strsep(char **s, const char *ct);
|
char * strsep(char **s, const char *ct);
|
||||||
void * memset(void * s,int c,size_t count);
|
void * memset(void * s,int c,size_t count);
|
||||||
char * bcopy(const char * src, char * dest, int count);
|
|
||||||
void * memmove(void * dest,const void *src,size_t count);
|
void * memmove(void * dest,const void *src,size_t count);
|
||||||
int __attribute__ (( pure )) memcmp(const void * cs,const void * ct,
|
int __attribute__ (( pure )) memcmp(const void * cs,const void * ct,
|
||||||
size_t count);
|
size_t count);
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
#define _STRINGS_H
|
#define _STRINGS_H
|
||||||
|
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
static inline __attribute__ (( always_inline )) int
|
static inline __attribute__ (( always_inline )) int
|
||||||
__constant_flsl ( unsigned long x ) {
|
__constant_flsl ( unsigned long x ) {
|
||||||
|
@ -53,4 +54,14 @@ extern int __flsl ( long x );
|
||||||
|
|
||||||
extern int strcasecmp ( const char *s1, const char *s2 );
|
extern int strcasecmp ( const char *s1, const char *s2 );
|
||||||
|
|
||||||
|
static inline __attribute__ (( always_inline )) void
|
||||||
|
bcopy ( const void *src, void *dest, size_t n ) {
|
||||||
|
memmove ( dest, src, n );
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline __attribute__ (( always_inline )) void
|
||||||
|
bzero ( void *s, size_t n ) {
|
||||||
|
memset ( s, 0, n );
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* _STRINGS_H */
|
#endif /* _STRINGS_H */
|
||||||
|
|
Loading…
Reference in New Issue