diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/Configuration apache_1.3b3_amiga/src/Configuration *** apache_1.3b3/src/Configuration Wed Nov 19 19:49:57 1997 --- apache_1.3b3_amiga/src/Configuration Thu Nov 27 21:21:00 1997 *************** *** 42,46 **** # the C compiler, looking for gcc first, then cc. # ! EXTRA_CFLAGS= EXTRA_LDFLAGS= EXTRA_LIBS= --- 42,46 ---- # the C compiler, looking for gcc first, then cc. # ! EXTRA_CFLAGS= -Dfork=ix_vfork -DSERVER_SUBVERSION=\"Amiga\" EXTRA_LDFLAGS= EXTRA_LIBS= *************** *** 116,120 **** # by OS specifics ! Rule WANTHSREGEX=default ################################################################ --- 116,120 ---- # by OS specifics ! Rule WANTHSREGEX=no ################################################################ *************** *** 182,191 **** ## full status information. Check conf/access.conf on how to enable this. ! # AddModule modules/standard/mod_status.o ## The Info module displays configuration information for the server and ## all included modules. It's very useful for debugging. ! # AddModule modules/standard/mod_info.o ## mod_include translates server-side include (SSI) statements in text files. --- 182,191 ---- ## full status information. Check conf/access.conf on how to enable this. ! AddModule modules/standard/mod_status.o ## The Info module displays configuration information for the server and ## all included modules. It's very useful for debugging. ! AddModule modules/standard/mod_info.o ## mod_include translates server-side include (SSI) statements in text files. *************** *** 252,256 **** ## password authentication. ! # AddModule modules/standard/mod_auth_anon.o ## db_auth and dbm_auth work with Berkeley DB files - make sure there --- 252,256 ---- ## password authentication. ! AddModule modules/standard/mod_auth_anon.o ## db_auth and dbm_auth work with Berkeley DB files - make sure there *************** *** 277,286 **** ## as a function of access time or modification time. ! # AddModule modules/standard/mod_expires.o ## The headers module can set arbitrary HTTP response headers, ## as configured in server, vhost, access.conf or .htaccess configs ! # AddModule modules/standard/mod_headers.o ## Miscellaneous modules --- 277,286 ---- ## as a function of access time or modification time. ! AddModule modules/standard/mod_expires.o ## The headers module can set arbitrary HTTP response headers, ## as configured in server, vhost, access.conf or .htaccess configs ! AddModule modules/standard/mod_headers.o ## Miscellaneous modules diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/Configure apache_1.3b3_amiga/src/Configure *** apache_1.3b3/src/Configure Sat Nov 15 14:04:47 1997 --- apache_1.3b3_amiga/src/Configure Thu Nov 27 21:17:04 1997 *************** *** 78,94 **** # we bail out # ! if egrep -v '^%?Module[ ]+[A-Za-z0-9_]+[ ]+[^ ]+$' $tmpfile \ ! | egrep -v '^%?AddModule[ ]+[^ ]+$' \ ! | grep -v = > /dev/null ! then ! echo "Syntax error --- The configuration file is used only to" ! echo "define the list of included modules or to set Makefile" ! echo "options or Configure rules, and I don't see that at all:" ! egrep -v '^%?Module[ ]+[A-Za-z0-9_]+[ ]+[^ ]+$' $tmpfile \ ! | egrep -v '^%?AddModule[ ]+[^ ]+$' \ ! | grep -v = ! exitcode=1 ! exit 1 ! fi # --- 78,94 ---- # we bail out # ! #if egrep -v '^%?Module[ ]+[A-Za-z0-9_]+[ ]+[^ ]+$' $tmpfile \ ! # | egrep -v '^%?AddModule[ ]+[^ ]+$' \ ! # | grep -v = > /dev/null ! #then ! # echo "Syntax error --- The configuration file is used only to" ! # echo "define the list of included modules or to set Makefile" ! # echo "options or Configure rules, and I don't see that at all:" ! # egrep -v '^%?Module[ ]+[A-Za-z0-9_]+[ ]+[^ ]+$' $tmpfile \ ! # | egrep -v '^%?AddModule[ ]+[^ ]+$' \ ! # | grep -v = ! # exitcode=1 ! # exit 1 ! #fi # *************** *** 189,193 **** SHELL="/bin/sh" ! OSDIR="os/unix" case "$PLAT" in --- 189,193 ---- SHELL="/bin/sh" ! OSDIR="os/amiga" case "$PLAT" in *************** *** 211,214 **** --- 211,220 ---- DEF_WANTHSREGEX=no ;; + *-*-AmigaOS*) + OS='amigaos' + CFLAGS="$CFLAGS -m68020 -resident -mstackextend -g" + LFLAGS="$LFLAGS -m68020 -resident -g" + DEF_WANTSHREGEX=no + ;; i386-ibm-aix*) OS='IBM AIX PS/2' *************** *** 544,549 **** echo uname -v uname -v - echo uname -X - uname -X echo Ideally, read the file PORTING, do what it says, and send the echo resulting patches to The Apache Group by filling out a report --- 550,553 ---- diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/buildmark.c apache_1.3b3_amiga/src/buildmark.c *** apache_1.3b3/src/buildmark.c Thu Nov 13 17:25:44 1997 --- apache_1.3b3_amiga/src/buildmark.c Tue Dec 2 21:58:04 1997 *************** *** 1,5 **** --- 1,9 ---- #if defined(__DATE__) && defined(__TIME__) + #ifdef AMIGA + const char version[] = "$VER: Apache 1.3b1 " __DATE__ " " __TIME__ ; + #endif const char SERVER_BUILT[] = __DATE__ " " __TIME__; #else const char SERVER_BUILT[] = "unknown"; #endif + diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/alloc.c apache_1.3b3_amiga/src/main/alloc.c *** apache_1.3b3/src/main/alloc.c Wed Nov 12 18:22:05 1997 --- apache_1.3b3_amiga/src/main/alloc.c Sun Nov 30 18:42:09 1997 *************** *** 1237,1243 **** #endif ! static int spawn_child_err_core(pool *p, int (*func) (void *), void *data, ! enum kill_conditions kill_how, ! int *pipe_in, int *pipe_out, int *pipe_err) { int pid; --- 1237,1252 ---- #endif ! #ifdef AMIGA ! static pool *p; ! static void (*func)(void *); ! static void *data; ! static enum kill_conditions kill_how; ! static int *pipe_in, *pipe_out, *pipe_err; ! extern pool *pconf, *ptrans; ! extern server_rec *server_conf; ! #endif ! static int spawn_child_err_core(pool *_p, int (*_func) (void *), void *_data, ! enum kill_conditions _kill_how, ! int *_pipe_in, int *_pipe_out, int *_pipe_err) { int pid; *************** *** 1246,1249 **** --- 1255,1273 ---- int err_fds[2]; int save_errno; + #ifndef AMIGA + pool *p; + int (*func)(void *); + void *data; + enum kill_conditions kill_how; + int *pipe_in, *pipe_out, *pipe_err; + #endif + + p = _p; + func = _func; + data = _data; + kill_how = _kill_how; + pipe_in = _pipe_in; + pipe_out = _pipe_out; + pipe_err = _pipe_err; if (pipe_in && os_pipe(in_fds) < 0) { *************** *** 1387,1390 **** --- 1411,1427 ---- } + #ifdef AMIGA + vfork_setup_child(); + init_alloc(); + pconf = permanent_pool; + ptrans = make_sub_pool (pconf); + #if 0 /* It looks like I don't need these lines (for now) */ + server_conf = read_config(pconf, ptrans, server_confname); + init_modules (pconf, server_conf); + #endif + open_logs(server_conf, pconf); + ix_vfork_resume(); + #endif + /* HP-UX SIGCHLD fix goes here, if someone will remind me what it is... */ signal(SIGCHLD, SIG_DFL); /* Was that it? */ diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/alloc.h apache_1.3b3_amiga/src/main/alloc.h *** apache_1.3b3/src/main/alloc.h Wed Nov 12 18:22:06 1997 --- apache_1.3b3_amiga/src/main/alloc.h Thu Nov 27 19:29:35 1997 *************** *** 74,77 **** --- 74,80 ---- */ + #ifndef ALLOC_H + #define ALLOC_H + /* Need declaration of DIR on Win32 */ #ifdef WIN32 *************** *** 277,278 **** --- 280,283 ---- API_EXPORT(long) bytes_in_pool(pool *p); API_EXPORT(long) bytes_in_free_blocks(void); + + #endif diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/conf.h apache_1.3b3_amiga/src/main/conf.h *** apache_1.3b3/src/main/conf.h Sun Nov 16 10:43:15 1997 --- apache_1.3b3_amiga/src/main/conf.h Thu Dec 4 21:59:49 1997 *************** *** 650,653 **** --- 650,665 ---- #define isascii(c) (!((c) & ~0177)) + #elif defined(AMIGA) + #include + #include + #define HAVE_SHMGET + #define HAVE_SYS_RESOURCE_H + #define HAVE_GMTOFF + #define USE_SYSVSEM_SERIALIZED_ACCEPT + #undef NO_KILLPG + #define NO_SETSID + #define JMP_BUF sigjmp_buf + #undef NO_LINGCLOSE + #define NO_SLACK #elif defined(WIN32) diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/http_config.c apache_1.3b3_amiga/src/main/http_config.c *** apache_1.3b3/src/main/http_config.c Thu Nov 6 15:40:42 1997 --- apache_1.3b3_amiga/src/main/http_config.c Thu Dec 4 20:59:41 1997 *************** *** 877,881 **** char *p; int offset = (int) cmd->info; ! if (*arg == '/') p = pstrdup(cmd->pool, arg); else --- 877,881 ---- char *p; int offset = (int) cmd->info; ! if (os_is_path_absolute(arg)) p = pstrdup(cmd->pool, arg); else diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/http_log.c apache_1.3b3_amiga/src/main/http_log.c *** apache_1.3b3/src/main/http_log.c Thu Nov 6 16:54:08 1997 --- apache_1.3b3_amiga/src/main/http_log.c Thu Nov 27 20:47:12 1997 *************** *** 408,412 **** --- 408,416 ---- block_alarms(); + #ifdef AMIGA + pid = vfork(); + #else pid = fork(); + #endif if (pid == 0) { /* XXX: this needs porting to OS2 and WIN32 */ diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/http_main.c apache_1.3b3_amiga/src/main/http_main.c *** apache_1.3b3/src/main/http_main.c Sun Nov 16 10:43:16 1997 --- apache_1.3b3_amiga/src/main/http_main.c Thu Dec 4 21:59:33 1997 *************** *** 93,96 **** --- 93,101 ---- #include #include + #ifdef AMIGA + #define SHM_R IPC_R + #define SHM_W IPC_W + #define SHM_M IPC_M + #endif #endif #ifdef SecureWare *************** *** 105,108 **** --- 110,117 ---- #endif + #ifdef AMIGA + #include + #endif + #ifdef HAVE_BSTRING_H #include /* for IRIX, FD_SET calls bzero() */ *************** *** 241,247 **** #endif ! static pool *pconf; /* Pool for config stuff */ ! static pool *ptrans; /* Pool for per-transaction stuff */ ! static pool *pchild; /* Pool for httpd child stuff */ int APACHE_TLS my_pid; /* it seems silly to call getpid all the time */ --- 250,256 ---- #endif ! pool *pconf; /* Pool for config stuff */ ! pool *ptrans; /* Pool for per-transaction stuff */ ! pool *pchild; /* Pool for httpd child stuff */ int APACHE_TLS my_pid; /* it seems silly to call getpid all the time */ *************** *** 663,667 **** } } - #else /* Default --- no serialization. Other methods *could* go here, --- 672,675 ---- *************** *** 1816,1819 **** --- 1824,1830 ---- pid); kill(pid, SIGHUP); + #ifdef AMIGA /* On the amiga, a waitpid is needed to fully cleanup the resources (ie CLI entry) */ + waitpid(pid, NULL, WNOHANG); + #endif waittime = 1024 * 16; break; *************** *** 1829,1832 **** --- 1840,1846 ---- pid); kill(pid, SIGTERM); + #ifdef AMIGA /* On the amiga, a waitpid is needed to fully cleanup the resources (ie CLI entry) */ + waitpid(pid, NULL, WNOHANG); + #endif break; case 8: /* 6 sec */ *************** *** 1836,1839 **** --- 1850,1856 ---- pid); kill(pid, SIGKILL); + #ifdef AMIGA /* On the amiga, a waitpid is needed to fully cleanup the resources (ie CLI entry) */ + waitpid(pid, NULL, WNOHANG); + #endif break; case 9: /* 14 sec */ *************** *** 2015,2018 **** --- 2032,2038 ---- aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_NOTICE, server_conf, emsg); chdir(coredump_dir); + #ifdef AMIGA /* Alas, the amiga doesn't support process groups */ + reclaim_child_processes(1); + #endif abort(); exit(1); *************** *** 2092,2100 **** --- 2112,2128 ---- aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGABRT)"); #endif + } + + sa.sa_handler = sig_term; if (sigaction(SIGTERM, &sa, NULL) < 0) aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGTERM)"); + #ifdef AMIGA + if (sigaction(SIGINT, &sa, NULL) < 0) + aplog_error(APLOG_MARK, APLOG_WARNING, server_conf, "sigaction(SIGTERM)"); + #endif + /* we want to ignore HUPs and USR1 while we're busy processing one */ sigaddset(&sa.sa_mask, SIGHUP); *************** *** 2119,2122 **** --- 2147,2154 ---- } + #ifdef AMIGA + signal(SIGINT, sig_term); + #endif + signal(SIGTERM, sig_term); #ifdef SIGHUP *************** *** 2139,2142 **** --- 2171,2175 ---- int x; + #ifndef AMIGA chdir("/"); #ifndef MPE *************** *** 2152,2155 **** --- 2185,2190 ---- RAISE_SIGSTOP(DETACH); #endif + #endif + #ifndef NO_SETSID if ((pgrp = setsid()) == -1) { *************** *** 2252,2258 **** --- 2287,2295 ---- #endif if (setgid(group_id) == -1) { + #ifndef AMIGA /* this may fail since MuFS doesn't support it */ aplog_error(APLOG_MARK, APLOG_ALERT, server_conf, "setgid: unable to set group id"); exit(1); + #endif } #endif *************** *** 3026,3032 **** } ! static int make_child(server_rec *s, int slot, time_t now) { int pid; if (slot + 1 > max_daemons_limit) { --- 3063,3083 ---- } ! #ifdef AMIGA ! static server_rec *s; ! static int slot; ! time_t now; ! #endif ! static int make_child(server_rec *_s, int _slot, time_t _now) { int pid; + #ifndef AMIGA + server_rec *s; + int _slot; + time_t now; + #endif + + s = _s; + slot = _slot; + now = _now; if (slot + 1 > max_daemons_limit) { *************** *** 3063,3066 **** --- 3114,3127 ---- if (!pid) { + #ifdef AMIGA + vfork_setup_child(); + init_alloc(); + pconf = permanent_pool; + ptrans = make_sub_pool (pconf); + server_conf = s = read_config(pconf, ptrans, server_confname); + init_modules (pconf, server_conf); + open_logs(server_conf, pconf); + ix_vfork_resume(); + #endif RAISE_SIGSTOP(MAKE_CHILD); /* Disable the restart signal handlers and enable the just_die stuff. *************** *** 3622,3628 **** --- 3683,3702 ---- process_request(r); } + #ifdef NO_LINGCLOSE + bclose(cio); /* just close it */ + #else + if (r && r->connection + && !r->connection->aborted + && r->connection->client + && (r->connection->client->fd >= 0)) { + lingering_close(r); + } + else { + bsetflag(cio, B_EOUT, 1); bclose(cio); } + #endif + } exit(0); } diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/http_request.c apache_1.3b3_amiga/src/main/http_request.c *** apache_1.3b3/src/main/http_request.c Fri Nov 14 22:29:57 1997 --- apache_1.3b3_amiga/src/main/http_request.c Tue Dec 2 20:51:42 1997 *************** *** 210,214 **** --- 210,220 ---- } #if defined(ENOENT) && defined(ENOTDIR) + #ifdef AMIGA /* stat is broken, it returns EINVAL for /foo/bar where + * /foo exists and is a file + */ + else if (errno == ENOENT || errno == ENOTDIR || errno == EINVAL) { + #else else if (errno == ENOENT || errno == ENOTDIR) { + #endif last_cp = cp; *************** *** 304,307 **** --- 310,315 ---- /* Add OS/2 drive name support */ if ((test_filename[0] != '/') && (test_filename[1] != ':')) + #elif AMIGA + if (test_filename[0] != '/' && !strchr(test_filename, ':')) #else if (test_filename[0] != '/') *************** *** 413,416 **** --- 421,426 ---- #if defined(__EMX__) || defined(WIN32) || (entry_dir[0] != '/' && entry_dir[1] != ':') + #elif AMIGA + || (entry_dir[0] != '/' && !strchr(entry_dir, ':')) #else || entry_dir[0] != '/' diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/httpd.h apache_1.3b3_amiga/src/main/httpd.h *** apache_1.3b3/src/main/httpd.h Wed Nov 19 19:37:25 1997 --- apache_1.3b3_amiga/src/main/httpd.h Thu Nov 27 19:50:36 1997 *************** *** 71,75 **** /* Set default for OS/2 file system */ #define HTTPD_ROOT "/os2httpd" ! #elif defined(WIN32) /* Set default for Windows file system */ #define HTTPD_ROOT "/apache" --- 71,75 ---- /* Set default for OS/2 file system */ #define HTTPD_ROOT "/os2httpd" ! #elif defined(WIN32) || defined(AMIGA) /* Set default for Windows file system */ #define HTTPD_ROOT "/apache" *************** *** 84,87 **** --- 84,89 ---- /* Set default for OS/2 file system */ #define DOCUMENT_LOCATION "/os2httpd/docs" + #elif defined(AMIGA) + #define DOCUMENT_LOCATION "/apache/htdocs" #else #define DOCUMENT_LOCATION "/usr/local/apache/htdocs" diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/util.c apache_1.3b3_amiga/src/main/util.c *** apache_1.3b3/src/main/util.c Thu Nov 13 12:05:15 1997 --- apache_1.3b3_amiga/src/main/util.c Thu Dec 4 20:24:05 1997 *************** *** 394,401 **** --- 394,408 ---- *d = *s; if (*d == '\0') { + #ifdef AMIGA + if (*(d-1) != ':') + #endif *d = '/'; break; } + #ifdef AMIGA + if ((*d == '/' || *d == ':') && (--n) == 0) + #else if (*d == '/' && (--n) == 0) + #endif break; ++d; *************** *** 416,420 **** int l; ! if (last_slash == NULL) { /* XXX: well this is really broken if this happens */ return (pstrdup(p, "/")); --- 423,432 ---- int l; ! #ifdef AMIGA ! if (last_slash == NULL && (last_slash = strchr(s, ':')) == NULL) ! #else ! if (last_slash == NULL) ! #endif ! { /* XXX: well this is really broken if this happens */ return (pstrdup(p, "/")); *************** *** 438,445 **** --- 450,466 ---- for (x = 0, f = 0; s[x]; x++) { + #ifdef AMIGA /* Beware the dreaded ':' */ + if (s[x] == '/' || (x && s[x-1] == ':')) + #else if(s[x] == '/') + #endif if ((++f) == n) { res = palloc(p, x + 2); strncpy(res, s, x); + #ifdef AMIGA + if (res[x-1] == ':') + x--; + else + #endif res[x] = '/'; res[x + 1] = '\0'; *************** *** 458,464 **** register int x, n; ! for (x = 0, n = 0; path[x]; x++) if (path[x] == '/') n++; return n; } --- 479,490 ---- register int x, n; ! for (x = 0, n = 0; path[x]; x++) { ! #ifdef AMIGA /* Beware the dreaded ':' */ ! if(path[x] == ':') ! n++; ! #endif if (path[x] == '/') n++; + } return n; } *************** *** 471,475 **** x = strrchr(file, '/'); ! if (x == NULL) { chdir(file); } --- 497,506 ---- x = strrchr(file, '/'); ! #ifdef AMIGA ! if (x == NULL && (x = strchr(file, ':')) == NULL) ! #else ! if (x == NULL) ! #endif ! { chdir(file); } *************** *** 1172,1176 **** --- 1203,1211 ---- return pstrcat(a, "/", src2, NULL); + #ifdef AMIGA /* Beware the dreaded ':' */ + if ( (src1[x - 1] != '/') && (src1[x - 1] != ':') ) + #else if (src1[x - 1] != '/') + #endif return pstrcat(a, src1, "/", src2, NULL); else diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/main/util_script.c apache_1.3b3_amiga/src/main/util_script.c *** apache_1.3b3/src/main/util_script.c Sun Nov 16 10:45:22 1997 --- apache_1.3b3_amiga/src/main/util_script.c Thu Nov 27 20:42:09 1997 *************** *** 349,352 **** --- 349,356 ---- #endif } + #if 0 + destroy_sub_req(r); + #endif + } } *************** *** 779,782 **** --- 783,811 ---- } #else + #ifdef AMIGA + /* Not all programs are compiled to use ixemul.library + * Their local variables are passed using GetVar, SetVar + * So I must also pass it to them this way + */ + if (env) { + char *envvar; + char *equal; + char *value; + int i; + + for (i = 0; env[i] != (char *)0; i++) { + envvar = env[i]; + equal = strchr(envvar, '='); + if (equal) { + char variable[equal-envvar+1]; + + variable[equal-envvar] = '\0'; + strncpy(variable,envvar, equal-envvar); + value = equal+1; + SetVar(variable, value, -1, GVF_LOCAL_ONLY); + } + } + } + #endif if (suexec_enabled && ((r->server->server_uid != user_id) || *************** *** 844,847 **** --- 873,927 ---- } } + #ifdef AMIGA /* allow ARexx scripts to be run */ + else { + + if (shellcmd) + execle(SHELL_PATH, SHELL_PATH, "-c", argv0, NULL, env); + + else { + FILE *rxfile; + int isrexx = 0; + char err_string[512]; + int chr, chr2; + + rxfile = fopen(r->filename, "r"); + if (!rxfile) { + return; + } + + /* skip the leading white space */ + while(isspace((chr=fgetc(rxfile)))) + ; + + /* all ARexx files start with comment header */ + if (chr == '/' && (chr2 = fgetc(rxfile)) == '*') { + isrexx = 1; + } + + fclose(rxfile); + + if((!r->args) || (!r->args[0]) || (ind(r->args,'=') >= 0)) { + if (isrexx) { + execle("/apache/cgi-bin/rx-gate", argv0, NULL, env); + } + else { + execle(r->filename, argv0, NULL, env); + } + } + else { + if (isrexx) { + execve("/apache/cgi-bin/rx-gate", + create_argv(r->pool, NULL, NULL, NULL, argv0, r->args), + env); + } + else { + execve(r->filename, + create_argv(r->pool, NULL, NULL, NULL, argv0, r->args), + env); + } + } + } + } + #else else { if (shellcmd) *************** *** 857,860 **** --- 937,941 ---- } return (pid); + #endif #endif } diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/modules/standard/mod_auth.c apache_1.3b3_amiga/src/modules/standard/mod_auth.c *** apache_1.3b3/src/modules/standard/mod_auth.c Sun Oct 26 15:20:03 1997 --- apache_1.3b3_amiga/src/modules/standard/mod_auth.c Thu Nov 27 21:07:42 1997 *************** *** 200,203 **** --- 200,207 ---- char *sent_pw, *real_pw; int res; + #ifdef AMIGA + char another_pw[24]={0,}, *crypted_pw; + char salt[3]; + #endif if ((res = get_basic_auth_pw(r, &sent_pw))) *************** *** 216,220 **** } /* anyone know where the prototype for crypt is? */ ! if (strcmp(real_pw, (char *) crypt(sent_pw, real_pw))) { aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "user %s: password mismatch: %s", c->user, r->uri); --- 220,236 ---- } /* anyone know where the prototype for crypt is? */ ! #ifdef AMIGA ! salt[0] = real_pw[0]; ! salt[1] = real_pw[1]; ! salt[2] = '\0'; ! /* if MuFS is installed, crypt will return NULL */ ! crypted_pw = crypt(sent_pw, salt); ! if (crypted_pw == NULL) ! ACrypt(another_pw, sent_pw, c->user); ! if ( (crypted_pw == NULL && strcmp(real_pw, another_pw)) || (crypted_pw && strcmp(real_pw, crypted_pw))) ! #else ! if (strcmp(real_pw, (char *) crypt(sent_pw, real_pw))) ! #endif ! { aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "user %s: password mismatch: %s", c->user, r->uri); diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/modules/standard/mod_auth_db.c apache_1.3b3_amiga/src/modules/standard/mod_auth_db.c *** apache_1.3b3/src/modules/standard/mod_auth_db.c Wed Oct 22 16:30:15 1997 --- apache_1.3b3_amiga/src/modules/standard/mod_auth_db.c Thu Nov 27 21:08:35 1997 *************** *** 199,202 **** --- 199,206 ---- char *sent_pw, *real_pw, *colon_pw; int res; + #ifdef AMIGA + char another_pw[24]={0,}, *crypted_pw; + char salt[3]; + #endif if ((res = get_basic_auth_pw(r, &sent_pw))) *************** *** 219,223 **** *colon_pw = '\0'; /* anyone know where the prototype for crypt is? */ ! if (strcmp(real_pw, (char *) crypt(sent_pw, real_pw))) { aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "DB user %s: password mismatch: %s", c->user, r->uri); --- 223,239 ---- *colon_pw = '\0'; /* anyone know where the prototype for crypt is? */ ! /* anyone know where the prototype for crypt is? */ ! #ifdef AMIGA ! salt[0] = real_pw[0]; ! salt[1] = real_pw[1]; ! salt[2] = '\0'; ! crypted_pw = crypt(sent_pw, salt); ! if (crypted_pw == NULL) ! ACrypt(another_pw, sent_pw, c->user); ! if ( (crypted_pw == NULL && strcmp(real_pw, another_pw)) || (crypted_pw && strcmp(real_pw, crypted_pw))) ! #else ! if (strcmp(real_pw, (char *) crypt(sent_pw, real_pw))) ! #endif ! { aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "DB user %s: password mismatch: %s", c->user, r->uri); diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/modules/standard/mod_auth_dbm.c apache_1.3b3_amiga/src/modules/standard/mod_auth_dbm.c *** apache_1.3b3/src/modules/standard/mod_auth_dbm.c Wed Oct 22 16:30:16 1997 --- apache_1.3b3_amiga/src/modules/standard/mod_auth_dbm.c Thu Nov 27 20:04:26 1997 *************** *** 223,226 **** --- 223,230 ---- char *sent_pw, *real_pw, *colon_pw; int res; + #ifdef AMIGA + char another_pw[24]={0,}, *crypted_pw; + char salt[3]; + #endif if ((res = get_basic_auth_pw(r, &sent_pw))) *************** *** 243,247 **** --- 247,261 ---- *colon_pw = '\0'; /* anyone know where the prototype for crypt is? */ + #ifdef AMIGA + salt[0] = real_pw[0]; + salt[1] = real_pw[1]; + salt[2] = '\0'; + crypted_pw = crypt(sent_pw, salt); + if (crypted_pw == NULL) + ACrypt(another_pw, sent_pw, c->user); + if ( (crypted_pw == NULL && strcmp(real_pw, another_pw)) || (crypted_pw && strcmp(real_pw, crypted_pw))) + #else if (strcmp(real_pw, (char *) crypt(sent_pw, real_pw))) { + #endif aplog_error(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r->server, "user %s: password mismatch: %s", c->user, r->uri); diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/modules/standard/mod_autoindex.c apache_1.3b3_amiga/src/modules/standard/mod_autoindex.c *** apache_1.3b3/src/modules/standard/mod_autoindex.c Wed Nov 12 16:37:45 1997 --- apache_1.3b3_amiga/src/modules/standard/mod_autoindex.c Tue Dec 2 21:30:08 1997 *************** *** 126,129 **** --- 126,136 ---- } autoindex_config_rec; + #ifdef AMIGA + /* the addresses change when the children are forked so this is flawed */ + /* I think this is a back hack too! */ + #define BY_ENCODING (char *)0x01234567 + #define BY_PATH (char *)0x98765432 + #define BY_TYPE (char *)0x90ABCDEF + #else static char c_by_encoding, c_by_type, c_by_path; *************** *** 131,134 **** --- 138,142 ---- #define BY_TYPE &c_by_type #define BY_PATH &c_by_path + #endif /* diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/modules/standard/mod_userdir.c apache_1.3b3_amiga/src/modules/standard/mod_userdir.c *** apache_1.3b3/src/modules/standard/mod_userdir.c Wed Oct 22 16:30:31 1997 --- apache_1.3b3_amiga/src/modules/standard/mod_userdir.c Thu Nov 27 20:06:39 1997 *************** *** 302,305 **** --- 302,311 ---- /* Need to manually add user name for OS/2 */ filename = pstrcat(r->pool, pw->pw_dir, w, "/", userdir, NULL); + #elif AMIGA + char *plce = strchr(pw->pw_dir,'\0'); + if (plce[-1] != '/' && plce[-1] != ':') + filename = pstrcat (r->pool, pw->pw_dir, "/", userdir, NULL); + else + filename = pstrcat (r->pool, pw->pw_dir, userdir, NULL); #else filename = pstrcat(r->pool, pw->pw_dir, "/", userdir, NULL); diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/os/amiga/Makefile.tmpl apache_1.3b3_amiga/src/os/amiga/Makefile.tmpl *** apache_1.3b3/src/os/amiga/Makefile.tmpl Wed Dec 31 19:00:00 1969 --- apache_1.3b3_amiga/src/os/amiga/Makefile.tmpl Tue Oct 7 15:53:32 1997 *************** *** 0 **** --- 1,27 ---- + CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS) + LIBS=$(EXTRA_LIBS) $(LIBS1) + INCLUDES=$(INCLUDES1) $(INCLUDES_DEPTH2) $(EXTRA_INCLUDES) + LFLAGS=$(LFLAGS1) $(EXTRA_LFLAGS) + INCDIR=../../main + + OBJS= os.o os-inline.o + + LIB= libos.a + + all: $(LIB) + + $(LIB): $(OBJS) + rm -f $@ + ar cr $@ $(OBJS) + $(RANLIB) $@ + + .c.o: + $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $< + + clean: + rm -f $(OBJS) $(LIB) + + $(OBJS): Makefile + + # DO NOT REMOVE + os.o: os.c os-inline.c diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/os/amiga/os-inline.c apache_1.3b3_amiga/src/os/amiga/os-inline.c *** apache_1.3b3/src/os/amiga/os-inline.c Wed Dec 31 19:00:00 1969 --- apache_1.3b3_amiga/src/os/amiga/os-inline.c Thu Nov 27 19:36:00 1997 *************** *** 0 **** --- 1,30 ---- + /* + * This file contains functions which can be inlined if the compiler + * has an "inline" modifier. Because of this, this file is both a + * header file and a compilable module. + * + * Only inlineable functions should be defined in here. They must all + * include the INLINE modifier. + * + * If the compiler supports inline, this file will be #included as a + * header file from os.h to create all the inline function + * definitions. INLINE will be defined to whatever is required on + * function definitions to make them inline declarations. + * + * If the compiler does not support inline, this file will be compiled + * as a normal C file into libos.a (along with os.c). In this case + * INLINE will _not_ be set so we can use this to test if we are + * compiling this source file. + */ + + #ifndef INLINE + #define INLINE + + /* Anything required only when compiling */ + + #endif + + INLINE int os_is_path_absolute(char *file) + { + return (strchr(file, ':') || file[0] == '/') ? 1 : 0; + } diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/os/amiga/os.c apache_1.3b3_amiga/src/os/amiga/os.c *** apache_1.3b3/src/os/amiga/os.c Wed Dec 31 19:00:00 1969 --- apache_1.3b3_amiga/src/os/amiga/os.c Fri Sep 12 03:28:50 1997 *************** *** 0 **** --- 1,6 ---- + /* + * This file will include OS specific functions which are not inlineable. + * Any inlineable functions should be defined in os-inline.c instead. + */ + + #include "os.h" diff --new-file -w -c2 --recursive --exclude-from=NOT apache_1.3b3/src/os/amiga/os.h apache_1.3b3_amiga/src/os/amiga/os.h *** apache_1.3b3/src/os/amiga/os.h Wed Dec 31 19:00:00 1969 --- apache_1.3b3_amiga/src/os/amiga/os.h Tue Oct 7 01:53:42 1997 *************** *** 0 **** --- 1,20 ---- + /* + * This file in included in all Apache source code. It contains definitions + * of facilities available on _this_ operating system (HAVE_* macros), + * and prototypes of OS specific functions defined in os.c or os-inline.c + */ + + #if !defined(INLINE) && defined(USE_GNU_INLINE) + /* Compiler supports inline, so include the inlineable functions as + * part of the header + */ + #define INLINE extern ap_inline + #include "os-inline.c" + #endif + + #ifndef INLINE + /* Compiler does not support inline, so prototype the inlineable functions + * as normal + */ + extern int os_is_path_absolute(char *f); + #endif Binary files apache_1.3b3/src/test/zb and apache_1.3b3_amiga/src/test/zb differ