From 6bda240a5ac56a698fbe25bcf59e3afdf164ff69 Mon Sep 17 00:00:00 2001 From: notaz Date: Thu, 19 Mar 2015 20:24:14 +0200 Subject: [PATCH] more stuff for d1ui --- c_auto.h | 6 ++++++ run_imp.sh | 6 ++++-- stdc.hlist | 3 +++ stdc.list | 12 ++++++++---- 4 files changed, 21 insertions(+), 6 deletions(-) diff --git a/c_auto.h b/c_auto.h index 6beed14..279f335 100644 --- a/c_auto.h +++ b/c_auto.h @@ -43,3 +43,9 @@ typedef struct { #define PCVOID LPCVOID #define __VALIST __ms_va_list #endif + +static inline BOOL PtInRect_sa(LPCRECT r, int x, int y) +{ + POINT p = { x, y }; + return PtInRect(r, p); +} diff --git a/run_imp.sh b/run_imp.sh index aab9fd3..7c542be 100755 --- a/run_imp.sh +++ b/run_imp.sh @@ -1,5 +1,7 @@ #!/bin/sh +mingwb=i686-w64-mingw32 + target_s=$1 src_asm=$2 implist=${target_s}_implist @@ -23,9 +25,9 @@ cat $implist | while read i; do ;; esac - grep "\<_$si\>" /usr/i586-mingw32msvc/lib/lib* "$@" | awk '{print $3}' | \ + grep "\<_\?_$si\>" /usr/$mingwb/lib/lib* "$@" | awk '{print $3}' | \ while read f; do - sym=`i586-mingw32msvc-nm $f | grep "\<_$si\>" | grep ' T ' | awk '{print $3}'` + sym=`${mingwb}-nm $f | grep "\<_\?_$si\>" | grep ' T ' | awk '{print $3}'` if test -n "$sym"; then echo $sym > $tmpsym break diff --git a/stdc.hlist b/stdc.hlist index 83a5d25..fd6d14e 100644 --- a/stdc.hlist +++ b/stdc.hlist @@ -264,3 +264,6 @@ unsigned long __cdecl _beginthreadex (void *, unsigned int, unsigned int (__stdc // DECLSPEC_NORETURN void __cdecl _endthreadex (unsigned int); +void __cdecl _lock(int locknum); +void __cdecl _unlock(int locknum); +size_t __cdecl strncnt(const char*, size_t); diff --git a/stdc.list b/stdc.list index a3628f6..fafcf11 100644 --- a/stdc.list +++ b/stdc.list @@ -59,10 +59,6 @@ _fseek _fgetc __filbuf __mbsicmp -__beginthread -__endthread -__beginthreadex -__endthreadex __onexit _atexit __stricmp @@ -107,6 +103,14 @@ __controlfp # __ftol2 - todo _ceil +# msvcrt +__beginthread +__endthread +__beginthreadex +__endthreadex +__lock +__unlock + # not in mingw _memcpy_0 _siglookup -- 2.39.2