1 #ifndef __WINE_MSVCRT_H
2 #define __WINE_MSVCRT_H
14 extern DWORD MSVCRT_tls_index;
16 typedef struct __MSVCRT_thread_data
19 unsigned long doserrno;
22 #define GET_THREAD_DATA(x) \
23 x = TlsGetValue(MSVCRT_tls_index)
24 #define GET_THREAD_VAR(x) \
25 ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x
26 #define GET_THREAD_VAR_PTR(x) \
27 (&((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x)
28 #define SET_THREAD_VAR(x,y) \
29 ((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y
31 extern int MSVCRT_current_lc_all_cp;
34 void MSVCRT__set_errno(int);
35 char* msvcrt_strndup(const char*,unsigned int);
36 LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
38 /* FIXME: This should be declared in new.h but it's not an extern "C" so
39 * it would not be much use anyway. Even for Winelib applications.
41 int MSVCRT__set_new_mode(int mode);
43 #endif /* __WINE_MSVCRT_H */