2008-10-23 Gonzalo Paniagua Javier <gonzalo@novell.com>
[mono.git] / mono / io-layer / timefuncs.h
index 6f13e8b13fc0e6c782abba2ee01d047358b50ee3..2097b85788c644c690baa7103c167bd05c27a21e 100644 (file)
 
 #include "mono/io-layer/wapi.h"
 
+G_BEGIN_DECLS
+
+/* The typical idiom for this struct is to cast it to and from 64bit
+ * ints, hence the endian switch.
+ */
 typedef struct 
 {
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+       guint32 dwHighDateTime;
+       guint32 dwLowDateTime;
+#else
        guint32 dwLowDateTime;
        guint32 dwHighDateTime;
+#endif
 } WapiFileTime;
 
 extern gboolean QueryPerformanceCounter(WapiLargeInteger *count);
 extern gboolean QueryPerformanceFrequency(WapiLargeInteger *freq);
 extern guint32 GetTickCount (void);
 
+G_END_DECLS
 #endif /* _WAPI_TIME_H_ */