open_read (const char *filename)
{
  int fd;

  if (filename[0] == '-' && !filename[1])
    {
      set_binary (stdin);
      return 0; /* stdin */
    }
  fd = check_special_filename (filename, 0);
  if (fd != -1)
    return fd;
  fd = open (filename, O_RDONLY | O_BINARY);
  if (fd == -1)
    {
      log_error (_("can't open '%s': %s\n"), filename, strerror (errno));
      gpgsm_exit (2);
    }
  return fd;
}
open_read (const char *filename)
{
  int fd;

  if (filename[0] == '-' && !filename[1])
    {
      set_binary (stdin);
      return 0;  
    }
  fd = check_special_filename (filename, 0);
  if (fd != -1)
    return fd;
  fd = open (filename, O_RDONLY | O_BINARY);
  if (fd == -1)
    {
      log_error (_("can't open '%s': %s\n"), filename, strerror (errno));
      gpgsm_exit (2);
    }
  return fd;
}