From: Katy Feng Date: Thu, 5 Oct 2023 17:35:25 +0000 (-0700) Subject: Change to common header file not applicable to open-vm-tools. X-Git-Tag: stable-12.4.0~108 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a6e765d2a5f3946513abdec8fc61c00385dc120;p=thirdparty%2Fopen-vm-tools.git Change to common header file not applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/asyncsocket.h b/open-vm-tools/lib/include/asyncsocket.h index 09947002e..21c2d27a4 100644 --- a/open-vm-tools/lib/include/asyncsocket.h +++ b/open-vm-tools/lib/include/asyncsocket.h @@ -840,24 +840,7 @@ void AsyncSocket_WebSocketServerSendError(AsyncSocket *asock, const char *text); */ #define ASOCKPREFIX "SOCKET " -/* gcc needs special syntax to handle zero-length variadic arguments */ -#if defined(_MSC_VER) -#define ASOCKWARN(_asock, fmt, ...) \ - Warning(ASOCKPREFIX "%d (%d) " fmt, AsyncSocket_GetID(_asock), \ - AsyncSocket_GetFd(_asock), __VA_ARGS__) - -#define ASOCKLG0(_asock, fmt, ...) \ - Log(ASOCKPREFIX "%d (%d) " fmt, AsyncSocket_GetID(_asock), \ - AsyncSocket_GetFd(_asock), __VA_ARGS__) - -#define ASOCKLOG(_level, _asock, fmt, ...) \ - do { \ - if (((_level) == 0) || DOLOG_BYNAME(asyncsocket, (_level))) { \ - Log(ASOCKPREFIX "%d (%d) " fmt, AsyncSocket_GetID(_asock), \ - AsyncSocket_GetFd(_asock), __VA_ARGS__); \ - } \ - } while (0) -#else +/* Both gcc and msvc support ##__VA_ARGS__ to handle zero-length variadic arguments */ #define ASOCKWARN(_asock, fmt, ...) \ Warning(ASOCKPREFIX "%d (%d) " fmt, AsyncSocket_GetID(_asock), \ AsyncSocket_GetFd(_asock), ##__VA_ARGS__) @@ -873,7 +856,6 @@ void AsyncSocket_WebSocketServerSendError(AsyncSocket *asock, const char *text); AsyncSocket_GetFd(_asock), ##__VA_ARGS__); \ } \ } while (0) -#endif #if defined(__cplusplus) } // extern "C"