sane.ds: Global variable compatibility update for gcc 10.

Signed-off-by: Michael Cronenworth <mike@cchtml.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Cronenworth 2020-01-23 17:05:24 -06:00 committed by Alexandre Julliard
parent 453980e130
commit c13d58780f
2 changed files with 22 additions and 2 deletions

View File

@ -36,7 +36,7 @@
#include "twain.h"
#ifdef SONAME_LIBSANE
#define MAKE_FUNCPTR(f) typeof(f) * p##f DECLSPEC_HIDDEN;
#define MAKE_FUNCPTR(f) extern typeof(f) * p##f DECLSPEC_HIDDEN;
MAKE_FUNCPTR(sane_init)
MAKE_FUNCPTR(sane_exit)
MAKE_FUNCPTR(sane_get_devices)
@ -84,7 +84,9 @@ struct tagActiveDS
TW_FIX32 defaultXResolution;
BOOL YResolutionSet;
TW_FIX32 defaultYResolution;
} activeDS DECLSPEC_HIDDEN;
};
extern struct tagActiveDS activeDS DECLSPEC_HIDDEN;
/* Helper functions */
extern TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) DECLSPEC_HIDDEN;

View File

@ -30,9 +30,27 @@
WINE_DEFAULT_DEBUG_CHANNEL(twain);
struct tagActiveDS activeDS;
DSMENTRYPROC SANE_dsmentry;
#ifdef SONAME_LIBSANE
#define MAKE_FUNCPTR(f) typeof(f) * p##f;
MAKE_FUNCPTR(sane_init)
MAKE_FUNCPTR(sane_exit)
MAKE_FUNCPTR(sane_get_devices)
MAKE_FUNCPTR(sane_open)
MAKE_FUNCPTR(sane_close)
MAKE_FUNCPTR(sane_get_option_descriptor)
MAKE_FUNCPTR(sane_control_option)
MAKE_FUNCPTR(sane_get_parameters)
MAKE_FUNCPTR(sane_start)
MAKE_FUNCPTR(sane_read)
MAKE_FUNCPTR(sane_cancel)
MAKE_FUNCPTR(sane_set_io_mode)
MAKE_FUNCPTR(sane_get_select_fd)
MAKE_FUNCPTR(sane_strstatus)
#undef MAKE_FUNCPTR
HINSTANCE SANE_instance;