From: Bradley Nicholes Date: Fri, 18 Jan 2002 23:28:20 +0000 (+0000) Subject: Updates to allow the utilities to run on NetWare X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=57abb143dbdad7fe078fbeaae202182d3debf6bb;p=apache Updates to allow the utilities to run on NetWare git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92919 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htdigest.c b/support/htdigest.c index 8adb564960..7a8bf3b9e7 100644 --- a/support/htdigest.c +++ b/support/htdigest.c @@ -208,6 +208,9 @@ static void interrupted(void) static void terminate(void) { +#ifdef NETWARE + pressanykey(); +#endif apr_terminate(); } diff --git a/support/htpasswd.c b/support/htpasswd.c index 5c0b5c2a2a..0117a34060 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -249,7 +249,7 @@ static int mkrecord(char *user, char *record, size_t rlen, char *passwd, apr_cpystrn(cpw,pw,sizeof(cpw)); break; -#ifndef WIN32 +#if !(defined(WIN32) || defined(NETWARE)) case ALG_CRYPT: default: (void) srand((int) time((time_t *) NULL)); @@ -286,12 +286,12 @@ static int usage(void) fprintf(stderr, " -c Create a new file.\n"); fprintf(stderr, " -n Don't update file; display results on stdout.\n"); fprintf(stderr, " -m Force MD5 encryption of the password" -#if defined(WIN32) || defined(TPF) +#if defined(WIN32) || defined(TPF) || defined(NETWARE) " (default)" #endif ".\n"); fprintf(stderr, " -d Force CRYPT encryption of the password" -#if (!(defined(WIN32) || defined(TPF))) +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE))) " (default)" #endif ".\n"); @@ -300,7 +300,7 @@ static int usage(void) fprintf(stderr, " -b Use the password from the command line rather " "than prompting for it.\n"); fprintf(stderr, - "On Windows and TPF systems the '-m' flag is used by default.\n"); + "On Windows, NetWare and TPF systems the '-m' flag is used by default.\n"); fprintf(stderr, "On all other systems, the '-p' flag will probably not work.\n"); return ERR_SYNTAX; @@ -372,6 +372,14 @@ static void copy_file(FILE *target, FILE *source) } } +#ifdef NETWARE +void nwTerminate() +{ + pressanykey(); + apr_terminate(); +} +#endif + /* * Let's do it. We end up doing a lot of file opening and closing, * but what do we care? This application isn't run constantly. @@ -400,7 +408,11 @@ int main(int argc, char *argv[]) #endif apr_initialize(); +#ifdef NETWARE + atexit(nwTerminate); +#else atexit(apr_terminate); +#endif apr_pool_create(&pool, NULL); #if APR_CHARSET_EBCDIC @@ -430,7 +442,7 @@ int main(int argc, char *argv[]) * we parse the command line. */ if (argc < 3) { - return usage(); + return usage(); } /* @@ -514,14 +526,14 @@ int main(int argc, char *argv[]) strcpy(password, argv[i + 2]); } -#ifdef WIN32 +#if defined(WIN32) || defined(NETWARE) if (alg == ALG_CRYPT) { alg = ALG_APMD5; - fprintf(stderr, "Automatically using MD5 format on Windows.\n"); + fprintf(stderr, "Automatically using MD5 format.\n"); } #endif -#if (!(defined(WIN32) || defined(TPF))) +#if (!(defined(WIN32) || defined(TPF) || defined(NETWARE))) if (alg == ALG_PLAIN) { fprintf(stderr,"Warning: storing passwords as plain text might " "just not work on this platform.\n"); diff --git a/support/utilitiesnw.def b/support/utilitiesnw.def new file mode 100644 index 0000000000..426b8c96be --- /dev/null +++ b/support/utilitiesnw.def @@ -0,0 +1,3 @@ +MODULE APRLIB.NLM +MODULE LIBC.NLM +