/* * This file contains miscellaneous pieces of code which regfio.c * depends upon, from the Samba Subversion tree. See: * http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/ * * Copyright (C) 2005,2009 Timothy D. Morgan * Copyright (C) 1992-2005 Samba development team * (see individual files under Subversion for details.) * * 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; version 3 of the License. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Id: smb_deps.h 157 2009-11-23 00:47:22Z tim $ */ #ifndef _SMB_DEPS_H #define _SMB_DEPS_H #include #include #include #include #include #include #include #include #include #include #include "byteorder.h" /* From includes.h */ /* XXX: convert all code to use the more standard "*_t" types */ #define uint8 uint8_t #define int16 int8_t #define uint16 uint16_t #define int32 int32_t #define uint32 uint32_t #define int64 int64_t #define uint64 uint64_t #define MIN(a,b) ((a)<(b)?(a):(b)) #define MAX(a,b) ((a)>(b)?(a):(b)) /* End of stuff from includes.h */ /* From smb.h */ typedef struct nttime_info { uint32 low; uint32 high; } NTTIME; /* End of stuff from smb.h */ /* From lib/time.c */ #define CHAR_BIT 8 #define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \ : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) #define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) #define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60)) void unix_to_nt_time(NTTIME* nt, time_t t); time_t nt_time_to_unix(const NTTIME* nt); /* End of stuff from lib/time.c */ #endif /* _SMB_DEPS_H */