  #ifdef MSFT_COM_WRAPPER
      #include "sgx_provision_certificate.h"
  #endif
-@@ -67,9 +69,11 @@
+@@ -67,12 +69,56 @@
      #define SGX_QL_QUOTE_CONFIG_LIB_FILE_NAME_LEGACY "libdcap_quoteprov.so"
      #define TCHAR char
      #define _T(x) (x)
 +    #define PATH_SEPARATOR '/'
++    typedef void* library_handle_t;
  #else
      #define QE3_ENCLAVE_NAME _T("qe3.signed.dll")
      #define SGX_QL_QUOTE_CONFIG_LIB_FILE_NAME "dcap_quoteprov.dll"
++    #define SGX_QL_QUOTE_CONFIG_LIB_FILE_NAME_LEGACY NULL
 +    #define PATH_SEPARATOR '\\'
++    typedef HINSTANCE library_handle_t;
  #endif
  #define ECDSA_BLOB_LABEL "ecdsa_data.blob"
  
-@@ -163,6 +167,8 @@
++/**
++ * Define various local compatibility shims for working with dynamically loaded
++ * libraries so that code doesn't have to vary so much between different OS.
++ */
++static inline library_handle_t load_library(const char *filename)
++{
++#ifndef _MSC_VER
++    return dlopen(filename, RTLD_LAZY);
++#else
++    return LoadLibrary(TEXT(filename));
++#endif
++}
++
++static inline void *lookup_symbol(library_handle_t handle, const char *symbol)
++{
++#ifndef _MSC_VER
++    return dlsym(handle, symbol);
++#else
++    return GetProcAddress(handle, symbol);
++#endif
++}
++
++static inline char *get_lookup_error()
++{
++#ifndef _MSC_VER
++  return dlerror();
++#else
++  return NULL;
++#endif
++}
++
++static inline void close_library(library_handle_t handle)
++{
++#ifndef _MSC_VER
++    dlclose(handle);
++#else
++    FreeLibrary(handle);
++#endif
++}
+ 
+ #define MAX_PATH 260
+ #define MAX_CERT_DATA_SIZE (4098*3)
+@@ -163,6 +209,8 @@
      se_mutex_t m_ecdsa_blob_mutex;
  
      sgx_ql_request_policy_t m_load_policy;

  * Added include user_types.h in sgx_ql_ecdsa_quote.h
  * Added sgx_qe_set_enclave_dirpath to set the directory paths for both the
    PCE and QE.
--
diff -Nur -x '*.png' -x '*.gif' -x .gitignore QuoteGeneration/common/inc/internal/se_map.h QuoteGeneration/common/inc/internal/se_map.h
--- QuoteGeneration/common/inc/internal/se_map.h

         m_eid(0),
         m_pencryptedppid(NULL)
     {
@@ -196,7 +245,10 @@
     }
 };
 
