6 * SMB file system wrapper for AmigaOS, using the AmiTCP V3 API
8 * Copyright (C) 2000-2016 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
61 #define STDARGS __stdargs
67 #define REG(r,p) p __asm(#r)
68 #define INLINE __inline__
72 /****************************************************************************/
76 #endif /* VARARGS68K */
78 /*****************************************************************************/
80 #endif /* AMIGA_COMPILER_H */
82 /*****************************************************************************/
85 #define min(a,b) ((a) < (b) ? (a) : (b))
88 /****************************************************************************/
91 extern struct Library
* FAR AbsExecBase
;
94 #define AbsExecBase (*(struct Library **)4)
95 #endif /* AbsExecBase */
98 /****************************************************************************/
100 extern struct Library
* SocketBase
;
101 extern struct ExecBase
* SysBase
;
102 extern struct Library
* DOSBase
;
104 /****************************************************************************/
106 #if defined(__amigaos4__)
108 /****************************************************************************/
110 extern struct ExecIFace
* IExec
;
111 extern struct DOSIFace
* IDOS
;
112 extern struct SocketIFace
* ISocket
;
114 /****************************************************************************/
116 #endif /* __amigaos4__ */
118 /****************************************************************************/
124 /****************************************************************************/
126 extern int BroadcastNameQuery(char *name
, char *scope
, UBYTE
*address
);
127 extern LONG
CompareNames(STRPTR a
,STRPTR b
);
128 extern LONG
GetTimeZoneDelta(VOID
);
129 extern STRPTR
amitcp_strerror(int error
);
130 extern STRPTR
host_strerror(int error
);
131 extern time_t MakeTime(const struct tm
* const tm
);
132 extern ULONG
GetCurrentTime(VOID
);
133 extern VOID
GMTime(time_t seconds
,struct tm
* tm
);
135 #define ReportError(...) do { \
137 kprintf(__VA_ARGS__); \
138 kprintf("\n"); } while (0)
139 #define SPrintf(buf, ...) sprintf(buf, __VA_ARGS__)
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 */