[comp.os.minix] minor patch for "LHarc for MINIX" by Fred van Kempen

nemossan@uitec.ac.jp (Sakurao NEMOTO) (11/21/90)

This is a minor patch for "LHarc for MINIX" by Fred van Kempen.

/*  V1.02  MINIX modifications for MINIX 1.5.10 1990.06.24  F.van Kempen*/


This report is originally presented to the Japanese commercial BBS, Nikkei-
MIX, sister BBS of BIX in the States, and is written by ytogashi@mix.  This
article is presented to minix-SIG, "minix/fixes" area.  Because the orginal
sender has difficuluties to post it to "comp.os.minix", thus I'll post it,
for this patch is made according to the MINIX-installation by Fred van Kempen
and presented here.

---------------------------------------------------------------------------
I always use thankful for "LHarc" for space-saving, etc, etc.  And in MINIX
also, I'm using it with thanks both to Fred and Yoshizaki.

But in case of usage under MINIX, it occurs incorrect output, when displayed
time-stamp of [Generic] (dos) formatted files.  This is because MINIX uses
16-bits integer.  This patch corrects this, and even you use "Time-Zone" set-
ting, LHarc after this patch will outputs same as used LHarc in dos, like
original specification of LHarc.


--------cut here--------cut here--------cut here--------cut here--------
echo x - lharc.cdif
sed '/^X/s///' > lharc.cdif << '/'
X*** lharc.c.org	Fri Jul 13 20:17:16 1990
X--- lharc.c	Fri Nov  2 16:47:53 1990
X***************
X*** 828,829 ****
X--- 828,832 ----
X  
X+ #ifdef	_MINIX
X+ extern	time_t timezone;
X+ #endif
X  
X***************
X*** 833,835 ****
X  #ifdef _MINIX
X!    return(time((time_t *)NULL));
X  #else
X--- 836,839 ----
X  #ifdef _MINIX
X!    tzset();
X!    return(timezone);
X  #else
X***************
X*** 890,892 ****
X    /* Knowing the days, we can find seconds */
X!   longtime = (((days * 24) + hour) * 60 + min) * 60 + sec;
X    longtime += gettz ();      /* adjust for timezone */
X--- 894,896 ----
X    /* Knowing the days, we can find seconds */
X!   longtime = ((( (long)days * 24) + hour) * 60 + min) * 60 + sec;
X    longtime += gettz ();      /* adjust for timezone */
/
--------cut here--------cut here--------cut here--------cut here--------

	original author:    ytogashi@mix

		Nov 21 '90 (Wed) 14:24 JST(+9:00)   nemossan@uitec.ac.jp