提交 a3ed492f 编写于 作者: M Matt Caswell

Fix windows build

The big apps cleanup broke the windows build. This commit
fixes some miscellaneous issues so that it builds again.
Reviewed-by: NAndy Polyakov <appro@openssl.org>
上级 fb456902
...@@ -1837,7 +1837,7 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti) ...@@ -1837,7 +1837,7 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
n = X509_NAME_new(); n = X509_NAME_new();
if (n == NULL) if (n == NULL)
return NULL; return NULL;
work = strdup(cp); work = OPENSSL_strdup(cp);
if (work == NULL) if (work == NULL)
goto err; goto err;
...@@ -1894,12 +1894,12 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti) ...@@ -1894,12 +1894,12 @@ X509_NAME *parse_name(const char *cp, long chtype, int canmulti)
goto err; goto err;
} }
free(work); OPENSSL_free(work);
return n; return n;
err: err:
X509_NAME_free(n); X509_NAME_free(n);
free(work); OPENSSL_free(work);
return NULL; return NULL;
} }
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#if !defined(OPENSSL_SYS_MSDOS) #if !defined(OPENSSL_SYS_MSDOS)
# include OPENSSL_UNISTD # include OPENSSL_UNISTD
#endif #endif
#include <unistd.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
...@@ -96,11 +96,11 @@ char *opt_progname(const char *argv0) ...@@ -96,11 +96,11 @@ char *opt_progname(const char *argv0)
/* Strip off trailing nonsense. */ /* Strip off trailing nonsense. */
n = strlen(p); n = strlen(p);
if (n > 4 && if (n > 4 &&
(strcmp(&p[n - 4], ".exe") == 0 || strcmp(&p[n - 4], ".EXE") == 0) (strcmp(&p[n - 4], ".exe") == 0 || strcmp(&p[n - 4], ".EXE") == 0))
n -= 4; n -= 4;
#if defined(OPENSSL_SYS_NETWARE) #if defined(OPENSSL_SYS_NETWARE)
if (n > 4 && if (n > 4 &&
(strcmp(&p[n - 4], ".nlm") == 0 || strcmp(&p[n - 4], ".NLM") == 0) (strcmp(&p[n - 4], ".nlm") == 0 || strcmp(&p[n - 4], ".NLM") == 0))
n -= 4; n -= 4;
#endif #endif
...@@ -108,7 +108,7 @@ char *opt_progname(const char *argv0) ...@@ -108,7 +108,7 @@ char *opt_progname(const char *argv0)
if (n > sizeof prog - 1) if (n > sizeof prog - 1)
n = sizeof prog - 1; n = sizeof prog - 1;
for (q = prog, i = 0; i < n; i++, p++) for (q = prog, i = 0; i < n; i++, p++)
q++ = isupper(*p) ? tolower(*p) : *p; *q++ = isupper(*p) ? tolower(*p) : *p;
*q = '\0'; *q = '\0';
return prog; return prog;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册