1BCMP(3)                    Linux Programmer's Manual                   BCMP(3)
2
3
4

NAME

6       bcmp - compare byte sequences
7

SYNOPSIS

9       #include <strings.h>
10
11       int bcmp(const void *s1, const void *s2, size_t n);
12

DESCRIPTION

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()
16       returns 0.  Otherwise, it returns a nonzero result.
17

RETURN VALUE

19       The  bcmp()  function returns 0 if the byte sequences are equal, other‐
20       wise a nonzero result is returned.
21

ATTRIBUTES

23       For  an  explanation  of  the  terms  used   in   this   section,   see
24       attributes(7).
25
26       ┌──────────┬───────────────┬─────────┐
27Interface Attribute     Value   
28       ├──────────┼───────────────┼─────────┤
29bcmp()    │ Thread safety │ MT-Safe │
30       └──────────┴───────────────┴─────────┘

CONFORMING TO

32       4.3BSD.    This   function   is   deprecated   (marked   as  LEGACY  in
33       POSIX.1-2001): use memcmp(3) in new programs.  POSIX.1-2008 removes the
34       specification of bcmp().
35

SEE ALSO

37       bstring(3),  memcmp(3),  strcasecmp(3),  strcmp(3),  strcoll(3),  strn‐
38       casecmp(3), strncmp(3)
39

COLOPHON

41       This page is part of release 4.16 of the Linux  man-pages  project.   A
42       description  of  the project, information about reporting bugs, and the
43       latest    version    of    this    page,    can     be     found     at
44       https://www.kernel.org/doc/man-pages/.
45
46
47
48Linux                             2017-03-13                           BCMP(3)
Impressum