contrib/gdb-7/gdb/utils.c
void
perror_with_name (const char *string)
{
  char *err;
  char *combined;

  err = safe_strerror (errno);
  combined = (char *) alloca (strlen (err) + strlen (string) + 3);
  strcpy (combined, string);
  strcat (combined, ": ");
  strcat (combined, err);

  /* I understand setting these is a matter of taste.  Still, some people
     may clear errno but not know about bfd_error.  Doing this here is not
     unreasonable.  */
  bfd_set_error (bfd_error_no_error);
  errno = 0;

  error (_("%s."), combined);
}
/* Print the system error message for errno, and also mention STRING
   as the file name for which the error was encountered.
   Then return to command level.  */
Print the system error message for errno, and also mention STRING
as the file name for which the error was encountered.
Then return to command level.
Print the system error message for errno and also mention STRING as the file name for which the error was encountered . Then return to command level .
void
perror_with_name (const char *string)
{
  char *err;
  char *combined;
  err = safe_strerror (errno);
  combined = (char *) alloca (strlen (err) + strlen (string) + 3);
  strcpy (combined, string);
  strcat (combined, ": ");
  strcat (combined, err);
  bfd_set_error (bfd_error_no_error);
  errno = 0;
  error (_("%s."), combined);
}
void perror_with_name ( const char * string ) { char * err ; char * combined ; err = safe_strerror ( errno ) ; combined = ( char * ) alloca ( strlen ( err ) + strlen ( string ) + 3 ) ; strcpy ( combined , string ) ; strcat ( combined , " " ) ; strcat ( combined , err ) ; bfd_set_error ( bfd_error_no_error ) ; errno = 0 ; error ( _ ( " " ) , combined ) ; }
Print the system error message for errno, and also mention STRING
as the file name for which the error was encountered.
Print the system error message for errno and also mention STRING as the file name for which the error was encountered .
/* I understand setting these is a matter of taste.  Still, some people
     may clear errno but not know about bfd_error.  Doing this here is not
     unreasonable.  */