[2188] in Source-Commits

home help back first fref pref prev next nref lref last post

athena/etc/track/misc.c thinks fchmod works w/ FILE *

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Thu Oct 16 15:59:34 1997

From: <epeisach@MIT.EDU>
Date: Thu, 16 Oct 1997 15:59:31 -0400
To: source-commits@MIT.EDU


I cleaned up some other things as well, but the fchmod problem is a
doosey...  Also, I have track working on an Alpha. There are several
32 bit assumptions in the sources which I have fixed if anyone is
interested.... 

	Ezra


Index: misc.c
===================================================================
RCS file: /afs/dev.mit.edu/source/repository/athena/etc/track/misc.c,v
retrieving revision 4.3
diff -c -r4.3 misc.c
*** misc.c	1991/02/28 11:28:42	4.3
--- misc.c	1997/10/16 17:13:33
***************
*** 61,67 ****
  
  #ifndef lint
  static char *rcsid_header_h = "$Header: /afs/dev.mit.edu/source/repository/athena/etc/track/misc.c,v 4.3 1991/02/28 11:28:42 epeisach Exp $";
! #endif lint
  
  #include "bellcore-copyright.h"
  #include "mit-copyright.h"
--- 61,67 ----
  
  #ifndef lint
  static char *rcsid_header_h = "$Header: /afs/dev.mit.edu/source/repository/athena/etc/track/misc.c,v 4.3 1991/02/28 11:28:42 epeisach Exp $";
! #endif /* lint */
  
  #include "bellcore-copyright.h"
  #include "mit-copyright.h"
***************
*** 81,87 ****
  	if ( filep);
  	else if ( nopullflag) return;
  	else if ( logfile = fopen( logfilepath, "w+")) {
! 		(void) fchmod( logfile, 0664);
  		filep = logfile;
  	}
  	else {
--- 81,87 ----
  	if ( filep);
  	else if ( nopullflag) return;
  	else if ( logfile = fopen( logfilepath, "w+")) {
! 		(void) fchmod( fileno(logfile), 0664);
  		filep = logfile;
  	}
  	else {
***************
*** 195,201 ****
  savestr(to,from)
  char **to, *from;
  {
! 	if (!(*to = malloc(( unsigned) strlen( from)+1))) {
  		sprintf(errmsg,"ran out of memory during parse");
  		do_panic();
  	}
--- 195,201 ----
  savestr(to,from)
  char **to, *from;
  {
! 	if (!(*to = (char *) malloc(( unsigned) strlen( from)+1))) {
  		sprintf(errmsg,"ran out of memory during parse");
  		do_panic();
  	}

home help back first fref pref prev next nref lref last post