2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/string.h (bcmp, bcopy, bzero): Change prototypes to use void * pointers and comply with Single Unix spec. * libc/string/bcmp.c: Change to use void * instead of char *. * libc/string/bcopy.c: Ditto. * libc/string/bzero.c: Ditto.
This commit is contained in:
parent
7078175474
commit
afe5651795
@ -1,3 +1,11 @@
|
|||||||
|
2002-05-23 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
|
* libc/include/string.h (bcmp, bcopy, bzero): Change prototypes
|
||||||
|
to use void * pointers and comply with Single Unix spec.
|
||||||
|
* libc/string/bcmp.c: Change to use void * instead of char *.
|
||||||
|
* libc/string/bcopy.c: Ditto.
|
||||||
|
* libc/string/bzero.c: Ditto.
|
||||||
|
|
||||||
2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
|
2002-05-22 Jeff Johnston <jjohnstn@redhat.com>
|
||||||
|
|
||||||
* libc/sys/linux/shm_open.c: New file.
|
* libc/sys/linux/shm_open.c: New file.
|
||||||
|
@ -51,9 +51,9 @@ size_t _EXFUN(strxfrm,(char *, const char *, size_t));
|
|||||||
#ifndef __STRICT_ANSI__
|
#ifndef __STRICT_ANSI__
|
||||||
char *_EXFUN(strtok_r,(char *, const char *, char **));
|
char *_EXFUN(strtok_r,(char *, const char *, char **));
|
||||||
|
|
||||||
int _EXFUN(bcmp,(const char *, const char *, size_t));
|
int _EXFUN(bcmp,(const void *, const void *, size_t));
|
||||||
void _EXFUN(bcopy,(const char *, char *, size_t));
|
void _EXFUN(bcopy,(const void *, void *, size_t));
|
||||||
void _EXFUN(bzero,(char *, size_t));
|
void _EXFUN(bzero,(void *, size_t));
|
||||||
int _EXFUN(ffs,(int));
|
int _EXFUN(ffs,(int));
|
||||||
char *_EXFUN(index,(const char *, int));
|
char *_EXFUN(index,(const char *, int));
|
||||||
_PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
|
_PTR _EXFUN(memccpy,(_PTR, const _PTR, int, size_t));
|
||||||
|
@ -7,17 +7,17 @@ INDEX
|
|||||||
|
|
||||||
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
int bcmp(const char *<[s1]>, const char *<[s2]>, size_t <[n]>);
|
int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
|
||||||
|
|
||||||
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
int bcmp(<[s1]>, <[s2]>, <[n]>)
|
int bcmp(<[s1]>, <[s2]>, <[n]>)
|
||||||
char *<[s1]>;
|
const void *<[s1]>;
|
||||||
char *<[s2]>;
|
const void *<[s2]>;
|
||||||
size_t <[n]>;
|
size_t <[n]>;
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
This function compares not more than <[n]> characters of the
|
This function compares not more than <[n]> bytes of the
|
||||||
object pointed to by <[s1]> with the object pointed to by <[s2]>.
|
object pointed to by <[s1]> with the object pointed to by <[s2]>.
|
||||||
|
|
||||||
This function is identical to <<memcmp>>.
|
This function is identical to <<memcmp>>.
|
||||||
@ -41,8 +41,8 @@ QUICKREF
|
|||||||
|
|
||||||
int
|
int
|
||||||
_DEFUN (bcmp, (m1, m2, n),
|
_DEFUN (bcmp, (m1, m2, n),
|
||||||
_CONST char *m1 _AND
|
_CONST void *m1 _AND
|
||||||
_CONST char *m2 _AND
|
_CONST void *m2 _AND
|
||||||
size_t n)
|
size_t n)
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -4,12 +4,12 @@ FUNCTION
|
|||||||
|
|
||||||
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
void bcopy(const char *<[in]>, char *<[out]>, size_t <[n]>);
|
void bcopy(const void *<[in]>, void *<[out]>, size_t <[n]>);
|
||||||
|
|
||||||
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
||||||
void bcopy(<[in]>, <[out]>, <[n]>
|
void bcopy(<[in]>, <[out]>, <[n]>
|
||||||
char *<[in]>;
|
const void *<[in]>;
|
||||||
char *<[out]>;
|
void *<[out]>;
|
||||||
size_t <[n]>;
|
size_t <[n]>;
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@ -30,9 +30,9 @@ QUICKREF
|
|||||||
|
|
||||||
void
|
void
|
||||||
_DEFUN (bcopy, (b1, b2, length),
|
_DEFUN (bcopy, (b1, b2, length),
|
||||||
_CONST char *b1 _AND
|
_CONST void *b1 _AND
|
||||||
char *b2 _AND
|
void *b2 _AND
|
||||||
size_t length)
|
size_t length)
|
||||||
{
|
{
|
||||||
memmove ((_PTR) b2, (_PTR) b1, length);
|
memmove (b2, b1, length);
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,12 @@ INDEX
|
|||||||
|
|
||||||
ANSI_SYNOPSIS
|
ANSI_SYNOPSIS
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
void bzero(char *<[b]>, size_t <[length]>);
|
void bzero(void *<[b]>, size_t <[length]>);
|
||||||
|
|
||||||
TRAD_SYNOPSIS
|
TRAD_SYNOPSIS
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
void bzero(<[b]>, <[length]>)
|
void bzero(<[b]>, <[length]>)
|
||||||
char *<[b]>;
|
void *<[b]>;
|
||||||
size_t <[length]>;
|
size_t <[length]>;
|
||||||
|
|
||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
@ -34,9 +34,10 @@ Neither ANSI C nor the System V Interface Definition (Issue 2) require
|
|||||||
|
|
||||||
_VOID
|
_VOID
|
||||||
_DEFUN (bzero, (b, length),
|
_DEFUN (bzero, (b, length),
|
||||||
char *b _AND
|
void *b _AND
|
||||||
size_t length)
|
size_t length)
|
||||||
{
|
{
|
||||||
|
char *ptr = (char *)b;
|
||||||
while (length--)
|
while (length--)
|
||||||
*b++ = 0;
|
*ptr++ = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user