ReactOS  0.4.14-dev-77-gd9e7c48
reactos_support_code.c
Go to the documentation of this file.
1 #include "reactos_support_code.h"
2 
3 void
4 isohybrid_error(int eval, const char* fmt, ...)
5 {
6  va_list ap;
7  va_start(ap, fmt);
8  fprintf(stderr, "isohybrid: ");
10  va_end(ap);
11  exit(eval);
12 }
13 
14 void
15 isohybrid_warning(const char *fmt, ...)
16 {
17  va_list ap;
18  va_start(ap, fmt);
19  fprintf(stderr, "isohybrid: ");
20  vfprintf(stderr, fmt, ap);
21  va_end(ap);
22 }
23 
24 #ifdef _WIN32
25 int
26 fsync(int fd)
27 {
30  return 1;
31 
32  return !FlushFileBuffers(hFile);
33 }
34 
35 int
36 getppid(void)
37 {
38  // Just return any nonzero value under Windows to enable isohybrid's usage
39  // as a part of srand initialization.
40  return 1;
41 }
42 #endif
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
static int fd
Definition: io.c:51
_CRTIMP intptr_t __cdecl _get_osfhandle(_In_ int _FileHandle)
#define va_end(ap)
Definition: acmsvcex.h:90
_Check_return_opt_ _CRTIMP int __cdecl fprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format,...)
char * va_list
Definition: acmsvcex.h:78
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
Definition: fileinfo.c:175
PVOID HANDLE
Definition: typedefs.h:71
void isohybrid_warning(const char *fmt,...)
_In_ HANDLE hFile
Definition: mswsock.h:90
#define va_start(ap, A)
Definition: acmsvcex.h:91
void int int ULONGLONG int va_list * ap
Definition: winesup.h:32
FILE * stderr
void exit(int exitcode)
Definition: _exit.c:33
_Check_return_opt_ _CRTIMP int __cdecl vfprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: dsound.c:943
void isohybrid_error(int eval, const char *fmt,...)