httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/time/unix time.c
Date Mon, 10 Jan 2000 07:15:31 GMT
bjh         00/01/09 23:15:31

  Modified:    src/lib/apr/file_io/os2 dir.c
               src/lib/apr/time/unix time.c
  Log:
  OS/2: Migrate directory API to new style ap_time_t
  
  Revision  Changes    Path
  1.4       +2 -2      apache-2.0/src/lib/apr/file_io/os2/dir.c
  
  Index: dir.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/dir.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- dir.c	1999/10/06 23:03:42	1.3
  +++ dir.c	2000/01/10 07:15:30	1.4
  @@ -165,10 +165,10 @@
   
   
   
  -ap_status_t ap_dir_entry_mtime(time_t *time, struct dir_t *thedir)
  +ap_status_t ap_dir_entry_mtime(ap_time_t *time, struct dir_t *thedir)
   {
       if (thedir->validentry) {
  -        *time = os2date2unix(thedir->entry.fdateLastWrite, thedir->entry.ftimeLastWrite);
  +        ap_os2_time_to_ap_time(time, thedir->entry.fdateLastWrite, thedir->entry.ftimeLastWrite);
           return APR_SUCCESS;
       }
   
  
  
  
  1.18      +24 -0     apache-2.0/src/lib/apr/time/unix/time.c
  
  Index: time.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/time.c,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- time.c	2000/01/09 20:58:25	1.17
  +++ time.c	2000/01/10 07:15:30	1.18
  @@ -294,3 +294,27 @@
       return APR_SUCCESS;
   }
   
  +
  +
  +#ifdef OS2
  +#define INCL_DOS
  +#include <os2.h>
  +
  +ap_status_t ap_os2_time_to_ap_time(ap_time_t *result, FDATE os2date, FTIME os2time)
  +{
  +  struct tm tmpdate;
  +
  +  memset(&tmpdate, 0, sizeof(tmpdate));
  +  tmpdate.tm_hour  = os2time.hours;
  +  tmpdate.tm_min   = os2time.minutes;
  +  tmpdate.tm_sec   = os2time.twosecs * 2;
  +
  +  tmpdate.tm_mday  = os2date.day;
  +  tmpdate.tm_mon   = os2date.month - 1;
  +  tmpdate.tm_year  = os2date.year + 80;
  +  tmpdate.tm_isdst = -1;
  +
  +  *result = mktime(&tmpdate) * AP_USEC_PER_SEC;
  +  return APR_SUCCESS;
  +}
  +#endif
  
  
  

Mime
View raw message