Confusing manual pages for bcopy, memcpy and memmove functions

Hello,
I noticed that bcopy, memcpy and memmove functions are doing exactly the same job but they are differently describe in manual pages. The only difference between this 3 functions is that bcopy has different parameter order and doesnt return anything. The 'body' of this 3 functions is exectly the same. Its a little confusing because in man pages it is written that memmove copy, is always done in a non-destructive manner, but memcpy is doing the same job and man pages dont say that.

I think if functions are doing the same job and have the same code they should not be describe different in manual pages. What do you think about this?

Best regards
 
On freebsd all those functions are wrappers for bcopy() (and act more or less the same), the reason to have so many functions (4) is because these functions on other systems do not behave the same regarding overlapping and for compatibility reasons they had to wrap these functions around bcopy.
 
Hello,
Thanks expl for the fast answer. You said that the reason of having different manuals for this functions is that they behave different in other OS. If I want to know how memcpy behave on OpenBSD I will read OpenBSD manual :r. In my opinion there should be a note that in FreeBSD, functions like memcpy and memmove are wrappers for bcopy function.

Best regards
 
Read memcpy man page again. It clearly states what I just said. The reason they keep these functions so software written on other systems would compile and run on freebsd with no modifications.
 
Back
Top