1 // SPDX-License-Identifier: BSD-2-Clause
2 /*
3 FUNCTION
4 	<<bcmp>>---compare two memory areas
5 
6 INDEX
7 	bcmp
8 
9 SYNOPSIS
10 	#include <strings.h>
11 	int bcmp(const void *<[s1]>, const void *<[s2]>, size_t <[n]>);
12 
13 DESCRIPTION
14 	This function compares not more than <[n]> bytes of the
15 	object pointed to by <[s1]> with the object pointed to by <[s2]>.
16 
17 	This function is identical to <<memcmp>>.
18 
19 RETURNS
20 	The function returns an integer greater than, equal to or
21 	less than zero 	according to whether the object pointed to by
22 	<[s1]> is greater than, equal to or less than the object
23 	pointed to by <[s2]>.
24 
25 PORTABILITY
26 <<bcmp>> requires no supporting OS subroutines.
27 
28 QUICKREF
29 	bcmp ansi pure
30 */
31 
32 #include <string.h>
33 #include <strings.h>
34 
35 int
bcmp(const void * m1,const void * m2,size_t n)36 bcmp (const void *m1,
37 	const void *m2,
38 	size_t n)
39 
40 {
41   return memcmp (m1, m2, n);
42 }
43