C
Christopher Benson-Manica
I have, in a certain unnamed header file, the following:
#define PIPE_WAIT 0x00000000
#define PIPE_NOWAIT 0x00000001
and a function that the compiler believes has the following prototype:
__stdcall SetNamedPipeHandleState(void *,unsigned long *,
unsigned long *,unsigned long *); /* nonstandard calling convention */
The (unnamed) compiler is perfectly happy with
SetNamedPipeHandleState( NULL, PIPE_WAIT, NULL, NULL );
but has a temper tantrum over
SetNamedPipeHandleState( NULL, PIPE_NOWAIT, NULL, NULL );
(both of which should be valid according to a certain unnamed website)
Of course, what's happening here is clear (0x00000000 is NULL, and
thus compatible with unsigned long *, while 0x00000001 is not). This
isn't really a question, but just a humorous look at how much fun
dealing with this unnamed setup can be. Comments are, of course,
welcome.
#define PIPE_WAIT 0x00000000
#define PIPE_NOWAIT 0x00000001
and a function that the compiler believes has the following prototype:
__stdcall SetNamedPipeHandleState(void *,unsigned long *,
unsigned long *,unsigned long *); /* nonstandard calling convention */
The (unnamed) compiler is perfectly happy with
SetNamedPipeHandleState( NULL, PIPE_WAIT, NULL, NULL );
but has a temper tantrum over
SetNamedPipeHandleState( NULL, PIPE_NOWAIT, NULL, NULL );
(both of which should be valid according to a certain unnamed website)
Of course, what's happening here is clear (0x00000000 is NULL, and
thus compatible with unsigned long *, while 0x00000001 is not). This
isn't really a question, but just a humorous look at how much fun
dealing with this unnamed setup can be. Comments are, of course,
welcome.