X-Git-Url: http://www.privoxy.org/gitweb/?a=blobdiff_plain;f=amiga.c;h=df1ad8ca0815a0c61bc3f7d4a94b24710cad5675;hb=2548b4e9ade78bd5bf52baacd1bdc91a0bdbcdbc;hp=a9c2ce24baa6e5aaabc64242b7d83d433e0bc8e7;hpb=85e3775c14322cfbc78a4cca9b692516612c79e8;p=privoxy.git diff --git a/amiga.c b/amiga.c index a9c2ce24..df1ad8ca 100644 --- a/amiga.c +++ b/amiga.c @@ -1,4 +1,4 @@ -const char amiga_rcs[] = "$Id: amiga.c,v 1.2 2001/05/23 00:13:58 joergs Exp $"; +const char amiga_rcs[] = "$Id: amiga.c,v 1.4 2001/10/07 15:35:13 oes Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/amiga.c,v $ @@ -28,6 +28,12 @@ const char amiga_rcs[] = "$Id: amiga.c,v 1.2 2001/05/23 00:13:58 joergs Exp $"; * * Revisions : * $Log: amiga.c,v $ + * Revision 1.4 2001/10/07 15:35:13 oes + * Replaced 6 boolean members of csp with one bitmap (csp->flags) + * + * Revision 1.3 2001/09/12 22:54:51 joergs + * Stacksize of main thread increased. + * * Revision 1.2 2001/05/23 00:13:58 joergs * AmigaOS support fixed. * @@ -75,24 +81,27 @@ __saveds ULONG server_thread(void) Signal(main_task,SIGF_SINGLE); serve((struct client_state *) local_csp); } else { - local_csp->active = 0; + local_csp->flags &= ~CSP_FLAG_ACTIVE; Signal(main_task,SIGF_SINGLE); } CloseLibrary(SocketBase); } else { - local_csp->active = 0; + local_csp->flags &= ~CSP_FLAG_ACTIVE; Signal(main_task,SIGF_SINGLE); } childs--; return 0; } +static BPTR olddir; + void amiga_exit(void) { if(SocketBase) { CloseLibrary(SocketBase); } + CurrentDir(olddir); } static struct SignalSemaphore memsem; @@ -120,12 +129,13 @@ void InitAmiga(void) InitSemaphore(&memsem); memsemptr = &memsem; + olddir=CurrentDir(GetProgramDir()); atexit(amiga_exit); } #ifdef __GNUC__ #ifdef libnix -/* multitaskingsafe libnix replacements */ +/* multithreadingsafe libnix replacements */ static void *memPool=NULL; void *malloc (size_t s) @@ -234,7 +244,7 @@ ADD2EXIT(__memCleanUp,-50); #error No libnix and no ixemul!? #endif /* libnix */ #else -#error Only GCC is supported, multitasking safe malloc/free required. +#error Only GCC is supported, multithreading safe malloc/free required. #endif /* __GNUC__ */ #endif /* def AMIGA */