unsupported
  E   ˆl–Ãa¾”ªeJe@ãB¸©‹Fÿ�þZD³r²ËB”¤ó¿„¡¿Ä_�uÐb&=LyZËcõÃÂ ?÷     # encoding: binary
#  Phusion Passenger - https://www.phusionpassenger.com/
#  Copyright (c) 2010-2018 Phusion Holding B.V.
#
#  "Passenger", "Phusion Passenger" and "Union Station" are registered
#  trademarks of Phusion Holding B.V.
#
#  Permission is hereby granted, free of charge, to any person obtaining a copy
#  of this software and associated documentation files (the "Software"), to deal
#  in the Software without restriction, including without limitation the rights
#  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
#  copies of the Software, and to permit persons to whom the Software is
#  furnished to do so, subject to the following conditions:
#
#  The above copyright notice and this permission notice shall be included in
#  all copies or substantial portions of the Software.
#
#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
#  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
#  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
#  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
#  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
#  THE SOFTWARE.

PhusionPassenger.require_passenger_lib 'utils/tmpio'

module PhusionPassenger

  # This module autodetects various platform-specific information, and
  # provides that information through constants.
  module PlatformInfo
  private
    @@cache_dir = nil
    @@verbose   = ['1', 'true', 'on', 'yes'].include?(ENV['VERBOSE'])
    @@log_implementation = lambda do |message|
      message = reindent(message, 3)
      message.sub!(/^   /, '')
      STDERR.puts " * #{message}"
    end

    def self.private_class_method(name)
      metaclass = class << self; self; end
      metaclass.send(:private, name)
    end
    private_class_method :private_class_method

    # Turn the specified class method into a memoized one. If the given
    # class method is called without arguments, then its result will be
    # memoized, frozen, and returned upon subsequent calls without arguments.
    # Calls with arguments are never memoized.
    #
    # If +cache_to_disk+ is true and a cache directory has been set with
    # <tt>PlatformInfo.cache_dir=</tt> then result is cached to a file on disk,
    # so that memoized results persist over multiple process runs. This
    # cache file expires in +cache_time+ seconds (1 hour by default) after
    # it has been written.
    #
    #   def self.foo(max = 10)
    #     rand(max)
    #   end
    #   memoize :foo
    #
    #   foo        # => 3
    #   foo        # => 3
    #   foo(100)   # => 49
    #   foo(100)   # => 26
    #   foo        # => 3
    def self.memoize(method, cache_to_disk = false, cache_time = 3600)
        # We use class_eval here because Ruby 1.8.5 doesn't support class_variable_get/set.
        metaclass = class << self; self; end
        metaclass.send(:alias_method, "_unmemoized_#{method}", method)
        variable_name = "@@memoized_#{method}".sub(/\?/, '')
        check_variable_name = "@@has_memoized_#{method}".sub(/\?/, '')
        eval(%Q{
          #{variable_name} = nil
          #{check_variable_name} = false
        })
        line = __LINE__ + 1
        source = %Q{
          def self.#{method}(*args)                                           # def self.httpd(*args)
            if args.empty?                                                    #   if args.empty?
              if !#{check_variable_name}                                      #     if !@@has_memoized_httpd
                if @@cache_dir                                                #       if @@cache_dir
                  cache_file = File.join(@@cache_dir, "#{method}")            #         cache_file = File.join(@@cache_dir, "httpd")
                end                                                           #       end
        