#ifndef	ARCH_GENERIC_H
#define	ARCH_GENERIC_H

#ifndef	ARCH_H
#error	Master header is $(libv_root)/arch/arch.h; #include _it_ first !
#endif	/* ARCH_H */

/*
 * Enable/disable some features on the base of compilation flags
 */
#include "../fcheck.h"

/*
 * UNIX - specific defines and structures
 */
#define	ARCH_INVALID_FILE		-1
typedef int						arch_file_t;
typedef	unsigned				arch_file_off_t;

struct arch_dir_s
{
	/*
	 * POSIX - specific part
	 */
	DIR				*dir;
	struct dirent	*ent;
	char			dir_start[_MAX_PATH];
	u32_t			dir_start_len;
	/*
	 * Common part
	 */
	char			name[_MAX_PATH];	/* entry name */
	vboolean		is_dir;	/* == true if 'name' is a directory name */
	file_type_t		ftype;	/* meaningful only if 'name' is a file name */
};

#ifdef	ARCH_MAPPED_IO_SUPPORTED

struct arch_filemap_s
{
	void_p	base_addr;
	void_p	real_addr;
	arch_file_off_t	len;
};

#endif	/* ARCH_MAPPED_IO_SUPPORTED */

#endif /* ARCH_GENERIC_H */

