From 5b72eb0b03b3832b956072c62cc5a5985a6059ef Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 5 Jul 2003 13:13:49 +0000 Subject: [PATCH] Some of Doug Kaufman's changes for the DOS port --- lib/getpass.c | 8 +++----- lib/setup.h | 7 +++++++ src/main.c | 18 ++++++++++++------ src/setup.h | 4 ++++ src/version.h | 2 +- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/lib/getpass.c b/lib/getpass.c index 5886748b71..7db8f51a96 100644 --- a/lib/getpass.c +++ b/lib/getpass.c @@ -99,7 +99,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen) char infp_fclose = 0; FILE *outfp; RETSIGTYPE (*sigint)(); -#if !defined(__EMX__) && !defined(__DJGPP__) +#ifdef SIGTSTP RETSIGTYPE (*sigtstp)(); #endif size_t bytes_read; @@ -117,9 +117,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen) #endif sigint = signal(SIGINT, SIG_IGN); - /* 20000318 mgs - * this is needed by the emx system, SIGTSTP is not a supported signal */ -#if !defined(__EMX__) && !defined(__DJGPP__) +#ifdef SIGTSTP sigtstp = signal(SIGTSTP, SIG_IGN); #endif @@ -181,7 +179,7 @@ char *getpass_r(const char *prompt, char *buffer, size_t buflen) #endif signal(SIGINT, sigint); -#if !defined(__EMX__) && !defined(__DJGPP__) +#ifdef SIGTSTP signal(SIGTSTP, sigtstp); #endif diff --git a/lib/setup.h b/lib/setup.h index 0a109111f6..4af61f97e3 100644 --- a/lib/setup.h +++ b/lib/setup.h @@ -145,6 +145,13 @@ defined(HAVE_LIBSSL) && defined(HAVE_LIBCRYPTO) #define sread(x,y,z) read_s(x,y,z) #define swrite(x,y,z) write_s(x,y,z) #define select(n,r,w,x,t) select_s(n,r,w,x,t) +#define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z)) +#define IOCTL_3_ARGS +#include +#ifdef word +#undef word +#endif + #else #define sclose(x) close(x) diff --git a/src/main.c b/src/main.c index a40bc8be75..94a48f174a 100644 --- a/src/main.c +++ b/src/main.c @@ -432,10 +432,10 @@ static void help(void) " Overrides -n and --netrc-optional\n" " -U/--proxy-user Specify Proxy authentication\n" " -v/--verbose Makes the operation more talkative\n" -#ifdef DJGPP - " Also enables Watt-32 debugging\n" -#endif " -V/--version Outputs version number then quits"); +#ifdef __DJGPP__ + puts(" --wdebug Turns on WATT-32 debugging under DJGPP"); +#endif puts(" -w/--write-out [format] What to output after completion\n" " -x/--proxy Use proxy. (Default port is 1080)\n" " --random-file File to use for reading random data from (SSL)\n" @@ -1067,6 +1067,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ {"5m", "ntlm", FALSE}, {"5n", "basic", FALSE}, {"5o", "anyauth", FALSE}, +#ifdef __DJGPP__ + {"5p", "wdebug", FALSE}, +#endif {"0", "http1.0", FALSE}, {"1", "tlsv1", FALSE}, {"2", "sslv2", FALSE}, @@ -1311,6 +1314,12 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ config->authtype = CURLAUTH_ANY; break; +#ifdef __DJGPP__ + case 'p': /* --wdebug */ + dbug_init(); + break; +#endif + default: /* the URL! */ { struct getout *url; @@ -1723,9 +1732,6 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */ cleanarg(nextarg); break; case 'v': -#ifdef DJGPP - dbug_init(); -#endif config->conf ^= CONF_VERBOSE; /* talk a lot */ break; case 'V': diff --git a/src/setup.h b/src/setup.h index c5ab80ed9e..1533cba2bf 100644 --- a/src/setup.h +++ b/src/setup.h @@ -78,6 +78,10 @@ int fileno( FILE *stream); #else #ifdef DJGPP +#include +#ifdef word +#undef word +#endif #define DIR_CHAR "/" #define DOT_CHAR "_" #else diff --git a/src/version.h b/src/version.h index be9b11869e..22e6f8d652 100644 --- a/src/version.h +++ b/src/version.h @@ -1,3 +1,3 @@ #define CURL_NAME "curl" -#define CURL_VERSION "7.10.6-pre1" +#define CURL_VERSION "7.10.6-pre3" #define CURL_ID CURL_NAME " " CURL_VERSION " (" OS ") "