This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libjava configuration problems
- To: gcc-bugs at gcc dot gnu dot org, java-discuss at sources dot redhat dot com
- Subject: libjava configuration problems
- From: Richard Earnshaw <rearnsha at arm dot com>
- Date: Wed, 24 Jan 2001 16:18:58 +0000
- cc: rearnsha at arm dot com
- Organization: ARM Ltd.
- Reply-To: rearnsha at arm dot com
I'm trying to get libjava working on an arm-netbsd target and have run
into the following problem whilst building libjava.
Autoconf has a test for a variable called timezone, which it tests with
AC_TRY_COMPILE([#include <time.h>], [long z2 = timezone;],
[AC_DEFINE(HAVE_TIMEZONE)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)])])
Unfortunately this test passes on NetBSD when it should fail. timezone
exists, but is a function not a variable. When g++ comes to compile
java/lang/natSystem.cc we then get a build failure
/home/rearnsha/gnusrc/egcs/libjava/java/lang/natSystem.cc: In static
member
function `static java::lang::String*
java::lang::System::getSystemTimeZone()':
/home/rearnsha/gnusrc/egcs/libjava/java/lang/natSystem.cc:251: cannot
convert
`char*()(int, int)' to `long int' in assignment
Any ideas how to fix the test for this?
$ man timezone
NAME
timezone - return the timezone abbreviation
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
char *
timezone(int zone, int dst);
DESCRIPTION
This interface is available for compatibility; it is impossible to
reli-
ably map timezone's arguments to a time zone abbreviation. See
ctime(3).
The timezone() function returns a pointer to a time zone abbreviation
for
the specified zone and dst values. Zone is the number of minutes
west of
GMT and dst is non-zero if daylight savings time is in effect.
SEE ALSO
ctime(3)
HISTORY
A timezone() function appeared in Version 7 AT&T UNIX.
R.