source: trunk/include/smb_deps.h @ 157

Last change on this file since 157 was 157, checked in by tim, 14 years ago

reorganized data parsing in regfi

simplified some length validation

added big data support to reglookup-recover

fixed reglookup-recover's handling of data values in the offset

  • Property svn:keywords set to Id
File size: 2.2 KB
Line 
1/*
2 * This file contains miscellaneous pieces of code which regfio.c
3 * depends upon, from the Samba Subversion tree.  See:
4 *   http://websvn.samba.org/cgi-bin/viewcvs.cgi/trunk/source/
5 *
6 * Copyright (C) 2005,2009 Timothy D. Morgan
7 * Copyright (C) 1992-2005 Samba development team
8 *               (see individual files under Subversion for details.)
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; version 3 of the License.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
22 *
23 * $Id: smb_deps.h 157 2009-11-23 00:47:22Z tim $
24 */
25
26#ifndef _SMB_DEPS_H
27#define _SMB_DEPS_H
28
29#include <stdlib.h>
30#include <stdbool.h>
31#include <stdint.h>
32#include <stdio.h>
33#include <string.h>
34#include <errno.h>
35#include <fcntl.h>
36#include <sys/stat.h>
37#include <sys/types.h>
38#include <unistd.h>
39
40#include "byteorder.h"
41
42/* From includes.h */
43
44/* XXX: convert all code to use the more standard "*_t" types */
45#define uint8  uint8_t
46#define int16  int8_t
47#define uint16 uint16_t
48#define int32  int32_t
49#define uint32 uint32_t
50#define int64  int64_t
51#define uint64 uint64_t
52
53#define MIN(a,b) ((a)<(b)?(a):(b))
54#define MAX(a,b) ((a)>(b)?(a):(b))
55
56/* End of stuff from includes.h */
57
58/* From smb.h */
59
60typedef struct nttime_info
61{
62  uint32 low;
63  uint32 high;
64} NTTIME;
65
66/* End of stuff from smb.h */
67
68/* From lib/time.c */
69
70#define CHAR_BIT 8
71#define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \
72                    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
73#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
74#define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
75
76void unix_to_nt_time(NTTIME* nt, time_t t);
77time_t nt_time_to_unix(const NTTIME* nt);
78
79/* End of stuff from lib/time.c */
80
81#endif /* _SMB_DEPS_H */
Note: See TracBrowser for help on using the repository browser.