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

NAME

6       bcmp - memory operations (LEGACY)
7

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

24       No errors are defined.
25
26       The following sections are informative.
27

EXAMPLES

29       None.
30

APPLICATION USAGE

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

RATIONALE

41       None.
42

FUTURE DIRECTIONS

44       This function may be withdrawn in a future version.
45

SEE ALSO

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)
Impressum