From: "Jerome Marc" <marcjero@yahoo.com>
To: "Billinghurst, David \(CRTS\)" <David.Billinghurst@riotinto.com>
Cc: java@gcc.gnu.org
Subject: RE: HAVE_TIMEZONE and cygwin
Date: Thu, 02 May 2002 01:07:00 -0000 [thread overview]
Message-ID: <20020502080726.37085.qmail@web10808.mail.yahoo.com> (raw)
In-Reply-To: <FAC87D7C874EAB46A847604DA4FD5A6402F811@crtsmail.corp.riotinto.org>
Nice job David. Have to be tested now.
--- "Billinghurst, David (CRTS)"
<David.Billinghurst@riotinto.com> a écrit : > Here is
an untested patch for configure.in (trunk).
> I have autoconf version
> problems, so this will have to do at present. The
> code fragments do the right
> thing.
>
> Compiling this fails
> #include <time.h>
> void i(){long z2 = 2*timezone;}
>
> but this is OK
> #include <time.h>
> long z2 = _timezone;
>
> 2002-05-02 David Billinghurst
> <David.Billinghurst@riotinto.com>
>
> * configure.in: Adjust test for HAVE_TIMEZONE so it
> fails
> on cygwin. Add test HAVE_UNDERSCORE_TIMEZONE.
>
> Index: configure.in
>
===================================================================
> RCS file: /cvs/gcc/gcc/libjava/configure.in,v
> retrieving revision 1.129
> diff -u -r1.129 configure.in
> --- configure.in 21 Apr 2002 09:37:48 -0000
> 1.129
> +++ configure.in 2 May 2002 05:19:36 -0000
> @@ -852,10 +852,17 @@
> dnl FIXME: we don't want a link check here
> because that won't work
> dnl when cross-compiling. So instead we make an
> assumption that
> dnl the header file will mention timezone if it
> exists.
> - AC_TRY_COMPILE([#include <time.h>], [long z2 =
> timezone;],
> + dnl Don't find the win32 function timezone
> + AC_TRY_COMPILE([#include <time.h>], [void
> i(){long z2 = 2*timezone;}],
> [AC_DEFINE(HAVE_TIMEZONE)
> AC_MSG_RESULT(yes)],
> - [AC_MSG_RESULT(no)])])
> + [AC_MSG_RESULT(no)
> + AC_MSG_CHECKING([for global _timezone
> variable])
> + dnl FIXME: As above, don't want link check
> + AC_TRY_COMPILE([#include <time.h>], [long z2
> = _timezone;],
> + [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE)
> + AC_MSG_RESULT(yes)],
> + [AC_MSG_RESULT(no)])])])
>
> AC_FUNC_ALLOCA
>
> -----Original Message-----
> From: Billinghurst, David (CRTS)
> Sent: Thursday, 2 May 2002 2:18
> To: java@gcc.gnu.org
> Subject: HAVE_TIMEZONE and cygwin
>
>
> The cygwin patch for natSystem.cc
>
(http://gcc.gnu.org/ml/java-patches/2002-q2/msg00252.html)
>
> probably should read something like
>
> #elif HAVE_UNDERSCORE_TIMEZONE
> tzoffset = _timezone;
> #elif HAVE_TIMEZONE
> // timezone is secs WEST of UTC.
> tzoffset = timezone;
> #else
> // FIXME: there must be another global if neither
> tm_gmtoff nor timezone
> // is available, esp. if tzname is valid.
>
>
> To do this we need to add to libjava/configure.in
> a test something like
>
> AC_TRY_COMPILE([#include <time.h>], [long z2 =
> _timezone;],
> [AC_DEFINE(HAVE_UNDERSCORE_TIMEZONE)
> AC_MSG_RESULT(yes)],
> [AC_MSG_RESULT(no)])])
>
> and preferably get the existing test
>
> AC_TRY_COMPILE([#include <time.h>], [long z2 =
> timezone;],
> [AC_DEFINE(HAVE_TIMEZONE)
> AC_MSG_RESULT(yes)],
> [AC_MSG_RESULT(no)])])
>
> to fail for the cygwin <time.h> which has
> char *_EXFUN(timezone, (void));
>
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
next prev parent reply other threads:[~2002-05-02 8:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-01 22:29 Billinghurst, David (CRTS)
2002-05-02 1:07 ` Jerome Marc [this message]
2002-05-02 11:09 ` Tom Tromey
-- strict thread matches above, loose matches on Subject: below --
2002-05-02 16:12 Billinghurst, David (CRTS)
2002-05-01 21:21 Billinghurst, David (CRTS)
2002-05-02 13:34 ` Anthony Green
2002-05-03 8:54 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020502080726.37085.qmail@web10808.mail.yahoo.com \
--to=marcjero@yahoo.com \
--cc=David.Billinghurst@riotinto.com \
--cc=java@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).