1BCMP(3) Linux Programmer's Manual BCMP(3)
2
3
4
6 bcmp - compare byte sequences
7
9 #include <strings.h>
10
11 int bcmp(const void *s1, const void *s2, size_t n);
12
14 The bcmp() function compares the two byte sequences s1 and s2 of length
15 n each. If they are equal, and in particular if n is zero, bcmp() re‐
16 turns 0. Otherwise, it returns a nonzero result.
17
19 The bcmp() function returns 0 if the byte sequences are equal, other‐
20 wise a nonzero result is returned.
21
23 For an explanation of the terms used in this section, see at‐
24 tributes(7).
25
26 ┌────────────────────────────────────────────┬───────────────┬─────────┐
27 │Interface │ Attribute │ Value │
28 ├────────────────────────────────────────────┼───────────────┼─────────┤
29 │bcmp() │ Thread safety │ MT-Safe │
30 └────────────────────────────────────────────┴───────────────┴─────────┘
31
33 4.3BSD. This function is deprecated (marked as LEGACY in
34 POSIX.1-2001): use memcmp(3) in new programs. POSIX.1-2008 removes the
35 specification of bcmp().
36
38 bstring(3), memcmp(3), strcasecmp(3), strcmp(3), strcoll(3), strn‐
39 casecmp(3), strncmp(3)
40
42 This page is part of release 5.12 of the Linux man-pages project. A
43 description of the project, information about reporting bugs, and the
44 latest version of this page, can be found at
45 https://www.kernel.org/doc/man-pages/.
46
47
48
49Linux 2021-03-22 BCMP(3)