ReactOS  0.4.15-dev-1184-g23e04ae
niwrite.c File Reference
#include "schilyio.h"
Include dependency graph for niwrite.c:

Go to the source code of this file.

Functions

EXPORT ssize_t _niwrite (int f, void *buf, size_t count)
 

Function Documentation

◆ _niwrite()

EXPORT ssize_t _niwrite ( int  f,
void buf,
size_t  count 
)

Definition at line 22 of file niwrite.c.

26 {
27  ssize_t ret;
28  int oerrno = geterrno();
29 
30  if ((ret = (ssize_t)count) < 0) {
32  return ((ssize_t)-1);
33  }
34  while ((ret = write(f, buf, count)) < 0 && geterrno() == EINTR) {
35  /*
36  * Set back old 'errno' so we don't change the errno visible
37  * to the outside if we did not fail.
38  */
39  seterrno(oerrno);
40  }
41  return (ret);
42 }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
Definition: arc.h:39
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define EINTR
Definition: acclib.h:80
#define write
Definition: acwin.h:97
GLfloat f
Definition: glext.h:7540
EXPORT int seterrno(int err)
Definition: seterrno.c:34
EXPORT int geterrno()
Definition: geterrno.c:34
int ret
int ssize_t
Definition: rosdhcp.h:48

Referenced by filewrite().