Ignore:
Timestamp:
Apr 10, 2003, 12:28:07 PM (22 years ago)
Author:
sandervl
Message:

PF: MSVCRT update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/msvcrt/time.c

    r9633 r10005  
    2323#ifdef __WIN32OS2__
    2424#include <emxheader.h>
    25 #include <sys/times.h>
     25#include <unistd.h>
     26#include <time.h>
     27#include <sys\times.h>
    2628#else
    2729#include "config.h"
     
    6365{
    6466  MSVCRT_time_t res;
     67  dprintf(("MSVCRT: mktime"));
    6568  struct tm tm;
    6669
     
    8992 *              _strdate (MSVCRT.@)
    9093 */
    91 char* _strdate(char* date)
     94char* MSVCRT__strdate(char* date)
    9295{
     96  dprintf(("MSVCRT: _strdate"));
    9397  return msvcrt_get_current_time(date,"%m/%d/%y");
    9498}
     
    97101 *              _strtime (MSVCRT.@)
    98102 */
    99 char* _strtime(char* date)
     103char* MSVCRT__strtime(char* date)
    100104{
     105  dprintf(("MSVCRT: _strtime"));
    101106  return msvcrt_get_current_time(date,"%H:%M:%S");
    102107}
     
    110115  clock_t res;
    111116
    112   times(&alltimes);
     117  dprintf(("MSVCRT: clock"));
     118
     119  emx__times(&alltimes);
    113120  res = alltimes.tms_utime + alltimes.tms_stime +
    114121        alltimes.tms_cutime + alltimes.tms_cstime;
     
    124131double MSVCRT_difftime(MSVCRT_time_t time1, MSVCRT_time_t time2)
    125132{
     133    dprintf(("MSVCRT: difftime"));
    126134    return (double)(time1 - time2);
    127135}
     
    133141{
    134142  MSVCRT_time_t curtime = time(NULL);
     143  dprintf(("MSVCRT: time"));
    135144  return buf ? *buf = curtime : curtime;
    136145}
     
    140149 */
    141150#ifdef __WIN32OS2__
    142 void MSVCRT_ftime(struct _timeb *buf)
     151void MSVCRT__ftime(struct _timeb *buf)
    143152#else
    144153void _ftime(struct _timeb *buf)
    145154#endif
    146155{
     156  dprintf(("MSVCRT: _ftime %p",buf));
    147157  buf->time = MSVCRT_time(NULL);
    148158  buf->millitm = 0; /* FIXME */
     
    150160  buf->dstflag = 0;
    151161}
     162
     163/*********************************************************************
     164 *              _daylight (MSVCRT.@)
     165 */
     166int MSVCRT___daylight = 1; /* FIXME: assume daylight */
     167
     168/*********************************************************************
     169 *              __p_daylight (MSVCRT.@)
     170 */
     171void *MSVCRT___p__daylight(void)
     172{
     173        return &MSVCRT___daylight;
     174}
Note: See TracChangeset for help on using the changeset viewer.