Closed dmitigr closed 4 years ago
Btw, I can provide a patch with renamings "interface" to "intrface".
I build daily on Windows via CI without problems. Where is interface a macro? Why would anyone define a lowercase macro? There is no keyword called interface in C nor C++.
On Windows 10 "interface" is a macro defined in combaseapi.h like that:
#if defined(__cplusplus) && !defined(CINTERFACE)
...
#define __STRUCT__ struct
#define interface __STRUCT__
...
#else
...
#define interface struct
...
#endif
combaseapi.h is included by objbase.h included by Ole2.h included by Windows.h included by Winsock2.h. Inclusion of Ole2.h could be prevented by defining WIN32_LEAN_AND_MEAN before including Windows.h but I would just rename "interface" to something else.
What the fuck is wrong with Microsoft
I don't like intrface as a broken word.
Source_host? As a variant of host
Since the bind(2) manual says: "traditionally, this operation is called “assigning a name to a socket”", how about "socket_name"?
Another alternative is "socket_host".
I fixed some issues today by putting my #include libusockets.h
above other #includes. Maybe that can help?
interface -> hostName?
So, what about "interface" -> "socket_name" or "socket_host" or "source_host"? @alexhultman, please decide, and I'll be happy to provide a patch. Thanks.
Thanks for the fix.
Hello,
The following declaration leads to build errors since the "interface" is a defined macro on Windows:
WIN32_EXPORT struct us_socket_t us_socket_context_connect(int ssl, struct us_socket_context_t context, const char host, int port, const char interface, int options, int socket_ext_size);
Thanks!