Changeset 251 for trunk/include


Ignore:
Timestamp:
05/05/11 21:34:35 (13 years ago)
Author:
tim
Message:

simplified NTTIME storage and conversions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r250 r251  
    191191 */
    192192 /* Minimum time is Jan 1, 1990 00:00:00 */
    193 #define REGFI_MTIME_MIN_HIGH       0x01B41E6D
     193#define REGFI_MTIME_MIN            0x01B41E6D00000000L
    194194
    195195 /* Maximum time is Jan 1, 2290 00:00:00
    196196  * (We hope no one is using Windows by then...)
    197197  */
    198 #define REGFI_MTIME_MAX_HIGH       0x03047543
     198#define REGFI_MTIME_MAX            0x0304754300000000L
    199199
    200200
     
    270270                    : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
    271271#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
    272 #define TIME_FIXUP_CONSTANT (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
     272#define REGFI_TIME_FIXUP (369.0*365.25*24*60*60-(3.0*24*60*60+6.0*60*60))
    273273
    274274
     
    278278/******************************************************************************/
    279279
    280 typedef struct _regfi_nttime
    281 {
    282   uint32_t low;
    283   uint32_t high;
    284 } REGFI_NTTIME;
    285 
     280typedef uint64_t REGFI_NTTIME;
    286281
    287282typedef struct _regfi_log
     
    17311726/* XXX: move to base API and document */
    17321727_EXPORT()
    1733 void                  regfi_unix2nt_time(REGFI_NTTIME* nt, time_t t);
    1734 _EXPORT()
    1735 double                regfi_nt2unix_time(const REGFI_NTTIME* nt);
     1728REGFI_NTTIME          regfi_unix2nt_time(time_t t);
     1729_EXPORT()
     1730double                regfi_nt2unix_time(REGFI_NTTIME nt);
    17361731
    17371732
Note: See TracChangeset for help on using the changeset viewer.