1BCMP(3P)                   POSIX Programmer's Manual                  BCMP(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       bcmp - memory operations (LEGACY)
13

SYNOPSIS

15       #include <strings.h>
16
17       int bcmp(const void *s1, const void *s2, size_t n);
18
19

DESCRIPTION

21       The bcmp() function shall compare the first n bytes of the area pointed
22       to by s1 with the area pointed to by s2.
23

RETURN VALUE

25       The  bcmp()  function shall return 0 if s1 and s2 are identical; other‐
26       wise, it shall return non-zero. Both areas are assumed to  be  n  bytes
27       long. If the value of n is 0, bcmp() shall return 0.
28

ERRORS

30       No errors are defined.
31
32       The following sections are informative.
33

EXAMPLES

35       None.
36

APPLICATION USAGE

38       The memcmp() function is preferred over this function.
39
40       For maximum portability, it is recommended to replace the function call
41       to bcmp() as follows:
42
43
44              #define bcmp(b1,b2,len) memcmp((b1), (b2), (size_t)(len))
45

RATIONALE

47       None.
48

FUTURE DIRECTIONS

50       This function may be withdrawn in a future version.
51

SEE ALSO

53       memcmp(),  the  Base  Definitions   volume   of   IEEE Std 1003.1-2001,
54       <strings.h>
55
57       Portions  of  this text are reprinted and reproduced in electronic form
58       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
59       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
60       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
61       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
62       event of any discrepancy between this version and the original IEEE and
63       The  Open Group Standard, the original IEEE and The Open Group Standard
64       is the referee document. The original Standard can be  obtained  online
65       at http://www.opengroup.org/unix/online.html .
66
67
68
69IEEE/The Open Group                  2003                             BCMP(3P)
Impressum