headers: Fix compile warning: FindResource redefined

Warning is:

    In file included from mingw-w64-headers/include/windows.h:70,
                     from libsrc/dxerr.c:15,
                     from libsrc/dxerr8w.c:20:
    mingw-w64-headers/include/winbase.h:2171: warning: "FindResource" redefined
     #define FindResource __MINGW_NAME_AW(FindResource)

    In file included from mingw-w64-headers/include/winbase.h:24,
                     from mingw-w64-headers/include/windows.h:70,
                     from libsrc/dxerr.c:15,
                     from libsrc/dxerr8w.c:20:
    mingw-w64-headers/include/libloaderapi.h:62: note: this is the location of the previous definition
     #define FindResource FindResourceW

Fix it by conditionally defining FindResource in winbase.h directly as
FindResourceA for non-UNICODE builds and let libloaderapi.h to define
FindResource as FindResourceW for UNICODE builds.

Signed-off-by: LIU Hao <lh_mouse@126.com>
1 file changed