gnats-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to gnats/libiberty/choose-temp.c


From: Milan Zamazal
Subject: Changes to gnats/libiberty/choose-temp.c
Date: Mon, 10 Dec 2001 18:04:14 -0500

Index: gnats/libiberty/choose-temp.c
diff -c gnats/libiberty/choose-temp.c:1.2 gnats/libiberty/choose-temp.c:1.3
*** gnats/libiberty/choose-temp.c:1.2   Tue Oct 26 03:10:16 1999
--- gnats/libiberty/choose-temp.c       Mon Dec 10 18:03:27 2001
***************
*** 19,27 ****
  
  /* This file exports two functions: choose_temp_base and make_temp_file.  */
  
- /* This file lives in at least two places: libiberty and gcc.
-    Don't change one without the other.  */
- 
  #ifdef HAVE_CONFIG_H
  #include "config.h"
  #endif
--- 19,24 ----
***************
*** 34,39 ****
--- 31,39 ----
  #ifdef HAVE_STDLIB_H
  #include <stdlib.h>
  #endif
+ #ifdef HAVE_STRING_H
+ #include <string.h>
+ #endif
  #ifdef HAVE_SYS_FILE_H
  #include <sys/file.h>   /* May get R_OK, etc. on some systems.  */
  #endif
***************
*** 79,87 ****
     If success, DIR is returned.
     Otherwise NULL is returned.  */
  
! static char *
  try (dir, base)
!      char *dir, *base;
  {
    if (base != 0)
      return base;
--- 79,89 ----
     If success, DIR is returned.
     Otherwise NULL is returned.  */
  
! static const char *try PARAMS ((const char *, const char *));
! 
! static const char *
  try (dir, base)
!      const char *dir, *base;
  {
    if (base != 0)
      return base;
***************
*** 102,108 ****
  char *
  choose_temp_base ()
  {
!   char *base = 0;
    char *temp_filename;
    int len;
    static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
--- 104,110 ----
  char *
  choose_temp_base ()
  {
!   const char *base = 0;
    char *temp_filename;
    int len;
    static char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
***************
*** 145,153 ****
  
  char *
  make_temp_file (suffix)
!      char *suffix;
  {
!   char *base = 0;
    char *temp_filename;
    int base_len, suffix_len;
    int fd;
--- 147,155 ----
  
  char *
  make_temp_file (suffix)
!      const char *suffix;
  {
!   const char *base = 0;
    char *temp_filename;
    int base_len, suffix_len;
    int fd;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]