msvcFcntl.h 1.6 KB
Newer Older
1
/*****************************************************************************\
S
Shengliang Guan 已提交
2 3 4 5 6 7 8 9 10 11
*                                                                             *
*   Filename:	    fcntl.h						      *
*                                                                             *
*   Description:    MsvcLibX extensions to fcntl.h.			      *
*                                                                             *
*   Notes:	    							      *
*                                                                             *
*   History:								      *
*    2017-02-16 JFL Created this file.                                        *
*									      *
12
*         Copyright 2017 Hewlett Packard Enterprise Development LP          *
S
Shengliang Guan 已提交
13 14 15 16 17 18 19 20
* Licensed under the Apache 2.0 license - www.apache.org/licenses/LICENSE-2.0 *
\*****************************************************************************/

#ifndef	_MSVCLIBX_FCNTL_H
#define	_MSVCLIBX_FCNTL_H	1

#include "msvclibx.h"

S
TD-1057  
Shengliang Guan 已提交
21
#include <fcntl.h> /* Include MSVC's own <fcntl.h> file */
S
Shengliang Guan 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40

/* Microsoft defines _open() in io.h */
#include <io.h>

#if defined(_MSDOS)
#define open _open
#endif

#if defined(_WIN32)
extern int openA(const char *, int, ...); /* MsvcLibX ANSI version of open */
extern int openU(const char *, int, ...); /* MsvcLibX UTF-8 version of open */
#if defined(_UTF8_SOURCE) || defined(_BSD_SOURCE) || defined(_GNU_SOURCE)
#define open openU
#else /* _ANSI_SOURCE */
#define open openA
#endif /* defined(_UTF8_SOURCE) */
#endif /* defined(_WIN32) */

#endif /* defined(_MSVCLIBX_FCNTL_H)  */