Fossil SCM
Patches to get Fossil working on OS/2. Ticket [89bec0d9aa9f30]
Commit
df97fae2bd9f248be088a57f67fd6c46c635c357
Parent
b5f4f910b72477f…
2 files changed
+3
+5
+3
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -40,10 +40,13 @@ | ||
| 40 | 40 | # include <sys/times.h> |
| 41 | 41 | # include <sys/time.h> |
| 42 | 42 | # include <sys/wait.h> |
| 43 | 43 | # include <sys/select.h> |
| 44 | 44 | #endif |
| 45 | +#ifdef __EMX__ | |
| 46 | + typedef int socklen_t; | |
| 47 | +#endif | |
| 45 | 48 | #include <time.h> |
| 46 | 49 | #include <stdio.h> |
| 47 | 50 | #include <stdlib.h> |
| 48 | 51 | #include <unistd.h> |
| 49 | 52 | #include "cgi.h" |
| 50 | 53 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -40,10 +40,13 @@ | |
| 40 | # include <sys/times.h> |
| 41 | # include <sys/time.h> |
| 42 | # include <sys/wait.h> |
| 43 | # include <sys/select.h> |
| 44 | #endif |
| 45 | #include <time.h> |
| 46 | #include <stdio.h> |
| 47 | #include <stdlib.h> |
| 48 | #include <unistd.h> |
| 49 | #include "cgi.h" |
| 50 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -40,10 +40,13 @@ | |
| 40 | # include <sys/times.h> |
| 41 | # include <sys/time.h> |
| 42 | # include <sys/wait.h> |
| 43 | # include <sys/select.h> |
| 44 | #endif |
| 45 | #ifdef __EMX__ |
| 46 | typedef int socklen_t; |
| 47 | #endif |
| 48 | #include <time.h> |
| 49 | #include <stdio.h> |
| 50 | #include <stdlib.h> |
| 51 | #include <unistd.h> |
| 52 | #include "cgi.h" |
| 53 |
+5
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -625,10 +625,15 @@ | ||
| 625 | 625 | /* Set binary mode on windows to avoid undesired translations |
| 626 | 626 | ** between \n and \r\n. */ |
| 627 | 627 | setmode(_fileno(g.httpOut), _O_BINARY); |
| 628 | 628 | setmode(_fileno(g.httpIn), _O_BINARY); |
| 629 | 629 | #endif |
| 630 | +#ifdef __EMX__ | |
| 631 | + /* Similar hack for OS/2 */ | |
| 632 | + setmode(fileno(g.httpOut), O_BINARY); | |
| 633 | + setmode(fileno(g.httpIn), O_BINARY); | |
| 634 | +#endif | |
| 630 | 635 | g.cgiPanic = 1; |
| 631 | 636 | blob_read_from_file(&config, zFile); |
| 632 | 637 | while( blob_line(&config, &line) ){ |
| 633 | 638 | if( !blob_token(&line, &key) ) continue; |
| 634 | 639 | if( blob_buffer(&key)[0]=='#' ) continue; |
| 635 | 640 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -625,10 +625,15 @@ | |
| 625 | /* Set binary mode on windows to avoid undesired translations |
| 626 | ** between \n and \r\n. */ |
| 627 | setmode(_fileno(g.httpOut), _O_BINARY); |
| 628 | setmode(_fileno(g.httpIn), _O_BINARY); |
| 629 | #endif |
| 630 | g.cgiPanic = 1; |
| 631 | blob_read_from_file(&config, zFile); |
| 632 | while( blob_line(&config, &line) ){ |
| 633 | if( !blob_token(&line, &key) ) continue; |
| 634 | if( blob_buffer(&key)[0]=='#' ) continue; |
| 635 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -625,10 +625,15 @@ | |
| 625 | /* Set binary mode on windows to avoid undesired translations |
| 626 | ** between \n and \r\n. */ |
| 627 | setmode(_fileno(g.httpOut), _O_BINARY); |
| 628 | setmode(_fileno(g.httpIn), _O_BINARY); |
| 629 | #endif |
| 630 | #ifdef __EMX__ |
| 631 | /* Similar hack for OS/2 */ |
| 632 | setmode(fileno(g.httpOut), O_BINARY); |
| 633 | setmode(fileno(g.httpIn), O_BINARY); |
| 634 | #endif |
| 635 | g.cgiPanic = 1; |
| 636 | blob_read_from_file(&config, zFile); |
| 637 | while( blob_line(&config, &line) ){ |
| 638 | if( !blob_token(&line, &key) ) continue; |
| 639 | if( blob_buffer(&key)[0]=='#' ) continue; |
| 640 |