1BCMP(P) POSIX Programmer's Manual BCMP(P)
2
3
4
6 bcmp - memory operations (LEGACY)
7
9 #include <strings.h>
10
11 int bcmp(const void *s1, const void *s2, size_t n);
12
13
15 The bcmp() function shall compare the first n bytes of the area pointed
16 to by s1 with the area pointed to by s2.
17
19 The bcmp() function shall return 0 if s1 and s2 are identical; other‐
20 wise, it shall return non-zero. Both areas are assumed to be n bytes
21 long. If the value of n is 0, bcmp() shall return 0.
22
24 No errors are defined.
25
26 The following sections are informative.
27
29 None.
30
32 The memcmp() function is preferred over this function.
33
34 For maximum portability, it is recommended to replace the function call
35 to bcmp() as follows:
36
37
38 #define bcmp(b1,b2,len) memcmp((b1), (b2), (size_t)(len))
39
41 None.
42
44 This function may be withdrawn in a future version.
45
47 memcmp() , the Base Definitions volume of IEEE Std 1003.1-2001,
48 <strings.h>
49
51 Portions of this text are reprinted and reproduced in electronic form
52 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
53 -- Portable Operating System Interface (POSIX), The Open Group Base
54 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
55 Electrical and Electronics Engineers, Inc and The Open Group. In the
56 event of any discrepancy between this version and the original IEEE and
57 The Open Group Standard, the original IEEE and The Open Group Standard
58 is the referee document. The original Standard can be obtained online
59 at http://www.opengroup.org/unix/online.html .
60
61
62
63IEEE/The Open Group 2003 BCMP(P)