/*
 * Copyright (c) 2005-2006 Tom N Harris.
 *
 *     This program is free software; you can redistribute it and/or modify
 *     it under the terms of the GNU General Public License as published by
 *     the Free Software Foundation; either version 2 of the License, or
 *     (at your option) any later version.
 *
 *     A copy of the GNU General Public License can be found at
 *     http://www.gnu.org/
 *
 * Written by Tom N Harris <telliamed@whoopdedo.org>.
 *
 */

#include "win32.h"

#ifdef __cplusplus
extern "C" {
#endif

#pragma pack(push,1)
typedef struct _utime_s
{
	unsigned char flags;
	unsigned long mtime;
	unsigned long atime;
	unsigned long ctime;
} ut_struct;

typedef struct _utime_cid_s
{
	unsigned char flags;
	unsigned long mtime;
} ut_cid_struct;

typedef struct _nttime_s
{
	long __rsrv;
	unsigned short attr_tag;
	unsigned short attr_size;
	FILETIME mtime;
	FILETIME atime;
	FILETIME ctime;
} nt_time;

typedef struct _ntacl_s
{
	long sd_size;
	unsigned char vers;
	unsigned short method;
	unsigned long crc;
	char sd[];
} sd_struct;

typedef struct _ntacl_cid_s
{
	long sd_size;
} sd_cid_struct;
#pragma pack(pop)


unsigned long ft_to_dos(FILETIME const* ft);
void ft_from_dos(LPFILETIME ft, unsigned long dt);
unsigned long ft_to_unix(FILETIME const* ft);
void ft_from_unix(FILETIME* ft, unsigned long ut);
int zerr_to_win(int err);

#ifdef __cplusplus
}
#endif
