blob: 8ce947a16a31184d4f7c94528af385bf191ecb51 [file] [log] [blame]
Howard Hinnant3c78ca02011-09-22 19:10:18 +00001// -*- C++ -*-
Howard Hinnant34388892011-09-28 21:39:20 +00002//===----------------------- support/win32/support.h ----------------------===//
Howard Hinnant3c78ca02011-09-22 19:10:18 +00003//
4// The LLVM Compiler Infrastructure
5//
6// This file is dual licensed under the MIT and the University of Illinois Open
7// Source Licenses. See LICENSE.TXT for details.
8//
9//===----------------------------------------------------------------------===//
10
Howard Hinnant34388892011-09-28 21:39:20 +000011#ifndef _LIBCPP_SUPPORT_WIN32_SUPPORT_H
12#define _LIBCPP_SUPPORT_WIN32_SUPPORT_H
13
Howard Hinnant3c78ca02011-09-22 19:10:18 +000014/*
15 Functions and constants used in libc++ that are missing from the Windows C library.
16 */
17
Howard Hinnant34388892011-09-28 21:39:20 +000018#include <wchar.h> // mbstate_t
19#include <stdio.h> // _snwprintf
20#define swprintf _snwprintf
21#define vswprintf _vsnwprintf
22
Howard Hinnant3c78ca02011-09-22 19:10:18 +000023int vasprintf( char **sptr, const char *__restrict__ fmt , va_list ap );
Howard Hinnant34388892011-09-28 21:39:20 +000024int asprintf(char **sptr, const char *__restrict__ fmt, ...);
25
Howard Hinnantdbe81112011-09-23 16:11:27 +000026size_t mbsnrtowcs( wchar_t *__restrict__ dst, const char **__restrict__ src,
27 size_t nmc, size_t len, mbstate_t *__restrict__ ps );
28size_t wcsnrtombs( char *__restrict__ dst, const wchar_t **__restrict__ src,
29 size_t nwc, size_t len, mbstate_t *__restrict__ ps );
Howard Hinnant34388892011-09-28 21:39:20 +000030
31#endif // _LIBCPP_SUPPORT_WIN32_SUPPORT_H