guard the private header
[reactos.git] / reactos / lib / crtdll / old cruft / io / write.c
1 /*
2 * COPYRIGHT: See COPYING in the top level directory
3 * PROJECT: ReactOS system libraries
4 * FILE: lib/crtdll/io/write.c
5 * PURPOSE: Writes to a file
6 * PROGRAMER: Boudewijn Dekker
7 * UPDATE HISTORY:
8 * 28/12/98: Created
9 */
10
11 #include <precomp.h>
12 #include <msvcrt/io.h>
13
14
15 /*
16 * @implemented
17 */
18 size_t _write(int _fd, const void *_buf, size_t _nbyte)
19 {
20 DWORD _wbyte;
21
22 if ( !WriteFile(_get_osfhandle(_fd),_buf,_nbyte,&_wbyte,NULL) )
23 {
24 return -1;
25 }
26 return (size_t)_wbyte;
27 }