6 * SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
8 * Copyright (C) 2000-2009 by Olaf `Olsen' Barthel <obarthel -at- gmx -dot- net>
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; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 /****************************************************************************/
30 #ifndef _SYSTEM_HEADERS_H
31 #include "system_headers.h"
32 #endif /* _SYSTEM_HEADERS_H */
36 #endif /* _ASSERT_H */
38 /****************************************************************************/
44 /****************************************************************************/
47 #define ZERO ((BPTR)NULL)
50 /****************************************************************************/
52 #ifndef AMIGA_COMPILER_H
54 /****************************************************************************/
59 #define REG(r,p) register __##r p
60 #define INLINE __inline
66 #define REG(r,p) p __asm(#r)
67 #define INLINE __inline__
70 /****************************************************************************/
74 #endif /* VARARGS68K */
76 /*****************************************************************************/
78 #endif /* AMIGA_COMPILER_H */
80 /*****************************************************************************/
83 #define min(a,b) ((a) < (b) ? (a) : (b))
86 /****************************************************************************/
89 extern struct Library
* FAR AbsExecBase
;
92 #define AbsExecBase (*(struct Library **)4)
93 #endif /* AbsExecBase */
96 /****************************************************************************/
98 extern struct Library
* SocketBase
;
99 extern struct ExecBase
* SysBase
;
100 extern struct Library
* DOSBase
;
102 /****************************************************************************/
104 #if defined(__amigaos4__)
106 /****************************************************************************/
108 extern struct ExecIFace
* IExec
;
109 extern struct DOSIFace
* IDOS
;
110 extern struct SocketIFace
* ISocket
;
112 /****************************************************************************/
114 #endif /* __amigaos4__ */
116 /****************************************************************************/
122 /****************************************************************************/
124 extern int BroadcastNameQuery(char *name
, char *scope
, UBYTE
*address
);
125 extern LONG
CompareNames(STRPTR a
,STRPTR b
);
126 extern LONG
GetTimeZoneDelta(VOID
);
127 extern STRPTR
amitcp_strerror(int error
);
128 extern STRPTR
host_strerror(int error
);
129 extern time_t MakeTime(const struct tm
* const tm
);
130 extern ULONG
GetCurrentTime(VOID
);
131 extern VOID
GMTime(time_t seconds
,struct tm
* tm
);
133 #define ReportError(...) do { \
135 kprintf(__VA_ARGS__); \
136 kprintf("\n"); } while (0)
137 #define SPrintf(buf, fmt, ...) do { \
138 IPTR vargs[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
139 VSPrintf(buf, fmt, vargs); } while (0)
141 extern VOID VARARGS68K
ReportError(STRPTR fmt
,...);
142 extern VOID VARARGS68K
SPrintf(STRPTR buffer
, STRPTR formatString
,...);
144 extern VOID
StringToUpper(STRPTR s
);
146 /****************************************************************************/
148 size_t strlcpy(char *dst
, const char *src
, size_t siz
);
149 size_t strlcat(char *dst
, const char *src
, size_t siz
);
151 /****************************************************************************/
153 extern void smb_encrypt(unsigned char *passwd
, unsigned char *c8
, unsigned char *p24
);
154 extern void smb_nt_encrypt(unsigned char *passwd
, unsigned char *c8
, unsigned char *p24
);
156 /****************************************************************************/
158 extern VOID
FreeMemory(APTR address
);
159 extern APTR
AllocateMemory(ULONG size
);
161 #define malloc(s) AllocateMemory(s)
162 #define free(m) FreeMemory(m)
164 /****************************************************************************/
167 #define memcpy(to,from,size) ((void)CopyMem((APTR)(from),(APTR)(to),(ULONG)(size)))
169 /****************************************************************************/
171 #endif /* _SMBFS_H */