Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

Returns

This function returns 0 if the two berval structures are equivalent. It returns a negative value if L is shorter than R, and a positive value if L is longer than R. If L and R are of the same size but their content differs, this function returns a negative value if L is less than R, or a positive value if L is greater than R, where L and R are compared as arrays of bytes.