提交 4f7068c1 编写于 作者: U Ulf Möller

Fix some CygWin problems.

上级 b144a5e9
...@@ -113,11 +113,9 @@ ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, unsigned char **pp, long length) ...@@ -113,11 +113,9 @@ ASN1_TIME *d2i_ASN1_TIME(ASN1_TIME **a, unsigned char **pp, long length)
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t) ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t)
{ {
struct tm *ts; struct tm *ts;
#if defined(THREADS) && !defined(WIN32) #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
struct tm data; struct tm data;
#endif
#if defined(THREADS) && !defined(WIN32)
gmtime_r(&t,&data); gmtime_r(&t,&data);
ts=&data; /* should return &data, but doesn't on some systems, so we don't even look at the return value */ ts=&data; /* should return &data, but doesn't on some systems, so we don't even look at the return value */
#else #else
......
...@@ -193,7 +193,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) ...@@ -193,7 +193,8 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
{ {
char *p; char *p;
struct tm *ts; struct tm *ts;
#if defined(THREADS) && !defined(WIN32) #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
struct tm data; struct tm data;
#endif #endif
...@@ -202,7 +203,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t) ...@@ -202,7 +203,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t)
if (s == NULL) if (s == NULL)
return(NULL); return(NULL);
#if defined(THREADS) && !defined(WIN32) #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */ gmtime_r(&t,&data); /* should return &data, but doesn't on some systems, so we don't even look at the return value */
ts=&data; ts=&data;
#else #else
...@@ -285,7 +286,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) ...@@ -285,7 +286,7 @@ int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t)
t -= offset*60; /* FIXME: may overflow in extreme cases */ t -= offset*60; /* FIXME: may overflow in extreme cases */
#if defined(THREADS) && !defined(WIN32) #if defined(THREADS) && !defined(WIN32) && !defined(__CYGWIN32__)
{ struct tm data; gmtime_r(&t, &data); tm = &data; } { struct tm data; gmtime_r(&t, &data); tm = &data; }
#else #else
tm = gmtime(&t); tm = gmtime(&t);
......
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#endif #endif
#ifdef MSDOS #if defined(MSDOS) && !defined(__CYGWIN32__)
#include <conio.h> #include <conio.h>
#define fgets(a,b,c) noecho_fgets(a,b,c) #define fgets(a,b,c) noecho_fgets(a,b,c)
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册