From: Eric Pouech <epouech@codeweavers.com> Mainly wrapping the header inside extern "C" {...} Part 5: [n-r] range. Signed-off-by: Eric Pouech <epouech@codeweavers.com> --- include/netioapi.h | 8 ++++++++ include/netiodef.h | 14 ++++++++------ include/newdev.h | 8 ++++++++ include/ntddcdrm.h | 8 ++++++++ include/rometadata.h | 8 ++++++++ 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/include/netioapi.h b/include/netioapi.h index 9994e5b19ac..9d770fc05cc 100644 --- a/include/netioapi.h +++ b/include/netioapi.h @@ -19,6 +19,10 @@ #ifndef __WINE_NETIOAPI_H #define __WINE_NETIOAPI_H +#ifdef __cplusplus +extern "C" { +#endif + #include <ntddndis.h> #ifndef IPHLPAPI_DLL_LINKAGE @@ -289,4 +293,8 @@ IPHLPAPI_DLL_LINKAGE DWORD WINAPI SetCurrentThreadCompartmentId(NET_IF_COMPARTME IPHLPAPI_DLL_LINKAGE PCHAR WINAPI if_indextoname(NET_IFINDEX,PCHAR); IPHLPAPI_DLL_LINKAGE NET_IFINDEX WINAPI if_nametoindex(PCSTR); +#ifdef __cplusplus +} +#endif + #endif /* __WINE_NETIOAPI_H */ diff --git a/include/netiodef.h b/include/netiodef.h index 0d0d316b8eb..062fbc811e6 100644 --- a/include/netiodef.h +++ b/include/netiodef.h @@ -19,6 +19,10 @@ #ifndef __WINE_NETIODEF_H #define __WINE_NETIODEF_H +#ifdef __cplusplus +extern "C" { +#endif + typedef enum _NPI_MODULEID_TYPE { MIT_GUID = 1, @@ -58,15 +62,9 @@ static inline BOOLEAN NmrIsEqualNpiModuleId( const NPI_MODULEID *mod1, const NPI } #ifdef __WINE_INIT_NPI_MODULEID -#ifdef __cplusplus -#define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ - EXTERN_C const NPI_MODULEID name = \ - { sizeof(NPI_MODULEID), MIT_GUID, { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } } } -#else #define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ const NPI_MODULEID name = \ { sizeof(NPI_MODULEID), MIT_GUID, { { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } } } } -#endif #else /* __WINE_INIT_MODULEID */ #define DEFINE_NPI_GUID_MODULEID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ EXTERN_C const NPI_MODULEID name @@ -84,4 +82,8 @@ DEFINE_NPI_MS_MODULEID( NPI_MS_NDIS_MODULEID, 0x11 ); #undef DEFINE_NPI_MS_MODULEID #undef DEFINE_NPI_GUID_MODULEID +#ifdef __cplusplus +} +#endif + #endif /* __WINE_NETIODEF_H */ diff --git a/include/newdev.h b/include/newdev.h index 94b8a940de5..12c293af5b3 100644 --- a/include/newdev.h +++ b/include/newdev.h @@ -21,6 +21,10 @@ #ifndef _INC_NEWDEV #define _INC_NEWDEV +#ifdef __cplusplus +extern "C" { +#endif + #include "setupapi.h" #define INSTALLFLAG_FORCE 0x1 @@ -47,4 +51,8 @@ BOOL WINAPI DiInstallDriverA(HWND parent, const char *inf_path, DWORD flags, BOO BOOL WINAPI DiInstallDriverW(HWND parent, const WCHAR *inf_path, DWORD flags, BOOL *reboot); #define DiInstallDriver WINELIB_NAME_AW(DiInstallDriver) +#ifdef __cplusplus +} +#endif + #endif diff --git a/include/ntddcdrm.h b/include/ntddcdrm.h index 8d45b30417e..3281e8e2f6d 100644 --- a/include/ntddcdrm.h +++ b/include/ntddcdrm.h @@ -21,6 +21,10 @@ #ifndef __NTDDCDRM_H #define __NTDDCDRM_H +#ifdef __cplusplus +extern "C" { +#endif + #define IOCTL_CDROM_BASE FILE_DEVICE_CD_ROM #define IOCTL_CDROM_UNLOAD_DRIVER CTL_CODE(IOCTL_CDROM_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS) #define IOCTL_CDROM_READ_TOC CTL_CODE(IOCTL_CDROM_BASE, 0x0000, METHOD_BUFFERED, FILE_READ_ACCESS) @@ -182,4 +186,8 @@ typedef struct __RAW_READ_INFO { TRACK_MODE_TYPE TrackMode; } RAW_READ_INFO, *PRAW_READ_INFO; +#ifdef __cplusplus +} +#endif + #endif /* __NTDDCDRM_H */ diff --git a/include/rometadata.h b/include/rometadata.h index 0d528804778..da3b1ed63b7 100644 --- a/include/rometadata.h +++ b/include/rometadata.h @@ -19,6 +19,14 @@ #ifndef _ROMETADATA_H_ #define _ROMETADATA_H_ +#ifdef __cplusplus +extern "C" { +#endif + STDAPI MetaDataGetDispenser(REFCLSID rclsid, REFIID riid, VOID **obj); +#ifdef __cplusplus +} +#endif + #endif /* _ROMETADATA_H_ */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10303