https://gcc.gnu.org/gcc-10/porting_to.html#common
Signed-off-by: Michael Cronenworth mike@cchtml.com --- dlls/sane.ds/sane_i.h | 4 ++-- dlls/sane.ds/sane_main.c | 17 +++++++++++++++++ 2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/sane.ds/sane_i.h b/dlls/sane.ds/sane_i.h index 941e8b9e1b..d22b1b1723 100644 --- a/dlls/sane.ds/sane_i.h +++ b/dlls/sane.ds/sane_i.h @@ -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,7 @@ struct tagActiveDS TW_FIX32 defaultXResolution; BOOL YResolutionSet; TW_FIX32 defaultYResolution; -} activeDS DECLSPEC_HIDDEN; +} extern activeDS DECLSPEC_HIDDEN;
/* Helper functions */ extern TW_UINT16 SANE_SaneCapability (pTW_CAPABILITY pCapability, TW_UINT16 action) DECLSPEC_HIDDEN; diff --git a/dlls/sane.ds/sane_main.c b/dlls/sane.ds/sane_main.c index 7af0a2321a..cb9da8e875 100644 --- a/dlls/sane.ds/sane_main.c +++ b/dlls/sane.ds/sane_main.c @@ -33,8 +33,25 @@ WINE_DEFAULT_DEBUG_CHANNEL(twain); 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; +struct tagActiveDS activeDS;
static void *libsane_handle;