On 18:24 Thu 11 Jan , Yevgeny Kliteynik wrote: > Hi Sasha, > > Sasha Khapyorsky wrote: > > Hi Yevgeny, > > > > On 09:47 Wed 10 Jan , Yevgeny Kliteynik wrote: > >> Hi Sasha, > >> > >> Sasha Khapyorsky wrote: > >>> Hi Yevgeny, > >>> > >>> On 12:05 Tue 09 Jan , Yevgeny Kliteynik wrote: > >>>> Hi Sasha. > >>>> Thanks for spotting this issue - I missed it when I reviewed the patch. > >>>> Here's how things look in windows: > >>>> * openlog() and closelog() are redefined to nothing in windows config > >>>> header > >>>> * cl_log_event() implementation on windows does all the work - gets > >>>> handler > >>>> to event log, logs the message, and closes the handler. > >>>> It does *not* uses syslog(). > >>>> > >>>> To use syslog/sysopen/sysclose on windows, a user have to install some > >>>> package (e.g. "Interix") that provides various daemons (such as > >>>> syslogd), > >>>> similar to Linux/Unix: > >>>> http://msdn2.microsoft.com/en-us/library/ms811897.aspx#ucmgch10_topic12 > >>>> http://www.interix.com/ > >>> And this is not done for WinOpenSM now. Is this would be useful option? I > >>> guess this could solve a lot of compatibility problems and simplify the > >>> porting dramatically, right? > >> I'll address this question to the windows guys. But I seriously doubt that > >> they would want to make OSM depend on some third-party product, whether it > >> is commercial or free. > > > > I doubt too :(. But ask them if it is not too hard. Interesting, how > > WinOSM development works? AFAIK it is open source and published on the > > net. Who is the maintainer? Is there any active mailing list? > > If the product is commercial, then the answer is no. If it is free, > then there might be some license issues that may cause problems. But > theoretically, if there would be some high-quality free product than > will not pose any legal problems distributing it, and if it will be > *really* useful (not just for logging functions), then it's possible.
So what do you mean - "Interix" has (or may have) legal issues if it will be used with OpenSM? What about pure opensource - http://sourceware.org/pthreads-win32/? It is licensed under LGPL, I see on the net many positive reports about stability and usability. > As for the mailing list it's [EMAIL PROTECTED] You can access > it here: http://openib.org/mailman/listinfo/openib-windows > > >>>> So replacing cl_log_event() with syslog() would definitely cause a > >>>> problem. > >>>> > >>>> A (pretty ugly) solution can be writing a wrapper function to > >>>> cl_log_event() > >>>> on windows and redefining syslog() to use this wrapper. > >>> Like #define syslog() cl_log_event() ? Not so ugly (better than > >>> combination of openlog()/closelog() and "unrelated" cl_log_event()), > >>> and perfectly simple IMO. > >> "#define syslog() cl_log_event()" will not do the job, since these > >> functions > >> have different definitios: > >> syslog(int priority, char *message, ...); > >> cl_log_event(char*, cl_log_type_t, char*, void*, uint32_t); > >> so there should be wrapper just for windows that will prepare the message > >> for cl_log_event() as a single string. > > > > Understood. > > > > And what the purpose of: > > > > #ifdef WIN32 > > OsmReportState(buffer); > > #endif /* WIN32 */ > > > > in osm_log() (right after cl_log_event()/syslog())? > > It reports SM states when SM is running as window service. Could this be moved from common code into syslog() wrapper? Sasha _______________________________________________ openib-general mailing list [email protected] http://openib.org/mailman/listinfo/openib-general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
