2 #ifndef AMIGA_H_INCLUDED
3 #define AMIGA_H_INCLUDED
4 /*********************************************************************
6 * File : $Source: /cvsroot/ijbswa/current/amiga.h,v $
8 * Purpose : Amiga-specific declarations.
10 * Copyright : Written by and Copyright (C) 2001 members of the
11 * Privoxy team. http://www.privoxy.org/
13 * This program is free software; you can redistribute it
14 * and/or modify it under the terms of the GNU General
15 * Public License as published by the Free Software
16 * Foundation; either version 2 of the License, or (at
17 * your option) any later version.
19 * This program is distributed in the hope that it will
20 * be useful, but WITHOUT ANY WARRANTY; without even the
21 * implied warranty of MERCHANTABILITY or FITNESS FOR A
22 * PARTICULAR PURPOSE. See the GNU General Public
23 * License for more details.
25 * The GNU General Public License should be included with
26 * this file. If not, you can view it at
27 * http://www.gnu.org/copyleft/gpl.html
28 * or write to the Free Software Foundation, Inc., 59
29 * Temple Place - Suite 330, Boston, MA 02111-1307, USA.
31 *********************************************************************/
35 #include <sys/socket.h>
39 #define __NOGLOBALIFACE__
40 #include <proto/socket.h>
42 #undef __NOGLOBALIFACE__
44 #define __CONSTLIBBASEDECL__ const
45 #include <proto/exec.h>
46 #include <exec/tasks.h>
47 #include <proto/dos.h>
48 #include <dos/dostags.h>
53 struct SocketIFace *si;
61 #define ISocket (((struct UserData *)(FindTask(NULL)->tc_UserData))->si)
64 #define SocketBase ((struct Library *)(((struct UserData *)(FindTask(NULL)->tc_UserData))->sb))
66 #define errno (((struct UserData *)(FindTask(NULL)->tc_UserData))->eno)
67 #define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,NULL)
68 #define inet_ntoa(x) Inet_NtoA(x.s_addr)
71 extern struct Task *main_task;
74 void amiga_exit(void);
75 void __memCleanUp(void);
76 SAVEDS ULONG server_thread(void);
83 if(main_task == FindTask(NULL)) \
85 while(childs) Delay(10*TICKS_PER_SECOND); exit(x); \
91 struct Library *sb = ISocket->Data.LibBase; \
92 DropInterface((struct Interface *)ISocket); \
109 if(main_task == FindTask(NULL)) \
111 while(childs) Delay(10*TICKS_PER_SECOND); exit(x); \
115 CloseLibrary(SocketBase); \
129 #define timegm(tm) mktime(tm)
130 #endif /* __amigaos4__ */
135 #endif /* ndef AMIGA_H_INCLUDED */
136 #endif /* def AMIGA */