Menu ▾ ▴

Suggestion for Timezone Problem with Cygwin

mdevenish
2004-09-19
2013-03-12
  • mdevenish

    mdevenish - 2004-09-19

    Hi,

    Regarding the timezone compilation problem under Cygwin, I've searched the Cygwin mailing list, and other lists with Google, and this seems to be an issue with Cygwin and not windows (as was suggested on the Evolution devel mailing list). Apparently Cygwin uses the BSD timezone definition of _timezone instead of timezone (without the underscore), as mentioned in this message:

    http://cygwin.com/ml/cygwin/2004-02/msg00458.html

    Other relevant messages on the Cygwin and other mailing lists can be found here:

    http://gcc.gnu.org/ml/java/2002-04/msg00415.html
    http://www.mail-archive.com/nmh-workers@mhost.com/msg00618.html
    http://cygwin.com/ml/cygwin/2002-03/msg01452.html
    http://cygwin.com/ml/cygwin/2002-03/msg01460.html

    The solution seems to be to define the timezone variable as follows (or something similar):
    #ifndef timezone
    #define timezone ((long int) _timezone)
    #endif

    with _timezone declared elsewhere,
    extern __IMPORT time_t _timezone;

    I hope these suggestions are of use to help you get Evolution running under windows. I'm only a beginner at c/c++ development (mostly used java and php) so haven't tried editing the Evolution code to get around the timezone issue.

    There's also a program called tzselect in the /usr/sbin directory of Cygwin which may need to be run to set the TZ value.

    If the above suggestions and links don't help, its probably worth emailing the Cygwin mailing list for any other suggestions.

    It may also be worthwhile asking the Evolution devel list again as the timezone issue seems to be more of BSD issue rather than windows.

    BTW, Gnome 2.8 packages are presently being added to Cygwin,

    http://www.cygwin.com/ml/cygwin-apps/2004-09/msg00102.html

    which should make compilation easier.

     
    • mdevenish

      mdevenish - 2004-09-26

      Hi,

      Further to my previous message, I've found that by editing line 154 in the configure.in file to check for _timezone instead of timezone (without the underscore), then running autoconf, appears to work. On my machine configure runs through the timezone checking ok but stops when it can't find some Gnome libs.

      The following is the original section of the configure.in file :

          AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
              AC_TRY_COMPILE([
                  #include <time.h>
              ], [
                  timezone = 1;
              ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))

      and this is the edited version where I changed "timezone = 1;" to "_timezone = 1;"

      AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
              AC_TRY_COMPILE([
                  #include <time.h>
              ], [
                  _timezone = 1;
              ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))

      Looking at the rest of the configure.in file, this change to using _timezone should really come in another if statement. I haven't tried this yet as I don't know if making this change breaks something later on.

      The time.h file in /usr/include already has a check for defining timezone based on _timezone, so this wont need to be added as I had previously thought.
      #ifndef timezone
      #define timezone ((long int) _timezone)
      #endif

       

Log in to post a comment.