home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 28 / amigaformatcd28.iso / -seriously_amiga- / archivers / arcppc / src / patch2b < prev    next >
Text File  |  1998-04-23  |  3KB  |  115 lines

  1. Article 193 of comp.sources.bugs:
  2. Path: um-math!hyc
  3. From: hyc@math.lsa.umich.edu (Howard Chu)
  4. Newsgroups: comp.sources.bugs
  5. Subject: ARC 5.21 Patch #2 - change tmclock.c
  6. Keywords: tmclock.c timezone bsd 4.3
  7. Message-ID: <390@clio.math.lsa.umich.edu>
  8. Date: 2 Aug 88 21:52:35 GMT
  9. Sender: usenet@math.lsa.umich.edu
  10. Reply-To: hyc@math.lsa.umich.edu (Howard Chu)
  11. Organization: University of Michigan Math Dept., Ann Arbor
  12. Lines: 98
  13. UUCP-Path: {mailrus,umix}!um-math!hyc
  14.  
  15. Apparently after applying certain patches to the BSD 4.3 ctime() library, the
  16. function timezone() gets declared in such a way as to conflict with any other
  17. global symbols of the same name. (i.e., someone else reported this to me, but
  18. it didn't happen on our 4.3 BSD Vax. Ah well...) Simple change, please apply
  19. it as well. [The ctime changes fixed the handling of daylight savings time. I
  20. guess our approach to the problem was to wait for the time to be correct, and
  21. then voila - no more problem...  }-)  ]
  22.   -- Howard
  23.  
  24. *** /tmp/,RCSt1a08749    Tue Aug  2 17:44:54 1988
  25. --- tmclock.c    Tue Aug  2 14:17:13 1988
  26. ***************
  27. *** 9,15 ****
  28.    *  -- Howard Chu, August 1 1988      hyc@umix.cc.umich.edu, umix!hyc
  29.    */
  30.   
  31. ! /* $Header: tmclock.c,v 1.2 88/08/01 14:34:38 hyc Exp $ */
  32.   
  33.   /* Julian day number of the Unix* clock's origin, 01 Jan 1970. */
  34.   #define JD1970 2440587L
  35. --- 9,15 ----
  36.    *  -- Howard Chu, August 1 1988      hyc@umix.cc.umich.edu, umix!hyc
  37.    */
  38.   
  39. ! /* $Header: tmclock.c,v 1.3 88/08/02 14:15:58 hyc Exp $ */
  40.   
  41.   /* Julian day number of the Unix* clock's origin, 01 Jan 1970. */
  42.   #define JD1970 2440587L
  43. ***************
  44. *** 17,27 ****
  45.   #if    BSD
  46.   #include <sys/time.h>
  47.   int    daylight;
  48. - long    timezone;
  49.   #else
  50.   #include <time.h>
  51.   #endif
  52.   
  53.   long
  54.   tmjuliandate( tm )
  55.   struct tm *tm;
  56. --- 17,28 ----
  57.   #if    BSD
  58.   #include <sys/time.h>
  59.   int    daylight;
  60.   #else
  61.   #include <time.h>
  62.   #endif
  63.   
  64. + long    tzone;
  65.   long
  66.   tmjuliandate( tm )
  67.   struct tm *tm;
  68. ***************
  69. *** 66,73 ****
  70.   
  71.          gettimeofday(&tp, &tzp);
  72.          daylight=tzp.tz_dsttime;
  73. !        timezone=tzp.tz_minuteswest*(-60);
  74.       }
  75.   #endif
  76.       if ( (sec = tm -> tm_sec) < 0 || sec > 59 ||
  77.           (min = tm -> tm_min) < 0 || min > 59 ||
  78. --- 67,76 ----
  79.   
  80.          gettimeofday(&tp, &tzp);
  81.          daylight=tzp.tz_dsttime;
  82. !        tzone=tzp.tz_minuteswest*(-60);
  83.       }
  84. + #else
  85. +     tzone=timezone;    /* declared as extern in SYSV <time.h> */
  86.   #endif
  87.       if ( (sec = tm -> tm_sec) < 0 || sec > 59 ||
  88.           (min = tm -> tm_min) < 0 || min > 59 ||
  89. ***************
  90. *** 75,81 ****
  91.       return ( -1L );
  92.   
  93.       result = ( hour * 60 + min ) * 60 + sec;
  94. !     result -= timezone;
  95.       if ( daylight )
  96.       result -= 60 * 60;
  97.   
  98. --- 78,84 ----
  99.       return ( -1L );
  100.   
  101.       result = ( hour * 60 + min ) * 60 + sec;
  102. !     result -= tzone;
  103.       if ( daylight )
  104.       result -= 60 * 60;
  105.   
  106. --
  107.   /
  108.  /_ , ,_.                      Howard Chu
  109. / /(_/(__                University of Michigan
  110.     /           Computing Center          College of LS&A
  111.    '              Unix Project          Information Systems
  112.  
  113.  
  114.