httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@locus.apache.org
Subject cvs commit: apache-1.3/src/support htpasswd.c
Date Thu, 04 May 2000 00:57:41 GMT
fielding    00/05/03 17:57:41

  Modified:    src/support htpasswd.c
  Log:
  Get rid of warning by including crypt.h when available.
  Make tmpnam stuff less complex.
  
  CVS ----------------------------------------------------------------------
  
  Revision  Changes    Path
  1.40      +7 -5      apache-1.3/src/support/htpasswd.c
  
  Index: htpasswd.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/support/htpasswd.c,v
  retrieving revision 1.39
  retrieving revision 1.40
  diff -u -r1.39 -r1.40
  --- htpasswd.c	2000/05/03 17:58:57	1.39
  +++ htpasswd.c	2000/05/04 00:57:40	1.40
  @@ -90,6 +90,10 @@
   #include "ap_md5.h"
   #include "ap_sha1.h"
   
  +#ifdef HAVE_CRYPT_H
  +#include <crypt.h>
  +#endif
  +
   #ifdef WIN32
   #include <conio.h>
   #include "../os/win32/getopt.h"
  @@ -129,6 +133,8 @@
    */
   #ifdef L_tmpnam
   static char tname_buf[L_tmpnam];
  +#else
  +static char *tname_buf = NULL;
   #endif
   
   /*
  @@ -527,12 +533,8 @@
        * to add or update.  Let's do it..
        */
       errno = 0;
  -#ifdef L_tmpnam
       tempfilename = tmpnam(tname_buf);
  -#else   /* def L_tmpnam */
  -    tempfilename = tmpnam(NULL);
  -#endif  /* def L_tmpnam */
  -    if ((tempfilename == NULL) || (strlen(tempfilename) == 0)) {
  +    if ((tempfilename == NULL) || (*tempfilename == '\0')) {
   	fprintf(stderr, "%s: unable to generate temporary filename\n",
   		argv[0]);
   	if (errno == 0) {
  
  
  

Mime
View raw message