Commit 51d0db71 authored by Daniel Cohen Gindi's avatar Daniel Cohen Gindi

`CreateDirectory` might clash with the `CreateDirectoryA`/`CreateDirectoryW` macros on MSVC

parent b2b705aa
......@@ -627,6 +627,10 @@ CloseUndoneFileTransfer(rfbClientPtr cl, rfbTightClientPtr rtcp)
* Method to handle create directory request.
******************************************************************************/
#ifdef _MSC_VER
#undef CreateDirectory /* Prevent macro clashes under Windows */
#endif /* _MSC_VER */
void
CreateDirectory(char* dirName)
{
......@@ -637,4 +641,3 @@ CreateDirectory(char* dirName)
__FILE__, __FUNCTION__, dirName);
}
}
......@@ -26,6 +26,11 @@
#ifndef FILE_TRANSFER_MSG_H
#define FILE_TRANSFER_MSG_H
#ifdef _MSC_VER
#pragma push_macro("CreateDirectory")
#undef CreateDirectory /* Prevent macro clashes under Windows */
#endif /* _MSC_VER */
typedef struct _FileTransferMsg {
char* data;
unsigned int length;
......@@ -50,5 +55,9 @@ void CloseUndoneFileTransfer(rfbClientPtr cl, rfbTightClientPtr data);
void FreeFileTransferMsg(FileTransferMsg ftm);
#ifdef _MSC_VER
# pragma pop_macro("CreateDirectory") /* Restore original macro */
#endif /* _MSC_VER */
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment