# File lib/gssapi/lib_gssapi_loader.rb, line 19
    def self.load_mit
      case RUBY_PLATFORM
      when /linux/
        gssapi_lib = 'libgssapi_krb5.so.2'
      when /darwin/
        gssapi_lib = '/usr/lib/libgssapi_krb5.dylib'
      when /mswin|mingw32|windows/
        # Pull the gssapi32 path from the environment if it exist, otherwise use the default in Program Files
        gssapi32_path = ENV['gssapi32'] ? ENV['gssapi32'] : 'C:\Program Files (x86)\MIT\Kerberos\bin\gssapi32.dll'
        ffi_lib gssapi32_path, FFI::Library::LIBC  # Required the MIT Kerberos libraries to be installed
        ffi_convention :stdcall
      else
        raise LoadError, "This platform (#{RUBY_PLATFORM}) is not supported by ruby gssapi and the MIT libraries."
      end
      ffi_lib gssapi_lib, FFI::Library::LIBC

      # -------------------- MIT Specifics -------------------- 
      attach_variable :__GSS_C_NT_HOSTBASED_SERVICE, :GSS_C_NT_HOSTBASED_SERVICE, :pointer # type gss_OID
      attach_variable :__GSS_C_NT_EXPORT_NAME, :GSS_C_NT_EXPORT_NAME, :pointer # type gss_OID
      LibGSSAPI.const_set("GSS_C_NT_HOSTBASED_SERVICE", __GSS_C_NT_HOSTBASED_SERVICE)
      LibGSSAPI.const_set("GSS_C_NT_EXPORT_NAME", __GSS_C_NT_EXPORT_NAME)
    end