[tor-dev] Mingw ann non-autoconf build

Gisle Vanem gvanem at broadpark.no
Thu Apr 28 12:29:53 UTC 2011


I have a question regarding src/win32/orconfig.h. I guess this hand-
edited file is supposed to be used by MSVC (targeting Win32, WinCE and
whatnot). Or? What prevents it from being used by e.g. MingW in a non-
autoconf build? 

If someone (like me that doesn't want to touch autotool with a ten-feet
pole) want to use this file unchanged, things like:
  #undef HAVE_SYS_TIME_H

has to be treated specifically for MingW. E.g.:
  #ifndef __MINGW32__
  #undef HAVE_SYS_TIME_H
  #endif

Same goes for HAVE_UNISTD_H, HAVE_GETTTIMEOFDAY etc.

BTW. Older MingW does not have gettimeofday(). I'm not sure
when the function was added. So to be perfect, an "#ifndef" test 
should consider the __MINGW32_VERSION too.

--gv

For every credibility gap, there is a gullibility fill.


More information about the tor-dev mailing list