2002-03-09 23:29:33 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2001 Jon Griffiths
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*/
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#ifndef __WINE_MSVCRT_H
|
|
|
|
#define __WINE_MSVCRT_H
|
|
|
|
|
2001-11-06 20:57:11 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#include "windef.h"
|
|
|
|
#include "winbase.h"
|
|
|
|
#include "winerror.h"
|
|
|
|
#include "winnls.h"
|
|
|
|
|
|
|
|
/* TLS data */
|
|
|
|
extern DWORD MSVCRT_tls_index;
|
|
|
|
|
|
|
|
typedef struct __MSVCRT_thread_data
|
|
|
|
{
|
|
|
|
int errno;
|
2001-07-18 21:04:23 +00:00
|
|
|
unsigned long doserrno;
|
2001-01-10 23:59:25 +00:00
|
|
|
} 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-07-23 23:50:18 +00:00
|
|
|
extern int MSVCRT_current_lc_all_cp;
|
|
|
|
|
|
|
|
void _purecall(void);
|
2001-04-10 23:25:25 +00:00
|
|
|
void MSVCRT__set_errno(int);
|
|
|
|
char* msvcrt_strndup(const char*,unsigned int);
|
|
|
|
LPWSTR msvcrt_wstrndup(LPCWSTR, unsigned int);
|
|
|
|
|
2002-05-31 23:06:46 +00:00
|
|
|
/* FIXME: This should be declared in new.h but it's not an extern "C" so
|
2001-04-10 23:25:25 +00:00
|
|
|
* it would not be much use anyway. Even for Winelib applications.
|
|
|
|
*/
|
|
|
|
int MSVCRT__set_new_mode(int mode);
|
2001-01-10 23:59:25 +00:00
|
|
|
|
2002-02-21 20:22:00 +00:00
|
|
|
/* Setup and teardown multi threaded locks */
|
|
|
|
void msvcrt_init_mt_locks(void);
|
|
|
|
void msvcrt_free_mt_locks(void);
|
|
|
|
|
2001-01-10 23:59:25 +00:00
|
|
|
#endif /* __WINE_MSVCRT_H */
|