#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"

/*
 * Win32 - specific defines and structures
 */
#define	ARCH_INVALID_FILE		INVALID_HANDLE_VALUE
typedef HANDLE					arch_file_t;
typedef	unsigned				vsize_t;

struct arch_dir_s
{
	/*
	 * Win32 - specific part
	 */
	HANDLE			sh;
	WIN32_FIND_DATA	ffd;
	/*
	 * Common part
	 */
	char			*name;	/* 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;
	HANDLE	mapping_handle;
};

#endif	/* ARCH_MAPPED_IO_SUPPORTED */

/*
 * Extra functions
 */
void V_CALL	dos_name_to_unix_name(char *name,char *native);
void V_CALL	unix_name_to_dos_name(char *native,char *name);

#endif /* ARCH_GENERIC_H */

