[485] in SIPB_Linux_Development
patches to track for Linux and NetBSD
daemon@ATHENA.MIT.EDU (Jim Haynes)
Tue Mar 1 00:44:08 1994
From: haynes@cats.ucsc.edu (Jim Haynes)
Date: Mon, 28 Feb 1994 21:43:44 -0800
To: linux-dev@MIT.EDU
thanks to Brian Buhrow
*** 4.6 1991/07/22 01:27:20
--- track.h 1994/02/24 01:58:47
***************
*** 1,5 ****
/*
! * $Id: track.h,v 4.6 1991/07/22 01:27:20 probe Exp $
*/
#include "bellcore-copyright.h"
--- 1,5 ----
/*
! * $Id: track.h,v 4.9 1994/02/24 01:58:41 buhrow Exp $
*/
#include "bellcore-copyright.h"
***************
*** 15,20 ****
--- 15,21 ----
#include <signal.h>
#include <stdio.h>
+
/* Default working directory - under to- or from- root */
#define DEF_WORKDIR "/usr/athena/lib"
***************
*** 178,184 ****
--- 179,189 ----
extern int access();
extern char errmsg[];
+ #if !defined(__NetBSD__) && !defined(linux)
char *gets(),*calloc(),*malloc(),*realloc(),*re_comp();
+ #else
+ char *gets(),*calloc(),*realloc(),*re_comp();
+ #endif /*__NetBSD__*/
char *index(),*rindex(),*strcat(),*strncat(),*strcpy(),*strncpy();
int strcmp(),strncmp(),strlen();
long time();
*** 4.10 1991/07/18 12:51:31
--- track.c 1994/02/24 00:21:26
***************
*** 1,8 ****
/*
* $Source: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v $
! * $Header: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v 4.10 1991/07/18 12:51:31 epeisach Exp $
*
* $Log: track.c,v $
* Revision 4.10 1991/07/18 12:51:31 epeisach
* Under ultrix we try umounting "/" as it has been determined that the
* filesystem will not cleanup itself of inodes which are in the text cache
--- 1,11 ----
/*
* $Source: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v $
! * $Header: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v 4.11 1994/02/24 00:21:20 buhrow Exp $
*
* $Log: track.c,v $
+ * Revision 4.11 1994/02/24 00:21:20 buhrow
+ * Added linux stuff
+ *
* Revision 4.10 1991/07/18 12:51:31 epeisach
* Under ultrix we try umounting "/" as it has been determined that the
* filesystem will not cleanup itself of inodes which are in the text cache
***************
*** 150,156 ****
*/
#ifndef lint
! static char *rcsid_header_h = "$Header: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v 4.10 1991/07/18 12:51:31 epeisach Exp $";
#endif lint
#include "bellcore-copyright.h"
--- 153,159 ----
*/
#ifndef lint
! static char *rcsid_header_h = "$Header: /sysdev/source/athena/athena/athena.etc/track/RCS/track.c,v 4.11 1994/02/24 00:21:20 buhrow Exp $";
#endif lint
#include "bellcore-copyright.h"
***************
*** 178,184 ****
char statfilepath[LINELEN]; /* pathname to statfile */
FILE *statfile; /* the statfile! */
Statline *statfilebufs; /* array of line buffers for sort() */
! int cur_line; /* index into statfilebufs */
unsigned maxlines = 0; /* max # lines in statfile buf array.
* write_statline maintains maxlines */
unsigned stackmax = STACKMAX; /* max depth of pathname-stack vars */
--- 181,187 ----
char statfilepath[LINELEN]; /* pathname to statfile */
FILE *statfile; /* the statfile! */
Statline *statfilebufs; /* array of line buffers for sort() */
! int cur_line = 0; /* index into statfilebufs */
unsigned maxlines = 0; /* max # lines in statfile buf array.
* write_statline maintains maxlines */
unsigned stackmax = STACKMAX; /* max depth of pathname-stack vars */
***************
*** 530,536 ****
* flush the kernel's text-table,
* to ensure that the vnodes we've freed get scavenged,
*/
! #if !defined(ultrix) && !defined(_AIX)
unmount("/"); /* XXX */
#endif
#ifdef ultrix
--- 533,539 ----
* flush the kernel's text-table,
* to ensure that the vnodes we've freed get scavenged,
*/
! #if !defined(ultrix) && !defined(_AIX) && !defined(linux)
unmount("/"); /* XXX */
#endif
#ifdef ultrix
*** 4.8 1991/09/14 07:21:04
--- files.c 1994/02/24 00:18:11
***************
*** 1,8 ****
/*
* $Source: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v $
! * $Header: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v 4.8 1991/09/14 07:21:04 haynes Exp $
*
* $Log: files.c,v $
* Revision 4.8 1991/09/14 07:21:04 haynes
* changed "named pipe" to "fifo"
*
--- 1,14 ----
/*
* $Source: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v $
! * $Header: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v 4.10 1994/02/24 00:18:06 buhrow Exp $
*
* $Log: files.c,v $
+ * Revision 4.10 1994/02/24 00:18:06 buhrow
+ * Added linux stuff
+ *
+ * Revision 4.9 1994/02/22 22:35:53 buhrow
+ * Added NetBSD ifdefs.
+ *
* Revision 4.8 1991/09/14 07:21:04 haynes
* changed "named pipe" to "fifo"
*
***************
*** 65,71 ****
*/
#ifndef lint
! static char *rcsid_header_h = "$Header: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v 4.8 1991/09/14 07:21:04 haynes Exp $";
#endif lint
#include "mit-copyright.h"
--- 71,77 ----
*/
#ifndef lint
! static char *rcsid_header_h = "$Header: /sysdev/source/athena/athena/athena.etc/track/RCS/files.c,v 4.10 1994/02/24 00:18:06 buhrow Exp $";
#endif lint
#include "mit-copyright.h"
***************
*** 311,317 ****
fprintf(stderr,"removing %s %s\n",type_str,name);
}
if ( type == S_IFDIR);
! #ifdef i386
else if ( unlink( name) == -1 && rmslink(name) == -1) {
#else
else if ( unlink( name)) {
--- 317,323 ----
fprintf(stderr,"removing %s %s\n",type_str,name);
}
if ( type == S_IFDIR);
! #if defined (i386) && !defined(__NetBSD__) && !defined(linux)
else if ( unlink( name) == -1 && rmslink(name) == -1) {
#else
else if ( unlink( name)) {