• Zebediah Figura's avatar
    makedep: Do not forbid importing system headers in msvcrt modules. · 9951f2f4
    Zebediah Figura authored
    The apparent intention of catching mistakes early is laudable. However, the
    number of exceptions both in the code and not in the code (in particular,
    valgrind.h) shows that this is clearly getting in the way more often than not.
    
    In practice an attempt to compile with a system API we don't support will be met
    with a clear error at link time, e.g.:
    
    /usr/bin/x86_64-w64-mingw32-ld: dlls/xmllite/reader.cross.o: in function `debugstr_nodetype':
    /home/whatsit/git/wine64/../wine/dlls/xmllite/reader.c:116: undefined reference to `pthread_once'
    
    And when there is no external function involved (as with stdarg.h, x86intrin.h,
    valgrind.h), there's no reason to prevent use of the headers.
    
    The motivation for this patch is the ability to import system vkd3d.h in e.g.
    d3d12 and dxgi, which do not link to libvkd3d directly (but rather indirectly
    through wined3d) and so do not fall under the has_external_import() exception. I
    could see no simple way to adapt has_external_import() to account for this case.
    Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    9951f2f4
makedep.c 149 KB