math.h: Remove non-AROS code, comment out non-implemented functions
[AROS.git] / rom / filesys / afs / os_aros_support.h
blobcabdec042bc51af1749f6c123975ecf663b1a4bc
1 #ifndef OS_AROS_H
2 #define OS_AROS_H
4 /*
5 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 $Id$
7 */
9 #include <aros/macros.h>
10 #include <aros/preprocessor/variadic/cast2iptr.hpp>
11 #include <devices/trackdisk.h>
12 #include <dos/dos.h>
13 #include <dos/dosextens.h>
14 #include <dos/exall.h>
15 #include <dos/filehandler.h>
16 #include <dos/stdio.h>
17 #include <exec/interrupts.h>
18 #include <exec/types.h>
19 #include <aros/debug.h>
20 #include <proto/dos.h>
22 #include "afshandler.h"
24 #define OS_BE2LONG AROS_BE2LONG
25 #define OS_LONG2BE AROS_LONG2BE
27 #define OS_PTRALIGN AROS_PTRALIGN
29 struct IOHandle {
30 STRPTR blockdevice;
31 ULONG unit;
32 ULONG flags;
33 struct MsgPort *mp;
34 struct IOExtTD *ioreq;
35 struct IOExtTD *iochangeint;
36 struct Interrupt mc_int;
37 struct Interrupt vbl_int;
38 struct AFSBase *afsbase; /* for interrupt code */
39 ULONG sectorsize;
40 ULONG ioflags;
41 UWORD cmdread;
42 UWORD cmdwrite;
43 UWORD cmdseek;
44 UWORD cmdformat;
47 #define IOHF_MOTOR_OFF (1<<0)
48 #define IOHF_MEDIA_CHANGE (1<<1)
49 #define IOHF_DISK_IN (1<<2)
51 enum showReqType;
53 LONG showPtrArgsText(struct AFSBase *afsbase, const char *string, enum showReqType type, IPTR *args);
54 LONG showErrorArgs(struct AFSBase *afsbase, IPTR *args);
56 #define showText(afsbase, ...) \
57 ({ \
58 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
59 ULONG ret = showPtrArgsText(afsbase, (STRPTR)args[0], Req_Cancel, &args[1]); \
60 ret; \
63 #define showRetriableError(afsbase, ...) \
64 ({ \
65 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
66 ULONG ret = showPtrArgsText(afsbase, (STRPTR)args[0], Req_RetryCancel, &args[1]); \
67 ret; \
70 #define showError(afsbase, ...) \
71 ({ \
72 IPTR args[] = { AROS_PP_VARIADIC_CAST2IPTR(__VA_ARGS__) }; \
73 ULONG ret = showErrorArgs(afsbase, args); \
74 ret; \
77 void checkDeviceFlags(struct AFSBase *);
78 void motorOff(struct AFSBase *afsbase, struct IOHandle *ioh);
80 #endif