NAME
bcmp — memory
operations (LEGACY)
SYNOPSIS
int bcmp(const void *s1, const void *s2, size_t n);
DESCRIPTION
The bcmp () function shall compare the
first n bytes of the area pointed to by
s1 with the area pointed to by s2.
RETURN VALUE
The bcmp () function shall return 0 if
s1 and s2 are identical; otherwise, it
shall return non-zero. Both areas are assumed to be n
bytes long. If the value of n is 0,
bcmp () shall return 0.
ERRORS
No errors are defined.
EXAMPLES
None.
APPLICATION USAGE
The memcmp(3) function is preferred over this function.
For maximum portability, it is recommended to replace the function
call to bcmp () as follows:
#define bcmp(b1,b2,len) memcmp((b1), (b2), (size_t)(len))
RATIONALE
None.
FUTURE DIRECTIONS
This function may be withdrawn in a future version.
SEE ALSO
memcmp(3) , the Base Definitions volume of IEEE Std 1003.1-2001 (“POSIX.1”), <strings.h>
CHANGE HISTORY
First released in Issue 4, Version 2.
Issue 5
Moved from X/OPEN UNIX extension to BASE.
Issue 6
This function is marked LEGACY.
End of informative text. footer end