Commit 6edcd41c authored by Paul Bakker's avatar Paul Bakker

Addition conditions for UEFI environment under MSVC

parent 7b0be689
......@@ -44,7 +44,8 @@
#define POLARSSL_CIPHER_MODE_STREAM
#endif
#if defined(_MSC_VER) && !defined strcasecmp
#if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \
!defined(EFI32)
#define strcasecmp _stricmp
#endif
......
......@@ -36,13 +36,15 @@
#include <stdio.h>
#endif
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined(EFIX64) && !defined(EFI32)
#if !defined snprintf
#define snprintf _snprintf
#endif
#if defined(_MSC_VER) && !defined vsnprintf
#if !defined vsnprintf
#define vsnprintf _vsnprintf
#endif
#endif /* _MSC_VER */
char *debug_fmt( const char *format, ... )
{
......
......@@ -160,7 +160,8 @@
#include <string.h>
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#define snprintf _snprintf
#endif
......
......@@ -36,8 +36,9 @@
#include <stdlib.h>
#if defined(_MSC_VER) && !defined strcasecmp
#define snprintf _stricmp
#if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \
!defined(EFI32)
#define strcasecmp _stricmp
#endif
static const int supported_digests[] = {
......
......@@ -542,7 +542,8 @@ FN_OID_TYPED_FROM_ASN1(oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, oid_pkcs12_pbe_alg)
FN_OID_GET_ATTR2(oid_get_pkcs12_pbe_alg, oid_pkcs12_pbe_alg_t, pkcs12_pbe_alg, md_type_t, md_alg, cipher_type_t, cipher_alg);
#endif /* POLARSSL_PKCS12_C */
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#include <stdarg.h>
#if !defined vsnprintf
......
......@@ -34,7 +34,8 @@
#include <stdlib.h>
#if defined(_MSC_VER) && !defined strcasecmp
#if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \
!defined(EFI32)
#define strcasecmp _stricmp
#endif
......
......@@ -47,7 +47,8 @@
#include <stdlib.h>
#if defined(_MSC_VER) && !defined strcasecmp
#if defined(_MSC_VER) && !defined strcasecmp && !defined(EFIX64) && \
!defined(EFI32)
#define strcasecmp _stricmp
#endif
......
......@@ -429,7 +429,8 @@ int x509_load_file( const char *path, unsigned char **buf, size_t *n )
}
#endif /* POLARSSL_FS_IO */
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#include <stdarg.h>
#if !defined vsnprintf
......
......@@ -31,7 +31,8 @@
#include "polarssl/asn1write.h"
#include "polarssl/oid.h"
#if defined(_MSC_VER) && !defined strncasecmp
#if defined(_MSC_VER) && !defined strncasecmp && !defined(EFIX64) && \
!defined(EFI32)
#define strncasecmp _strnicmp
#endif
......
......@@ -545,7 +545,8 @@ int x509_crl_parse_file( x509_crl *chain, const char *path )
}
#endif /* POLARSSL_FS_IO */
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#include <stdarg.h>
#if !defined vsnprintf
......
......@@ -1039,7 +1039,8 @@ int x509_crt_parse_path( x509_crt *chain, const char *path )
}
#endif /* POLARSSL_FS_IO */
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#include <stdarg.h>
#if !defined vsnprintf
......
......@@ -302,7 +302,8 @@ int x509_csr_parse_file( x509_csr *csr, const char *path )
}
#endif /* POLARSSL_FS_IO */
#if defined(_MSC_VER) && !defined snprintf
#if defined(_MSC_VER) && !defined snprintf && !defined(EFIX64) && \
!defined(EFI32)
#include <stdarg.h>
#if !defined vsnprintf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment