diff options
author | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-09-20 16:42:38 +0300 |
---|---|---|
committer | Daniel Cohen Gindi <danielgindi@gmail.com> | 2014-09-20 17:46:31 +0300 |
commit | 51d0db710717be84c62c24ce9f8b99e98728cc1c (patch) | |
tree | d1bfd5cd1add96bdefff6f01262a51cc53af0cae /libvncserver/tightvnc-filetransfer | |
parent | b2b705aa33be8140f735fc993928513ff00968d3 (diff) | |
download | libtdevnc-51d0db710717be84c62c24ce9f8b99e98728cc1c.tar.gz libtdevnc-51d0db710717be84c62c24ce9f8b99e98728cc1c.zip |
`CreateDirectory` might clash with the `CreateDirectoryA`/`CreateDirectoryW` macros on MSVC
Diffstat (limited to 'libvncserver/tightvnc-filetransfer')
-rw-r--r-- | libvncserver/tightvnc-filetransfer/filetransfermsg.c | 5 | ||||
-rw-r--r-- | libvncserver/tightvnc-filetransfer/filetransfermsg.h | 9 |
2 files changed, 13 insertions, 1 deletions
diff --git a/libvncserver/tightvnc-filetransfer/filetransfermsg.c b/libvncserver/tightvnc-filetransfer/filetransfermsg.c index 3cda84a..4e18813 100644 --- a/libvncserver/tightvnc-filetransfer/filetransfermsg.c +++ b/libvncserver/tightvnc-filetransfer/filetransfermsg.c @@ -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); } } - diff --git a/libvncserver/tightvnc-filetransfer/filetransfermsg.h b/libvncserver/tightvnc-filetransfer/filetransfermsg.h index 30e58df..3b27bd0 100644 --- a/libvncserver/tightvnc-filetransfer/filetransfermsg.h +++ b/libvncserver/tightvnc-filetransfer/filetransfermsg.h @@ -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 |