aboutsummaryrefslogtreecommitdiff
path: root/src/libparsec/include/sys_io.h
blob: 0d066ee92cdc88b4c98c941f10dde9f6948546fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 * PARSEC HEADER: sys_io.h
 */

#ifndef _SYS_IO_H_
#define _SYS_IO_H_


// include header containing I/O system calls ---------------------------------

#if defined(SYSTEM_COMPILER_GCC) || defined(SYSTEM_COMPILER_CLANG) || defined(SYSTEM_COMPILER_LLVM_GCC)

	//NOTE:
	// io.h need not be included (doesn't exist and
	// prototypes are declared elsewhere).

	//NOTE:
	// filelength() doesn't exist;
	// SYS_FILE::SYS_filelength() must not be used.

	#define filelength(x)	(PANIC(0),0)

#else // SYSTEM_COMPILER_GCC

	// simply include correct header
	#include <io.h>

	#ifndef SYSTEM_COMPILER_MSVC
		#include <direct.h>
	#endif

#endif // SYSTEM_COMPILER_GCC


#endif // _SYS_IO_H_