Module: wine Branch: master Commit: 4305e6d1195a46361d900e54f8aa0d0383321446 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4305e6d1195a46361d900e54f8...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Dec 11 21:13:20 2008 +0100
msvcrt: Use iob_func instead of p__iob on non-x86.
---
dlls/msvcr71/msvcr71.spec | 2 +- dlls/msvcrt/file.c | 4 ++-- dlls/msvcrt/main.c | 4 ++-- dlls/msvcrt/msvcrt.h | 2 +- dlls/msvcrt/msvcrt.spec | 4 ++-- dlls/msvcrt20/msvcrt20.spec | 2 +- dlls/msvcrt40/msvcrt40.spec | 2 +- dlls/msvcrtd/msvcrtd.spec | 2 +- include/msvcrt/stdio.h | 9 +++++++-- 9 files changed, 18 insertions(+), 13 deletions(-)
diff --git a/dlls/msvcr71/msvcr71.spec b/dlls/msvcr71/msvcr71.spec index 7fb298e..968e8b5 100644 --- a/dlls/msvcr71/msvcr71.spec +++ b/dlls/msvcr71/msvcr71.spec @@ -135,7 +135,7 @@ @ cdecl __p__environ() msvcrt.__p__environ @ cdecl __p__fileinfo() msvcrt.__p__fileinfo @ cdecl __p__fmode() msvcrt.__p__fmode -@ cdecl __p__iob() msvcrt.__p__iob +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob @ cdecl __p__mbcasemap() msvcrt.__p__mbcasemap @ cdecl __p__mbctype() msvcrt.__p__mbctype @ cdecl __p__osver() msvcrt.__p__osver diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 866cd65..888f90c 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -451,9 +451,9 @@ static void msvcrt_int_to_base32(int num, char *str) }
/********************************************************************* - * __p__iob(MSVCRT.@) + * __iob_func(MSVCRT.@) */ -MSVCRT_FILE * CDECL __p__iob(void) +MSVCRT_FILE * CDECL MSVCRT___iob_func(void) { return &MSVCRT__iob[0]; } diff --git a/dlls/msvcrt/main.c b/dlls/msvcrt/main.c index 598c2a4..96ad792 100644 --- a/dlls/msvcrt/main.c +++ b/dlls/msvcrt/main.c @@ -67,10 +67,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) { thread_data_t *tls;
- TRACE("(%p, %s, %p) pid(%x), tid(%x), tls(%ld)\n", + TRACE("(%p, %s, %p) pid(%x), tid(%x), tls(%u)\n", hinstDLL, msvcrt_get_reason(fdwReason), lpvReserved, GetCurrentProcessId(), GetCurrentThreadId(), - (long)msvcrt_tls_index); + msvcrt_tls_index);
switch (fdwReason) { diff --git a/dlls/msvcrt/msvcrt.h b/dlls/msvcrt/msvcrt.h index 92bd115..2b2934e 100644 --- a/dlls/msvcrt/msvcrt.h +++ b/dlls/msvcrt/msvcrt.h @@ -650,7 +650,7 @@ char* __cdecl MSVCRT_getenv(const char*); char* __cdecl MSVCRT_setlocale(int,const char*); int __cdecl MSVCRT_fclose(MSVCRT_FILE*); void __cdecl MSVCRT_terminate(void); -MSVCRT_FILE* __cdecl MSVCRT__p__iob(void); +MSVCRT_FILE* __cdecl MSVCRT__iob_func(void); MSVCRT_time_t __cdecl MSVCRT_mktime(struct MSVCRT_tm *t); struct MSVCRT_tm* __cdecl MSVCRT_localtime(const MSVCRT_time_t* secs); struct MSVCRT_tm* __cdecl MSVCRT_gmtime(const MSVCRT_time_t* secs); diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index 3104069..78ad88c 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -97,7 +97,7 @@ @ stub __get_app_type @ cdecl __getmainargs(ptr ptr ptr long ptr) @ extern __initenv MSVCRT___initenv -@ cdecl __iob_func() __p__iob +@ cdecl __iob_func() MSVCRT___iob_func @ cdecl __isascii(long) MSVCRT___isascii @ cdecl __iscsym(long) MSVCRT___iscsym @ cdecl __iscsymf(long) MSVCRT___iscsymf @@ -121,7 +121,7 @@ @ cdecl __p__environ() @ stub __p__fileinfo #() @ cdecl __p__fmode() -@ cdecl __p__iob() +@ cdecl -arch=i386 __p__iob() MSVCRT___iob_func @ stub __p__mbcasemap #() @ cdecl __p__mbctype() @ cdecl __p__osver() diff --git a/dlls/msvcrt20/msvcrt20.spec b/dlls/msvcrt20/msvcrt20.spec index 339cb1c..d7a0b55 100644 --- a/dlls/msvcrt20/msvcrt20.spec +++ b/dlls/msvcrt20/msvcrt20.spec @@ -483,7 +483,7 @@ @ cdecl __p__daylight() msvcrt.__p__daylight @ cdecl __p__environ() msvcrt.__p__environ @ cdecl __p__fmode() msvcrt.__p__fmode -@ cdecl __p__iob() msvcrt.__p__iob +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob @ cdecl __p__mbctype() msvcrt.__p__mbctype @ cdecl __p__osver() msvcrt.__p__osver @ cdecl __p__pctype() msvcrt.__p__pctype diff --git a/dlls/msvcrt40/msvcrt40.spec b/dlls/msvcrt40/msvcrt40.spec index e46b157..ff14676 100644 --- a/dlls/msvcrt40/msvcrt40.spec +++ b/dlls/msvcrt40/msvcrt40.spec @@ -532,7 +532,7 @@ @ cdecl __p__dstbias() msvcrt.__p__dstbias @ cdecl __p__environ() msvcrt.__p__environ @ cdecl __p__fmode() msvcrt.__p__fmode -@ cdecl __p__iob() msvcrt.__p__iob +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob @ cdecl __p__mbctype() msvcrt.__p__mbctype @ cdecl __p__osver() msvcrt.__p__osver @ cdecl __p__pctype() msvcrt.__p__pctype diff --git a/dlls/msvcrtd/msvcrtd.spec b/dlls/msvcrtd/msvcrtd.spec index ec1a4b7..d058922 100644 --- a/dlls/msvcrtd/msvcrtd.spec +++ b/dlls/msvcrtd/msvcrtd.spec @@ -136,7 +136,7 @@ @ cdecl __p__environ() msvcrt.__p__environ @ cdecl __p__fileinfo() msvcrt.__p__fileinfo @ cdecl __p__fmode() msvcrt.__p__fmode -@ cdecl __p__iob() msvcrt.__p__iob +@ cdecl -arch=i386 __p__iob() msvcrt.__p__iob @ cdecl __p__mbcasemap() msvcrt.__p__mbcasemap @ cdecl __p__mbctype() msvcrt.__p__mbctype @ cdecl __p__osver() msvcrt.__p__osver diff --git a/include/msvcrt/stdio.h b/include/msvcrt/stdio.h index 6a5ab65..36087a3 100644 --- a/include/msvcrt/stdio.h +++ b/include/msvcrt/stdio.h @@ -81,8 +81,13 @@ extern "C" { #endif
#ifndef _STDIO_DEFINED -FILE* __p__iob(void); -#define _iob (__p__iob()) +# ifdef _WIN64 /* __p__iob is not exported in Win64 */ +FILE* __iob_func(void); +# define _iob (__iob_func()) +# else +FILE* __p__iob(void); +# define _iob (__p__iob()) +# endif /* _WIN64 */ #endif /* _STDIO_DEFINED */
#define stdin (_iob+STDIN_FILENO)