[freerdp,api] add FREERDP_ENTRY_POINT

C requires prototypes or compilers will complain about them missing. Our
library entry points do not have such, therefore add the macro
FREERDP_ENTRY_POINT which declares the function prototype automatically
before the function.
This commit is contained in:
akallabeth 2023-08-25 13:41:09 +02:00 committed by akallabeth
parent b608be19e4
commit bb5345c60e
52 changed files with 87 additions and 55 deletions

View File

@ -175,7 +175,7 @@ static const IWTSVirtualChannelCallback ainput_functions = { ainput_on_data_rece
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT ainput_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT ainput_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, AINPUT_DVC_CHANNEL_NAME,
sizeof(AINPUT_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -390,7 +390,8 @@ static UINT audin_alsa_parse_addin_args(AudinALSADevice* device, const ADDIN_ARG
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT alsa_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(
UINT alsa_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinALSADevice* alsa;

View File

@ -967,7 +967,7 @@ BOOL audin_process_addin_args(AUDIN_PLUGIN* audin, const ADDIN_ARGV* args)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT audin_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT audin_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
struct SubsystemEntry
{

View File

@ -296,7 +296,8 @@ static UINT audin_ios_free(IAudinDevice *device)
return CHANNEL_RC_OK;
}
UINT ios_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(
UINT ios_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
DWORD errCode;
char errString[1024];

View File

@ -381,7 +381,8 @@ static UINT audin_mac_parse_addin_args(AudinMacDevice *device, const ADDIN_ARGV
return CHANNEL_RC_OK;
}
UINT mac_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(
UINT mac_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
DWORD errCode;
char errString[1024];

View File

@ -292,7 +292,8 @@ static UINT audin_opensles_parse_addin_args(AudinOpenSLESDevice* device, const A
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT opensles_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT opensles_freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinOpenSLESDevice* opensles;

View File

@ -443,7 +443,8 @@ static UINT audin_oss_parse_addin_args(AudinOSSDevice* device, const ADDIN_ARGV*
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT oss_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(
UINT oss_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinOSSDevice* oss;

View File

@ -498,7 +498,8 @@ static UINT audin_pulse_parse_addin_args(AudinPulseDevice* device, const ADDIN_A
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT pulse_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT pulse_freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinPulseDevice* pulse;

View File

@ -309,7 +309,8 @@ static UINT audin_sndio_parse_addin_args(AudinSndioDevice* device, ADDIN_ARGV* a
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT sndio_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT sndio_freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
ADDIN_ARGV* args;
AudinSndioDevice* sndio;

View File

@ -493,7 +493,8 @@ static UINT audin_winmm_parse_addin_args(AudinWinmmDevice* device, const ADDIN_A
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT winmm_freerdp_audin_client_subsystem_entry(PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT winmm_freerdp_audin_client_subsystem_entry(
PFREERDP_AUDIN_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
AudinWinmmDevice* winmm;

View File

@ -1117,7 +1117,8 @@ static VOID VCAPITYPE cliprdr_virtual_channel_init_event_ex(LPVOID lpUserParam,
/* cliprdr is always built-in */
#define VirtualChannelEntryEx cliprdr_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
cliprdrPlugin* cliprdr;

View File

@ -315,7 +315,7 @@ static const IWTSVirtualChannelCallback disp_callbacks = { disp_on_data_received
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT disp_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT disp_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, DISP_DVC_CHANNEL_NAME,
sizeof(DISP_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -1970,7 +1970,8 @@ static int drdynvc_get_version(DrdynvcClientContext* context)
/* drdynvc is always built-in */
#define VirtualChannelEntryEx drdynvc_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
drdynvcPlugin* drdynvc;

View File

@ -1004,7 +1004,7 @@ out_error:
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT drive_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT drive_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints))
{
RDPDR_DRIVE* drive;
UINT error;

View File

@ -84,7 +84,7 @@ static const IWTSVirtualChannelCallback echo_callbacks = { echo_on_data_received
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT echo_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT echo_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, ECHO_DVC_CHANNEL_NAME,
sizeof(ECHO_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -1230,7 +1230,8 @@ static VOID VCAPITYPE encomsp_virtual_channel_init_event_ex(LPVOID lpUserParam,
/* encomsp is always built-in */
#define VirtualChannelEntryEx encomsp_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS_EX pEntryPoints,
PVOID pInitHandle))
{
BOOL isFreerdp = FALSE;
encomspPlugin* encomsp = (encomspPlugin*)calloc(1, sizeof(encomspPlugin));

View File

@ -385,7 +385,7 @@ static void terminate_plugin_cb(GENERIC_DYNVC_PLUGIN* base)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT geometry_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT geometry_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, GEOMETRY_DVC_CHANNEL_NAME,
sizeof(GEOMETRY_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -414,7 +414,7 @@ static void parallel_message_free(void* obj)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT parallel_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT parallel_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints))
{
char* name;
char* path;

View File

@ -406,7 +406,7 @@ static void printer_cups_release_ref_driver(rdpPrinterDriver* driver)
cups_driver->references--;
}
UINT cups_freerdp_printer_client_subsystem_entry(void* arg)
FREERDP_ENTRY_POINT(UINT cups_freerdp_printer_client_subsystem_entry(void* arg))
{
rdpPrinterDriver** ppPrinter = (rdpPrinterDriver**)arg;
if (!ppPrinter)

View File

@ -1022,7 +1022,7 @@ static rdpPrinterDriver* printer_load_backend(const char* backend)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT printer_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT printer_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints))
{
char* name;
char* driver_name;

View File

@ -434,7 +434,7 @@ static void printer_win_release_ref_driver(rdpPrinterDriver* driver)
win->references--;
}
UINT win_freerdp_printer_client_subsystem_entry(void* arg)
FREERDP_ENTRY_POINT(UINT win_freerdp_printer_client_subsystem_entry(void* arg))
{
rdpPrinterDriver** ppPrinter = (rdpPrinterDriver**)arg;
if (!ppPrinter)

View File

@ -673,7 +673,8 @@ static VOID VCAPITYPE rail_virtual_channel_init_event_ex(LPVOID lpUserParam, LPV
/* rail is always built-in */
#define VirtualChannelEntryEx rail_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
railPlugin* rail;

View File

@ -321,7 +321,8 @@ static VOID VCAPITYPE VirtualChannelInitEventEx(LPVOID lpUserParam, LPVOID pInit
#else
#define VirtualChannelEntryEx FREERDP_API VirtualChannelEntryEx
#endif
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
CHANNEL_ENTRY_POINTS_FREERDP_EX* pEntryPointsEx;
CHANNEL_DEF channelDef;

View File

@ -2155,7 +2155,8 @@ static VOID VCAPITYPE rdpdr_virtual_channel_init_event_ex(LPVOID lpUserParam, LP
#define TAG CHANNELS_TAG("rdpdr.client")
#define VirtualChannelEntryEx rdpdr_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
rdpdrPlugin* rdpdr;

View File

@ -1471,7 +1471,7 @@ static const IWTSVirtualChannelCallback geometry_callbacks = { rdpei_on_data_rec
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT rdpei_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT rdpei_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, RDPEI_DVC_CHANNEL_NAME,
sizeof(RDPEI_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -2403,7 +2403,7 @@ static const IWTSVirtualChannelCallback rdpgfx_callbacks = { rdpgfx_on_data_rece
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT rdpgfx_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT rdpgfx_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
return freerdp_generic_DVCPluginEntry(pEntryPoints, TAG, RDPGFX_DVC_CHANNEL_NAME,
sizeof(RDPGFX_PLUGIN), sizeof(GENERIC_CHANNEL_CALLBACK),

View File

@ -515,7 +515,8 @@ static UINT rdpsnd_alsa_parse_addin_args(rdpsndDevicePlugin* device, const ADDIN
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT alsa_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT alsa_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
rdpsndAlsaPlugin* alsa;

View File

@ -109,7 +109,8 @@ static UINT rdpsnd_fake_parse_addin_args(rdpsndFakePlugin* fake, const ADDIN_ARG
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT fake_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT fake_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
rdpsndFakePlugin* fake;

View File

@ -264,7 +264,8 @@ static void rdpsnd_ios_free(rdpsndDevicePlugin* device)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT ios_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT ios_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
rdpsndIOSPlugin* p = (rdpsndIOSPlugin*)calloc(1, sizeof(rdpsndIOSPlugin));

View File

@ -382,7 +382,8 @@ static UINT rdpsnd_mac_play(rdpsndDevicePlugin *device, const BYTE *data, size_t
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT mac_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT mac_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
rdpsndMacPlugin *mac;
mac = (rdpsndMacPlugin *)calloc(1, sizeof(rdpsndMacPlugin));

View File

@ -332,8 +332,8 @@ static int rdpsnd_opensles_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_AR
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT opensles_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT opensles_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
ADDIN_ARGV* args;
rdpsndopenslesPlugin* opensles;

View File

@ -441,7 +441,8 @@ static int rdpsnd_oss_parse_addin_args(rdpsndDevicePlugin* device, const ADDIN_A
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT oss_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT oss_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
rdpsndOssPlugin* oss = (rdpsndOssPlugin*)calloc(1, sizeof(rdpsndOssPlugin));

View File

@ -631,7 +631,8 @@ static UINT rdpsnd_pulse_parse_addin_args(rdpsndDevicePlugin* device, const ADDI
return CHANNEL_RC_OK;
}
UINT pulse_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT pulse_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
rdpsndPulsePlugin* pulse;

View File

@ -1550,7 +1550,8 @@ fail:
return NULL;
}
/* rdpsnd is always built-in */
BOOL VCAPITYPE rdpsnd_VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE rdpsnd_VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
rdpsndPlugin* rdpsnd;
@ -1769,7 +1770,7 @@ static UINT rdpsnd_plugin_terminated(IWTSPlugin* pPlugin)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT rdpsnd_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT rdpsnd_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
UINT error = CHANNEL_RC_OK;
rdpsndPlugin* rdpsnd;

View File

@ -179,7 +179,8 @@ static UINT rdpsnd_sndio_parse_addin_args(rdpsndDevicePlugin* device, ADDIN_ARGV
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT sndio_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT sndio_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
ADDIN_ARGV* args;
rdpsndSndioPlugin* sndio;

View File

@ -313,7 +313,8 @@ static void rdpsnd_winmm_parse_addin_args(rdpsndDevicePlugin* device, const ADDI
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT winmm_freerdp_rdpsnd_client_subsystem_entry(PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT winmm_freerdp_rdpsnd_client_subsystem_entry(
PFREERDP_RDPSND_DEVICE_ENTRY_POINTS pEntryPoints))
{
const ADDIN_ARGV* args;
rdpsndWinmmPlugin* winmm;

View File

@ -1040,7 +1040,8 @@ static VOID VCAPITYPE remdesk_virtual_channel_init_event_ex(LPVOID lpUserParam,
/* remdesk is always built-in */
#define VirtualChannelEntryEx remdesk_VirtualChannelEntryEx
BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints, PVOID pInitHandle)
FREERDP_ENTRY_POINT(BOOL VCAPITYPE VirtualChannelEntryEx(PCHANNEL_ENTRY_POINTS pEntryPoints,
PVOID pInitHandle))
{
UINT rc;
remdeskPlugin* remdesk;

View File

@ -813,7 +813,7 @@ static void serial_message_free(void* obj)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT serial_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT serial_DeviceServiceEntry(PDEVICE_SERVICE_ENTRY_POINTS pEntryPoints))
{
char* name;
char* path;

View File

@ -345,7 +345,7 @@ static UINT sshagent_plugin_terminated(IWTSPlugin* pPlugin)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT sshagent_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT sshagent_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
UINT status = CHANNEL_RC_OK;
SSHAGENT_PLUGIN* sshagent;

View File

@ -224,7 +224,7 @@ static void tsmf_alsa_free(ITSMFAudioDevice* audio)
free(alsa);
}
ITSMFAudioDevice* alsa_freerdp_tsmf_client_audio_subsystem_entry(void)
FREERDP_ENTRY_POINT(ITSMFAudioDevice* alsa_freerdp_tsmf_client_audio_subsystem_entry(void))
{
TSMFAlsaAudioDevice* alsa = calloc(1, sizeof(TSMFAlsaAudioDevice));
if (!alsa)

View File

@ -650,7 +650,7 @@ static BOOL CALLBACK InitializeAvCodecs(PINIT_ONCE once, PVOID param, PVOID* con
return TRUE;
}
ITSMFDecoder* ffmpeg_freerdp_tsmf_client_decoder_subsystem_entry(void)
FREERDP_ENTRY_POINT(ITSMFDecoder* ffmpeg_freerdp_tsmf_client_decoder_subsystem_entry(void))
{
TSMFFFmpegDecoder* decoder;
InitOnceExecuteOnce(&g_Initialized, InitializeAvCodecs, NULL, NULL);

View File

@ -1009,7 +1009,7 @@ static BOOL tsmf_gstreamer_sync(ITSMFDecoder* decoder, void (*cb)(void*), void*
return TRUE;
}
ITSMFDecoder* gstreamer_freerdp_tsmf_client_decoder_subsystem_entry(void)
FREERDP_ENTRY_POINT(ITSMFDecoder* gstreamer_freerdp_tsmf_client_decoder_subsystem_entry(void))
{
TSMFGstreamerDecoder* decoder;

View File

@ -230,7 +230,7 @@ static void tsmf_oss_free(ITSMFAudioDevice* audio)
free(oss);
}
ITSMFAudioDevice* oss_freerdp_tsmf_client_audio_subsystem_entry(void)
FREERDP_ENTRY_POINT(ITSMFAudioDevice* oss_freerdp_tsmf_client_audio_subsystem_entry(void))
{
TSMFOssAudioDevice* oss = calloc(1, sizeof(TSMFOssAudioDevice));
if (!oss)

View File

@ -398,7 +398,7 @@ static void tsmf_pulse_free(ITSMFAudioDevice* audio)
free(pulse);
}
ITSMFAudioDevice* pulse_freerdp_tsmf_client_audio_subsystem_entry(void)
FREERDP_ENTRY_POINT(ITSMFAudioDevice* pulse_freerdp_tsmf_client_audio_subsystem_entry(void))
{
TSMFPulseAudioDevice* pulse;
pulse = (TSMFPulseAudioDevice*)calloc(1, sizeof(TSMFPulseAudioDevice));

View File

@ -552,7 +552,7 @@ static UINT tsmf_process_addin_args(IWTSPlugin* pPlugin, const ADDIN_ARGV* args)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT tsmf_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT tsmf_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
UINT status = 0;
TSMF_PLUGIN* tsmf;

View File

@ -895,7 +895,8 @@ static DWORD WINAPI poll_thread(LPVOID lpThreadParameter)
return 0;
}
UINT libusb_freerdp_urbdrc_client_subsystem_entry(PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints)
FREERDP_ENTRY_POINT(UINT libusb_freerdp_urbdrc_client_subsystem_entry(
PFREERDP_URBDRC_SERVICE_ENTRY_POINTS pEntryPoints))
{
wObject* obj;
UINT rc;

View File

@ -946,7 +946,7 @@ BOOL del_device(IUDEVMAN* idevman, UINT32 flags, BYTE busnum, BYTE devnum, UINT1
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT urbdrc_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT urbdrc_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
UINT status = 0;
const ADDIN_ARGV* args;

View File

@ -1165,7 +1165,7 @@ static UINT video_plugin_terminated(IWTSPlugin* pPlugin)
*
* @return 0 on success, otherwise a Win32 error code
*/
UINT video_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(UINT video_DVCPluginEntry(IDRDYNVC_ENTRY_POINTS* pEntryPoints))
{
UINT error = CHANNEL_RC_OK;
VIDEO_PLUGIN* videoPlugin;

View File

@ -27,7 +27,7 @@
#include <sstream>
#include "../webview_impl.hpp"
std::vector<std::string> split(const std::string& input, const std::string& regex)
static std::vector<std::string> split(const std::string& input, const std::string& regex)
{
// passing -1 as the submatch index parameter performs splitting
std::regex re(regex);
@ -35,7 +35,7 @@ std::vector<std::string> split(const std::string& input, const std::string& rege
return { first, last };
}
std::map<std::string, std::string> urlsplit(const std::string& url)
static std::map<std::string, std::string> urlsplit(const std::string& url)
{
auto pos = url.find("?");
if (pos == std::string::npos)

View File

@ -24,6 +24,13 @@
#include <winpr/wlog.h>
#include <winpr/platform.h>
/* To silence missing prototype warnings for library entry points use this macro.
* It first declares the function as prototype and then again as function implementation
*/
#define FREERDP_ENTRY_POINT(fkt) \
fkt; \
fkt
#ifdef _WIN32
#define FREERDP_CC __cdecl
#else

View File

@ -378,7 +378,7 @@ static BOOL wst_handle_ok_or_forbidden(rdpWst* wst, HttpResponse** ppresponse, D
{
char* urlWithAuth = NULL;
size_t urlLen = 0;
char firstParam = (strchr(wst->gwpath, '?') > 0 ? '&' : '?');
char firstParam = (strchr(wst->gwpath, '?') != NULL) ? '&' : '?';
winpr_asprintf(
&urlWithAuth, &urlLen, arm_query_param, wst->gwpath, firstParam,
freerdp_settings_get_string(wst->settings, FreeRDP_GatewayHttpExtAuthBearer));

View File

@ -1483,12 +1483,12 @@ static void x11_shadow_subsystem_free(rdpShadowSubsystem* subsystem)
free(subsystem);
}
FREERDP_API const char* ShadowSubsystemName(void)
FREERDP_ENTRY_POINT(FREERDP_API const char* ShadowSubsystemName(void))
{
return "X11";
}
FREERDP_API int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints)
FREERDP_ENTRY_POINT(FREERDP_API int ShadowSubsystemEntry(RDP_SHADOW_ENTRY_POINTS* pEntryPoints))
{
if (!pEntryPoints)
return -1;