Yes I seen that, but this is not macro,
I would like do following:
#if (_mqx_version = "4.2.0")
#define DV_Eth_iCloseSocket(socket) closesocket(socket)
#elif (_mqx_version = "4.1.0")
#define DV_Eth_iCloseSocket(socket) shutdown(socket, FLAG_CLOSE_TX)
#endif
But like "mqx_version" is a constant, it value cannot be used in pre compile time!:smileycry:
and then if in the .c code I do following:
if (_mqx_version = "4.2.0")
{
closesocket(socket);
}
else if (_mqx_version = "4.1.0")
{
shutdown(socket, FLAG_CLOSE_TX);
}
This not link because according used OS, closesocket or shutdown API is not existing..