source: releases/0.11.0/include/smb_deps.h @ 191

Last change on this file since 191 was 134, checked in by tim, 16 years ago

rewrote winsec library, stripping out Samba dependencies

eliminated remaining Samba prs functions

added support for 'li' subkey list records

  • 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 134 2009-01-16 18:36:04Z 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#define DEBUG(lvl,body) 0
43
44void* zalloc(size_t size);
45void* zcalloc(size_t size, unsigned int count);
46
47/* From includes.h */
48
49#define uint8  uint8_t
50#define int16  int8_t
51#define uint16 uint16_t
52#define int32  int32_t
53#define uint32 uint32_t
54
55#define MIN(a,b) ((a)<(b)?(a):(b))
56#define MAX(a,b) ((a)>(b)?(a):(b))
57
58extern int DEBUGLEVEL;
59
60/* End of stuff from includes.h */
61
62/* From smb.h */
63
64typedef struct nttime_info
65{
66  uint32 low;
67  uint32 high;
68} NTTIME;
69
70/* End of stuff from smb.h */
71
72/* From lib/time.c */
73
74#define CHAR_BIT 8
75#define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \
76                    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
77#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
78#define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
79
80void unix_to_nt_time(NTTIME* nt, time_t t);
81time_t nt_time_to_unix(const NTTIME* nt);
82
83/* End of stuff from lib/time.c */
84
85#endif /* _SMB_DEPS_H */
Note: See TracBrowser for help on using the repository browser.