2001-01-11 00:59:25 +01:00
|
|
|
#ifndef __WINE_MSVCRT_H
|
|
|
|
#define __WINE_MSVCRT_H
|
|
|
|
|
|
|
|
#include "config.h"
|
|
|
|
#include "windef.h"
|
|
|
|
#include "debugtools.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
#include "winnls.h"
|
|
|
|
#include <stdarg.h>
|
2001-01-22 03:17:29 +01:00
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
2001-01-11 00:59:25 +01:00
|
|
|
|
|
|
|
/* TLS data */
|
|
|
|
extern DWORD MSVCRT_tls_index;
|
|
|
|
|
|
|
|
typedef struct __MSVCRT_thread_data
|
|
|
|
{
|
|
|
|
int errno;
|
|
|
|
int doserrno;
|
|
|
|
} MSVCRT_thread_data;
|
|
|
|
|
|
|
|
#define GET_THREAD_DATA(x) \
|
|
|
|
x = TlsGetValue(MSVCRT_tls_index)
|
|
|
|
#define GET_THREAD_VAR(x) \
|
|
|
|
((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x
|
|
|
|
#define GET_THREAD_VAR_PTR(x) \
|
|
|
|
(&((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x)
|
|
|
|
#define SET_THREAD_VAR(x,y) \
|
|
|
|
((MSVCRT_thread_data*)TlsGetValue(MSVCRT_tls_index))->x = y
|
|
|
|
|
2001-04-11 01:25:25 +02:00
|
|
|
void MSVCRT__set_errno(int);
|
|
|
|
char* msvcrt_strndup(const char*,unsigned int);
|
|
|
|
LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
|
|
|
|
|
|
|
|
/* FIXME: This should be declared in new.h but it's not an extern "C" so
|
|
|
|
* it would not be much use anyway. Even for Winelib applications.
|
|
|
|
*/
|
|
|
|
int MSVCRT__set_new_mode(int mode);
|
2001-01-11 00:59:25 +01:00
|
|
|
|
|
|
|
#endif /* __WINE_MSVCRT_H */
|