anchor.diff:      Name = local_port_name(),
       case load_local_port(Name) of
           {ok, Port} when is_port(Port) ->
  -            {ok, #state{last_port_name = Name,
  +            {ok, #state{file_name = Name,
                           port = Port}};
           {error, Reason} ->
               {stop, Reason}
       end.
   
   %% handle synchronous function calls on the port/port_driver
  -handle_call({call, Command, Msg}, Client,
  +handle_call({call, Command, Message}, Client,
               #state{port = Port,
  -                   replies = Replies} = State)
  -    when is_port(Port), is_list(Msg) ->
  -    case call_port(Port, Msg) of
  +                   replies = Replies} = State) ->
  +    case call_port(Port, Message) of
           ok ->
               {noreply, State#state{replies = Replies ++ [{Command, Client}]}};
           {error, _} = Error ->
  
positive.code:     {error, "Invalid function call"} = erroneous_call(?MODULE),
      ok.
  
  % async thread usage in port driver makes the driver permanent
  % such that the driver can not be upgraded/downgraded during runtime
  % http://www.trapexit.org/forum/viewtopic.php?t=14295&sid=5de3c47e32136682080511d8d95d458e
  %
  % example:
  %> F = test_bindings:do_code_change_function().
  %> F(Pid, test_bindings_new, "vsn-1", {}).
  %
  %do_code_change_function() ->
  %    fun (Pid, NewModule, OldVsn, Extra) ->
  %        c:l(NewModule),
  %        sys:suspend(Pid),
  %        sys:change_code(Pid, NewModule, OldVsn, Extra),
  %        sys:resume(Pid),
  %        code:purge(NewModule)
  %    end.
  
  %%%------------------------------------------------------------------------
  %%% Interface functions from gen_server
  %%%------------------------------------------------------------------------
  
negative.code:     io:format("using port driver~n", []),
      {ok, Path} = load_path(Name ++ ".so"),
      Result = case erl_ddll:load_driver(Path, Name) of
          ok ->
              ok;
          {error, already_loaded} ->
              ok;
          {error, ErrorDesc} ->
              {error, erl_ddll:format_error(ErrorDesc)}
      end,
      if
          Result =:= ok ->
              {ok, erlang:open_port({spawn, Name}, [])};
          true ->
              Result
      end.
  transform_data(D) ->
      D.
  %% only a port driver can perform asynchronous function calls
  %% (you might be able to put a thread pool in an Erlang port, but why bother?)
  call_port_async(Process, Command, Message)
      when is_integer(Command), is_list(Message) ->
      gen_server:cast(Process, {call, Command, Message}).
  -else.
  -ifdef(ERL_PORT_NAME).
  local_port_name() ->
  