Changeset 11311


Ignore:
Timestamp:
Nov 8, 2008, 1:52:16 AM (11 years ago)
Author:
gb
Message:

in lisp_open(): always enable FILE_SHARE_READ|FILE_SHARE_WRITE.
lisp_gettimeofday(): coerce from windows time ourselves.
asinh(), asinhf(): don't negate 0.0 result.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/windows-calls.c

    r11198 r11311  
    188188  SECURITY_ATTRIBUTES sa = {sizeof(SECURITY_ATTRIBUTES), NULL, TRUE};
    189189
    190   if ((flag & S_IREAD) == S_IREAD) {
    191     dwShareMode = FILE_SHARE_READ;
    192   } else {
    193     if ((flag & S_IWRITE) == S_IWRITE) {
    194       dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
    195     }
    196   }
     190  dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE;
    197191
    198192  if ((flag & _O_WRONLY) == _O_WRONLY) {
     
    207201  }
    208202   
    209   if ((flag & S_IREAD) == S_IREAD) {
    210     dwShareMode |= FILE_SHARE_READ;
    211   }
    212   if ((flag & S_IWRITE) == S_IWRITE) {
    213     dwShareMode |= FILE_SHARE_WRITE;
    214   }
    215203
    216204  if ((flag & (_O_CREAT | _O_EXCL)) == (_O_CREAT | _O_EXCL)) {
     
    573561lisp_gettimeofday(struct timeval *tp, void *tzp)
    574562{
    575   return gettimeofday(tp, tzp);
     563  __time64_t now;
     564
     565  gettimeofday(tp,tzp);       /* trust it to get time zone right, at least */
     566  GetSystemTimeAsFileTime((FILETIME*)&now);
     567  now -= UNIX_EPOCH_IN_WINDOWS_EPOCH;
     568  now /= 10000;
     569  tp->tv_sec = now/1000LL;
     570  tp->tv_usec = now%1000LL;
     571  return 0;
    576572}
    577573
     
    647643  z = log1p (z + z * z / (sqrt (z * z + 1.0) + 1.0));
    648644
    649   return ( x > 0.0 ? z : -z);
     645  return ( x >= 0.0 ? z : -z);
    650646}
    651647
     
    672668  z = log1p (z + z * z / (sqrt (z * z + 1.0) + 1.0));
    673669
    674   return ( x > 0.0 ? z : -z);
     670  return ( x >= 0.0 ? z : -z);
    675671}
    676672
Note: See TracChangeset for help on using the changeset viewer.