From: Maurizio M. <Mau...@sp...> - 2014-10-03 15:47:43
|
The Windows-OpenACS distribution which I make available here (http://www.spazioit.com/pages_en/sol_inf_en/windows-openacs_en/) is based on AOLServer 4.5.2, contains the sources, is compiled with Visual Studio 2013 and runs on Windows 64. So if I where you I would give a look at that distribution and see how all those time related functions have been handled. That could save you some time. Maurizio -----Original Message----- From: Andrew Piskorski [mailto:at...@pi...] Sent: 03 October 2014 16:49 To: nav...@li... Subject: Re: [naviserver-devel] Naviserver hangs on Windows Hm, the old AOLserver 4.0.7 version of Ns_GetTime() had a Windows ifdef which is entirely missing from Naviserver! (See below.) I found two relevant commits in Mercurial, from 2009 and 2012, below. >From those logs, it looks like what happened is that in 2009, Zoran removed the platform specific C code and instead made Naviserver call Tcl_GetTime (somehow). Then in 2012, Gustaf added back the old Unix-specific gettimeofday() implementation for performance reasons. So should we just add back the old Windows-specific C implementation too? Or is it better to use Zoran's way of invoking Tcl_GetTime? Do we even know for sure if that method really is "platform-independent" as Zoran thought it was? E.g., did Zoran or someone else at Archiware test it on Windows? Part of Ns_GetTime() from ancient AOLserver 4.0.7 sources: ------------------------------------------------------------ #ifdef _WIN32 /* * Number of 100 nanosecond units from 1/1/1601 to 1/1/1970 */ #define EPOCH_BIAS 116444736000000000i64 union { unsigned __int64 i; FILETIME s; } ft; GetSystemTimeAsFileTime(&ft.s); timePtr->sec = (time_t)((ft.i - EPOCH_BIAS) / 10000000i64); timePtr->usec =(long)((ft.i / 10i64) % 1000000i64); #else #endif changeset: 2435:16508ab4b3de user: Gustaf Neumann <ne...@wu...> date: Fri Nov 02 01:54:38 2012 +0100 files: configure.in include/nsconfig.h.in nsthread/time.c description: use gettimeofday() if available instead of the rount trip to tcl changeset: 2009:4bf1ee6ebf84 user: Zoran Vasiljevic <zv...@ar...> date: Sat Sep 29 14:14:03 2007 +0100 files: ChangeLog nsproxy/nsproxylib.c nsthread/time.c description: Ns_GetTime now relies on Tcl_GetTime to be platform-independent -- Andrew Piskorski <at...@pi...> ---------------------------------------------------------------------------- -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ naviserver-devel mailing list nav...@li... https://lists.sourceforge.net/lists/listinfo/naviserver-devel |