To Cocoa? Because both of those are available in Cocoa.
If not, it depends on the code. Generally htonl is used in networking code to swap the bytes into network order, but .net/java’s Socket classes deal with this for you, you don’t have to use it. Besides that, above define is just a constant?
Sorry I made a bit of a mistake with that one. I was having a few issues while porting some code and never went back at the end to see if it would compile, which is does now.