~ubuntu-branches/ubuntu/saucy/filezilla/saucy-proposed

« back to all changes in this revision

Viewing changes to src/putty/windows/winsftp.c

  • Committer: Package Import Robot
  • Author(s): Adrien Cunin
  • Date: 2011-12-23 22:57:59 UTC
  • mfrom: (1.1.29)
  • Revision ID: package-import@ubuntu.com-20111223225759-2zxn4dlhkaedq219
Tags: 3.5.2-1ubuntu1
* Sync from Debian unstable
* Re-added debian/patches/02_use-decimal-si-by-default.patch in order to
  comply with UnitsPolicy (the patch got lost in the previous Ubuntu upload)

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 
7
7
#include "putty.h"
8
8
#include "psftp.h"
 
9
#include "ssh.h"
9
10
#include "int64.h"
10
 
#include "ssh.h"
11
11
 
12
12
char *get_ttymode(void *frontend, const char *mode) { return NULL; }
13
13
 
123
123
    return ret;
124
124
}
125
125
 
126
 
#define TIME_POSIX_TO_WIN(t, ft) (*(LONGLONG*)&(ft) = \
127
 
        ((LONGLONG) (t) + (LONGLONG) 11644473600LL) * (LONGLONG) 10000000)
128
 
#define TIME_WIN_TO_POSIX(ft, t) ((t) = (unsigned long) \
129
 
        ((*(LONGLONG*)&(ft)) / (LONGLONG) 10000000 - (LONGLONG) 11644473600LL))
 
126
#define TIME_POSIX_TO_WIN(t, ft) do { \
 
127
    ULARGE_INTEGER uli; \
 
128
    uli.QuadPart = ((ULONGLONG)(t) + 11644473600ull) * 10000000ull; \
 
129
    (ft).dwLowDateTime  = uli.LowPart; \
 
130
    (ft).dwHighDateTime = uli.HighPart; \
 
131
} while(0)
 
132
#define TIME_WIN_TO_POSIX(ft, t) do { \
 
133
    ULARGE_INTEGER uli; \
 
134
    uli.LowPart  = (ft).dwLowDateTime; \
 
135
    uli.HighPart = (ft).dwHighDateTime; \
 
136
    uli.QuadPart = uli.QuadPart / 10000000ull - 11644473600ull; \
 
137
    (t) = (unsigned long) uli.QuadPart; \
 
138
} while(0)
130
139
 
131
140
struct RFile {
132
141
    HANDLE h;