stash
[wine/wine64.git] / dlls / msvcirt / msvcirt.c
blob6178aca0508b4948096c2e0b42c9ba8fc5b5e067
1 /*
2 * Copyright (C) 2007 Alexandre Julliard
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 #include "config.h"
20 #include "wine/port.h"
22 #include <stdarg.h>
24 #include "windef.h"
25 #include "winbase.h"
26 #include "wine/debug.h"
28 WINE_DEFAULT_DEBUG_CHANNEL(msvcirt);
30 typedef struct {
31 LPVOID VTable;
32 } class_ostream;
34 #ifdef __i386__ /* thiscall functions are i386-specific */
36 #define THISCALL(func) __thiscall_ ## func
37 #define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
38 #define DEFINE_THISCALL_WRAPPER(func) \
39 extern void THISCALL(func)(); \
40 __ASM_GLOBAL_FUNC(__thiscall_ ## func, \
41 "popl %eax\n\t" \
42 "pushl %ecx\n\t" \
43 "pushl %eax\n\t" \
44 "jmp " __ASM_NAME(#func) )
45 #else /* __i386__ */
47 #define THISCALL(func) func
48 #define THISCALL_NAME(func) __ASM_NAME(#func)
49 #define DEFINE_THISCALL_WRAPPER(func) /* nothing */
51 #endif /* __i386__ */
53 /******************************************************************
54 * ??6ostream@@QAEAAV0@H@Z (MSVCRTI.@)
55 * class ostream & __thiscall ostream::operator<<(int)
57 DEFINE_THISCALL_WRAPPER(MSVCIRT_operator_sl_int)
58 void * __stdcall MSVCIRT_operator_sl_int(class_ostream * _this, int integer)
60 FIXME("(%p)->(%d) stub\n", _this, integer);
61 return _this;
64 /******************************************************************
65 * ??6ostream@@QAEAAV0@PBD@Z (MSVCRTI.@)
66 * class ostream & __thiscall ostream::operator<<(char const *)
68 DEFINE_THISCALL_WRAPPER(MSVCIRT_operator_sl_pchar)
69 void * __stdcall MSVCIRT_operator_sl_pchar(class_ostream * _this, const char * string)
71 FIXME("(%p)->(%s) stub\n", _this, string);
72 return _this;
75 /******************************************************************
76 * ?endl@@YAAAVostream@@AAV1@@Z (MSVCRTI.@)
77 * class ostream & __cdecl endl(class ostream &)
79 void * CDECL MSVCIRT_endl(class_ostream * _this)
81 FIXME("(%p)->() stub\n", _this);
82 return _this;
85 BOOL WINAPI DllMain( HINSTANCE inst, DWORD reason, LPVOID reserved )
87 switch (reason)
89 case DLL_WINE_PREATTACH:
90 return FALSE; /* prefer native version */
91 case DLL_PROCESS_ATTACH:
92 DisableThreadLibraryCalls( inst );
93 break;
95 return TRUE;