Hi,
I have a question about C header files, yes I know this is an assembly language forum so don't bother pointing it out. I am translating some header files and found the following ...
#define SO_LINGER 0x0080
.
.
.
#define SO_DONTLINGER (int)(~SO_LINGER)
I have been working under the assumption that this would mean any value that does not have the SO_LINGER bit set, is this correct ?
Donkey
~ is the one's complement operator, therefore
(int)(~SO_LINGER) = 0xFFFFFF7F (assuming the compiler uses 32-bit integers)
btw, isn't this an assembly language forum? :wink
It's simply:
SO_DONTLINGER equ NOT SO_LINGER