*** gp_unifs.c.orig	Tue Dec  2 23:45:17 1997
--- gp_unifs.c	Tue Dec  2 23:46:26 1997
***************
*** 56,61 ****
--- 56,63 ----
  FILE *
  gp_open_scratch_file(const char *prefix, char *fname, const char *mode)
  {	char *temp;
+ 	int fd;
+ 
  	if ( (temp = getenv("TEMP")) == NULL )
  		strcpy(fname, "/tmp/");
  	else
***************
*** 68,75 ****
  	if ( *fname != 0 && fname[strlen(fname) - 1] == 'X' )
  		strcat(fname, "-");
  	strcat(fname, "XXXXXX");
! 	mktemp(fname);
! 	return fopen(fname, mode);
  }
  
  /* Open a file with the given name, as a stream of uninterpreted bytes. */
--- 70,77 ----
  	if ( *fname != 0 && fname[strlen(fname) - 1] == 'X' )
  		strcat(fname, "-");
  	strcat(fname, "XXXXXX");
! 	fd = mkstemp(fname);
! 	return fdopen(fd, mode);
  }
  
  /* Open a file with the given name, as a stream of uninterpreted bytes. */
