From: joergs Date: Sun, 3 Mar 2002 09:18:03 +0000 (+0000) Subject: Made jumbjuster work on AmigaOS again. X-Git-Tag: v_2_9_12~229 X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=commitdiff_plain;h=7cadc7d4799218b7c62e48efec14729390039cc1 Made jumbjuster work on AmigaOS again. --- diff --git a/AUTHORS b/AUTHORS index 0fbe78ad..748c0cec 100644 --- a/AUTHORS +++ b/AUTHORS @@ -17,7 +17,7 @@ Current Project Contributors (in alphabetical order): Hal Burgiss (docs) Haroon Rafique John Venvertloh - Jorg Strohmayer + Joerg Strohmayer Rodney Stromlund Sarantis Paskalis Shamim Mohamed diff --git a/amiga.c b/amiga.c index e5223762..df1ad8ca 100644 --- a/amiga.c +++ b/amiga.c @@ -1,4 +1,4 @@ -const char amiga_rcs[] = "$Id: amiga.c,v 1.3 2001/09/12 22:54:51 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,9 @@ const char amiga_rcs[] = "$Id: amiga.c,v 1.3 2001/09/12 22:54:51 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. * @@ -90,12 +93,15 @@ __saveds ULONG server_thread(void) return 0; } +static BPTR olddir; + void amiga_exit(void) { if(SocketBase) { CloseLibrary(SocketBase); } + CurrentDir(olddir); } static struct SignalSemaphore memsem; @@ -123,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) @@ -237,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 */ diff --git a/amiga.h b/amiga.h index 2701923b..d9e3a5b7 100644 --- a/amiga.h +++ b/amiga.h @@ -1,7 +1,7 @@ #ifdef AMIGA #ifndef AMIGA_H_INCLUDED #define AMIGA_H_INCLUDED -#define AMIGA_H_VERSION "$Id: amiga.h,v 1.5 2001/07/29 18:43:08 jongfoster Exp $" +#define AMIGA_H_VERSION "$Id: amiga.h,v 1.6 2001/10/13 12:46:08 joergs Exp $" /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/amiga.h,v $ @@ -31,6 +31,9 @@ * * Revisions : * $Log: amiga.h,v $ + * Revision 1.6 2001/10/13 12:46:08 joergs + * Added #undef EINTR to avoid warnings + * * Revision 1.5 2001/07/29 18:43:08 jongfoster * Changing #ifdef _FILENAME_H to FILENAME_H_INCLUDED, to conform to * ANSI C rules. @@ -61,6 +64,7 @@ #undef __NOLIBBASE__ #define __CONSTLIBBASEDECL__ const +#define DEVICES_TIMER_H #include #include #include diff --git a/cgiedit.c b/cgiedit.c index ff653ca7..54c44ec1 100644 --- a/cgiedit.c +++ b/cgiedit.c @@ -1,4 +1,4 @@ -const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.10 2002/01/23 00:22:59 jongfoster Exp $"; +const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.11 2002/01/23 01:03:31 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/cgiedit.c,v $ @@ -42,6 +42,9 @@ const char cgiedit_rcs[] = "$Id: cgiedit.c,v 1.10 2002/01/23 00:22:59 jongfoster * * Revisions : * $Log: cgiedit.c,v $ + * Revision 1.11 2002/01/23 01:03:31 jongfoster + * Fixing gcc [CygWin] compiler warnings + * * Revision 1.10 2002/01/23 00:22:59 jongfoster * Adding new function cgi_edit_actions_section_swap(), to reorder * the actions file. @@ -700,7 +703,11 @@ jb_err edit_write_file(struct editable_file * file) assert(file); assert(file->filename); +#ifdef AMIGA + if (NULL == (fp = fopen(file->filename, "w"))) +#else if (NULL == (fp = fopen(file->filename, "wt"))) +#endif /* def AMIGA */ { return JB_ERR_FILE; } @@ -1527,7 +1534,11 @@ jb_err edit_read_file(struct client_state *csp, } } +#ifdef AMIGA + if (NULL == (fp = fopen(filename,"r"))) +#else if (NULL == (fp = fopen(filename,"rt"))) +#endif /* def AMIGA */ { free(filename); return JB_ERR_FILE; diff --git a/jcc.c b/jcc.c index 46c6db43..3ec42191 100644 --- a/jcc.c +++ b/jcc.c @@ -1,4 +1,4 @@ -const char jcc_rcs[] = "$Id: jcc.c,v 1.62 2002/02/20 23:17:23 jongfoster Exp $"; +const char jcc_rcs[] = "$Id: jcc.c,v 1.63 2002/03/02 04:14:50 david__schmidt Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/jcc.c,v $ @@ -33,6 +33,9 @@ const char jcc_rcs[] = "$Id: jcc.c,v 1.62 2002/02/20 23:17:23 jongfoster Exp $"; * * Revisions : * $Log: jcc.c,v $ + * Revision 1.63 2002/03/02 04:14:50 david__schmidt + * Clean up a little CRLF unpleasantness that suddenly appeared + * * Revision 1.62 2002/02/20 23:17:23 jongfoster * Detecting some out-of memory conditions and exiting with a log message. * @@ -522,7 +525,7 @@ static const char VANILLA_WAFER[] = "(copyright_or_otherwise)_applying_to_any_cookie._"; -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA) /********************************************************************* * * Function : SIG_handler @@ -1485,9 +1488,7 @@ int main(int argc, const char *argv[]) int argc_pos = 1; configfile = -#ifdef AMIGA - "AmiTCP:db/junkbuster/config" -#elif !defined(_WIN32) +#if !defined(_WIN32) "config" #else "config.txt" @@ -1564,7 +1565,7 @@ int main(int argc, const char *argv[]) #endif -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(_WIN32) && !defined(__OS2__) && !defined(AMIGA) { int sig; struct sigaction action; diff --git a/junkbuster.1 b/junkbuster.1 index aadd3b31..e2f7bc6f 100644 --- a/junkbuster.1 +++ b/junkbuster.1 @@ -21,9 +21,7 @@ Proxy .P If the configuration file is not specified on the command line, \fBJunkbuster\fP will look for a file named \fIconfig\fP in the -current directory (except on Amiga where it will look for -\fIAmiTCP:db/junkbuster/config\fP and Win32 where it will try -\fIconfig.txt\fP). +current directory (except on Win32 where it will try \fIconfig.txt\fP). .SH DESCRIPTION @@ -76,7 +74,7 @@ All \fBJunkbuster\fP configuration is done via the various configuration files. The default configuration files are: \fIconfig\fP, \fIijb.action\fP, and \fIre_filterfile\fP. These are well commented. On Unix and Unix-like systems, these are located in \fI/etc/junkbuster/\fP -by default. On Windows and OS/2, these files are in the same directory +by default. On Windows, OS/2 and AmigaOS, these files are in the same directory as the \fBJunkbuster\fP executable. .P The name and number of configuration files has changed from previous versions, @@ -263,7 +261,7 @@ http://linuxalpha.ch/packages/ .br Haroon Rafique .br - Jorg Strohmayer + Joerg Strohmayer .br Shamim Mohamed .br diff --git a/miscutil.c b/miscutil.c index a9718668..3a087144 100644 --- a/miscutil.c +++ b/miscutil.c @@ -1,4 +1,4 @@ -const char miscutil_rcs[] = "$Id: miscutil.c,v 1.26 2001/12/30 14:07:32 steudten Exp $"; +const char miscutil_rcs[] = "$Id: miscutil.c,v 1.27 2002/01/21 00:52:32 jongfoster Exp $"; /********************************************************************* * * File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $ @@ -36,6 +36,9 @@ const char miscutil_rcs[] = "$Id: miscutil.c,v 1.26 2001/12/30 14:07:32 steudten * * Revisions : * $Log: miscutil.c,v $ + * Revision 1.27 2002/01/21 00:52:32 jongfoster + * Adding string_join() + * * Revision 1.26 2001/12/30 14:07:32 steudten * - Add signal handling (unix) * - Add SIGHUP handler (unix) @@ -832,7 +835,21 @@ char * make_path(const char * dir, const char * file) if(dir) { - strncpy(path,dir,512); + if(dir[0] == '.') + { + if(dir[1] == '/') + { + strncpy(path,dir+2,512); + } + else + { + strncpy(path,dir+1,512); + } + } + else + { + strncpy(path,dir,512); + } path[511]=0; } else { path[0]=0;