1 #ifndef OS_UNIX_SUPPORT_H
2 #define OS_UNIX_SUPPORT_H
5 Copyright © 1995-2003, The AROS Development Team. All rights reserved.
10 #include <arpa/inet.h>
13 typedef signed char BYTE
;
14 typedef unsigned char UBYTE
;
15 typedef signed short WORD
;
16 typedef unsigned short UWORD
;
17 typedef signed long LONG
;
18 typedef unsigned long ULONG
;
21 typedef unsigned char TEXT
;
22 typedef unsigned long IPTR
;
23 typedef unsigned long BPTR
;
32 struct DriveGeometry
{};
37 /* libraries/iffparse.h */
38 #define MAKE_ID(a,b,c,d) (((ULONG) (a)<<24) | ((ULONG) (b)<<16) | \
39 ((ULONG) (c)<<8) | ((ULONG) (d)))
42 #define ERROR_BUFFER_OVERFLOW 303
47 #define ERROR_UNKNOWN 100
48 #define ERROR_NO_FREE_STORE 103
49 #define ERROR_BAD_NUMBER 115
50 #define ERROR_OBJECT_IN_USE 202
51 #define ERROR_OBJECT_EXISTS 203
52 #define ERROR_OBJECT_NOT_FOUND 205
53 #define ERROR_OBJECT_WRONG_TYPE 212
54 #define ERROR_DISK_WRITE_PROTECTED 214
55 #define ERROR_DIRECTORY_NOT_EMPTY 216
56 #define ERROR_SEEK_ERROR 219
57 #define ERROR_COMMENT_TOO_BIG 220
58 #define ERROR_DISK_FULL 221
59 #define ERROR_DELETE_PROTECTED 222
60 #define ERROR_NOT_A_DOS_DISK 225
61 #define ERROR_NO_MORE_ENTRIES 232
62 #define LOCK_DIFFERENT -1
64 #define OFFSET_BEGINNING -1
65 #define OFFSET_CURRENT 0
68 #define FIBF_DELETE (1<<FIBB_DELETE)
69 #define MAXFILENAMELENGTH 108
70 #define MAXCOMMENTLENGTH 80
76 struct FileInfoBlock
{
78 LONG fib_DirEntryType
;
79 UBYTE fib_FileName
[MAXFILENAMELENGTH
];
84 struct DateStamp fib_Date
;
85 UBYTE fib_Comment
[MAXCOMMENTLENGTH
];
92 #define FIBF_DELETE (1<<FIBB_DELETE)
93 #define FIBF_WRITE (1<<FIBB_WRITE)
94 #define FIBF_READ (1<<FIBB_READ)
96 LONG id_NumSoftErrors
;
100 LONG id_NumBlocksUsed
;
101 LONG id_BytesPerBlock
;
106 #define ID_WRITE_PROTECTED 80
107 #define ID_VALIDATING 81
108 #define ID_VALIDATED 82
109 #define ID_DOS_DISK MAKE_ID('D','O','S',0)
110 #define ID_FFS_DISK MAKE_ID('D','O','S',1)
111 #define ID_INTER_DOS_DISK MAKE_ID('D','O','S',2)
112 #define ID_INTER_FFS_DISK MAKE_ID('D','O','S',3)
119 #define ED_PROTECTION 4
124 struct ExAllData
*ed_Next
;
136 struct ExAllControl
{
139 UBYTE
*eac_MatchString
;
140 struct Hook
*eac_MatchFunc
;
143 /* dos/dosextens.h */
150 #define ENDSTREAMCH -1
152 /* dos/filehandler.h */
158 IPTR de_SectorPerBlock
;
159 IPTR de_BlocksPerTrack
;
176 /* dos/filesystem.h */
177 #define FMF_LOCK (1L<<0)
178 #define FMF_WRITE (1L<<2)
179 #define FMF_READ (1L<<3)
180 #define FMF_CREATE (1L<<4)
181 #define FMF_CLEAR (1L<<5)
190 #define kprintf printf
192 /* (aros/macros.h) */
193 #define OS_BE2LONG ntohl
194 #define OS_LONG2BE htonl
196 /* (aros/machine.h) */
197 #define OS_PTRALIGN (sizeof(APTR))
200 APTR
AllocMem(ULONG
, ULONG
);
201 APTR
AllocVec(ULONG
, ULONG
);
202 void CopyMem(APTR
, APTR
, ULONG
);
203 void FreeMem(APTR
, ULONG
);
206 #define MEMF_PUBLIC (1L<<0)
207 #define MEMF_CLEAR (1L<<16)
210 struct DateStamp
*DateStamp(struct DateStamp
*);
211 STRPTR
PathPart(STRPTR
);
219 void *mediachangedata
;
223 #define IOHF_DISK_IN (1<<2)