Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-26 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/25, Dalibor Topic [EMAIL PROTECTED] writes:

  But unfortunately, after ./configure I get:
  
  $ grep in_port_t config/config.h
 `in_port_t'. */
  #define in_port_t unsigned unknown
  
  With the original getaddrinfo-1.6,  I get a good definition:
 
 that's weird, I've just checked that all files I checked in (except for
 memset.c) match those from getaddrinfo 1.6. I didn't change configure.in. Could
 you post your config.log somewhere?

Well,  libiconv had something to do with this program.  in_port_t was
made unknown not because conftest returned a wrong result but
because libiconv could not be loaded !?

config.log says:

configure:37193: gcc -o conftest -g -O2 -Wall -Wstrict-prototypes  -DKAFFE_VMDEB
UG  conftest.c   -liconv 5
configure:37311: warning: function declaration isn't a prototype
configure:37193: $? = 0
configure:37193: ./conftest
./conftest: error in loading shared libraries
libiconv.so.2: cannot open shared object file: No such file or directory
configure:37193: $? = 127
configure: program exited with status 127
configure: failed program was:
| #line 37193 configure
| /* confdefs.h.  */
|
| #define PACKAGE_NAME kaffe
| #define PACKAGE_TARNAME kaffe
| #define PACKAGE_VERSION 1.1.x-cvs
| #define PACKAGE_STRING kaffe 1.1.x-cvs
(snip)
| #define HAVE_ICONV 1
| #define ICONV_CONST const
| #define HAVE_INET_NTOP 1
| #define HAVE_INET_PTON 1
| #define HAVE_ARPA_NAMESER_H 1
| #define HAVE_MEMSET 1
| /* end confdefs.h.  */
|
| #include sys/types.h
| #include sys/socket.h
| #include netinet/in.h
| int main() {
|   struct sockaddr_in addr;
|   return (sizeof(addr.sin_port) == sizeof(short)) ? 0 : 1;
| }

LD_LIBRARY_PATH=/usr/local/lib ./configure gave a favorable
result.

$ grep in_port_t config/config.h
   `in_port_t'. */
#define in_port_t unsigned short

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-26 Thread Dalibor Topic
Hi Ito,

--- Ito Kazumitsu [EMAIL PROTECTED] wrote:

 Well,  libiconv had something to do with this program.  in_port_t was
 made unknown not because conftest returned a wrong result but
 because libiconv could not be loaded !?

I've taken that as a hint to update the libiconv detection code to the latest
version from gettext 0.11.3. Could you try again with the current CVS HEAD and
check if it works better?

cheers,
dalibor topic

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-26 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/26, Dalibor Topic [EMAIL PROTECTED] writes:

 I've taken that as a hint to update the libiconv detection code to the latest
 version from gettext 0.11.3. Could you try again with the current CVS HEAD and
 check if it works better?

Thanks a lot.   It works perfectly.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-25 Thread Dalibor Topic
Hi Ito,

--- Ito Kazumitsu [EMAIL PROTECTED] wrote:
 
 In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be
 compiled on old Linux
 on 03/06/24, Dalibor Topic [EMAIL PROTECTED] writes:
 
  done! thanks for the notice.
 
 Thank you.
 
 But unfortunately, after ./configure I get:
 
 $ grep in_port_t config/config.h
`in_port_t'. */
 #define in_port_t unsigned unknown
 
 With the original getaddrinfo-1.6,  I get a good definition:

that's weird, I've just checked that all files I checked in (except for
memset.c) match those from getaddrinfo 1.6. I didn't change configure.in. Could
you post your config.log somewhere?

cheers,
dalibor topic

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-24 Thread Dalibor Topic

--- Ito Kazumitsu [EMAIL PROTECTED] wrote:
 
 In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be
 compiled on old Linux
 on 03/06/17, Ito Kazumitsu [EMAIL PROTECTED] writes:

 And now
 http://www.sra.co.jp/people/m-kasahr/getaddrinfo/getaddrinfo-1.6.tar.gz
 has been released.  From the release news:

 Dalibor,  could you update the files?

done! thanks for the notice.

cheers,
dalibor topic


__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-24 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/24, Dalibor Topic [EMAIL PROTECTED] writes:

 done! thanks for the notice.

Thank you.

But unfortunately, after ./configure I get:

$ grep in_port_t config/config.h
   `in_port_t'. */
#define in_port_t unsigned unknown

With the original getaddrinfo-1.6,  I get a good definition:

$ grep in_port_t Makefile
DEFS = -DPACKAGE_NAME=\\ -DPACKAGE_TARNAME=\\ -DPACKAGE_VERSION=\\ 
-DPACKAGE_STRING=\\ -DPACKAGE_BUGREPORT=\\ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STRINGS_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
-DHAVE_STDLIB_H=1 -DHAVE_MEMCPY=1 -DHAVE_MEMSET=1 -Din_port_t=unsigned\ short 
-DH_ERRNO_DECLARED=1 -DHAVE_GETADDRINFO=1 -DHAVE_LIBRESOLV=1 -DHAVE_LIBNSL=1

I think I will study what makes in_port_t unsigned unknown.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-23 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/17, Ito Kazumitsu [EMAIL PROTECTED] writes:

 I sent the patch to the author of getaddrinfo-1.5.1.  And he said
 he would include it in the next version.

And now http://www.sra.co.jp/people/m-kasahr/getaddrinfo/getaddrinfo-1.6.tar.gz
has been released.  From the release news:

| Major changes in release 1.6
| 
| * Support for RFC3493.
|   Add `sin6_flowinfo' and `sin6_scope_id' to `struct sockaddr_in6'.
| * Check sizes of `in_port_t' and `sa_family_t' strictly.

According to Kasahara, the author, the second change is supposed to enable
some unusual code like:

struct sockaddr_in addr4;
struct sockaddr_in6 addr6;
memcpy((addr4.sin_port), (addr6.sin6_port),
sizeof(in_port_t));

Although kaffe will not need this,  I would like to respect the
author's will.  In order to enable this change,  configure
must be regenerated.  I tried to run autoconf but my autoconf
was too old to accept the scripts.

Dalibor,  could you update the files?

Thank you.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-16 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/13, Ito Kazumitsu [EMAIL PROTECTED] writes:

 In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on 
 old Linux
 on 03/06/13, Dalibor Topic [EMAIL PROTECTED] writes:

  Looks good, please check the dummyin.h patch in, and send it to the getaddrinfo
  maintainer for inclusion in the next version. I don't think the 'fake'comments
  are really necessary, since it's all fake IPv6 support anyway ;)
 
 OK, I will.

I sent the patch to the author of getaddrinfo-1.5.1.  And he said
he would include it in the next version.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-13 Thread Ito Kazumitsu
Hi,

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/06/13, Dalibor Topic [EMAIL PROTECTED] writes:

 Hi Ito,
 
 thanks for the patch!

Sorry,  most of them were useless.

  libraries/clib/net/InetAddressImpl.c.orig
  libraries/clib/net/NetworkInterfaceImpl.c.orig
  libraries/clib/net/PlainSocketImpl.c.orig
  include/getaddrinfo.h.orig

These file can be used as they are.

When I copied files from CVS,  I forgot to copy configure.
And my dirty patches were for the old configure that
did not work.

  include/dummyin6.h.orig

This one needs to be patched.

  5.  make 'CFLAGS=-Din_port_t=int -g -O2 -Wall -Wstrict-prototypes'

With the new configure, I can make without giving -Din_port_t=int.

 Looks good, please check the dummyin.h patch in, and send it to the getaddrinfo
 maintainer for inclusion in the next version. I don't think the 'fake'comments
 are really necessary, since it's all fake IPv6 support anyway ;)

OK, I will.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


back to strtod.c (Was: Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux)

2003-06-13 Thread Dalibor Topic
Hi Ito,

thanks for rechecking everything. 

I'll send some more strtod.c code your way on the weekend to get that last
Double.MIN_VALUE problem out of the way. Do you still have the strtod.c from
NetBSD that worked for you? I'd like to give it a try, since all my previous
attempts didn't really work that well ;(

cheers,
dalibor topic

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-12 Thread Ito Kazumitsu
This is what I did to make kaffe 1.1.0 work with Linux 2.0.38.

1.  tar xzvf kaffe-1.1.0.tar.gz
cd kaffe-1.1.0

2.  Copy from CVS files added or modified since the release of kaffe 1.1.0.

3.  Modify some programs (patch attached below).

libraries/clib/net/InetAddressImpl.c.orig
libraries/clib/net/NetworkInterfaceImpl.c.orig
libraries/clib/net/PlainSocketImpl.c.orig
include/getaddrinfo.h.orig
include/dummyin6.h.orig

4.  ./configure

5.  make 'CFLAGS=-Din_port_t=int -g -O2 -Wall -Wstrict-prototypes'
 ^^^
6.  make check

And I got:


2 of 136 tests failed
(1 tests were not run)
Please report to [EMAIL PROTECTED]


Those tests which failed were:

FAIL: DoublePrint.java
FAIL: Reflect.java

FAIL: DoublePrint.java is a expected result.
And  diff test/regression/Reflect.out test/regression/Reflect.fail is

19c19
 Method: public static native void 
java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int)
---
 Method: public static void 
 java.lang.System.arraycopy(java.lang.Object,int,java.lang.Object,int,int)

which is natural because I used the rt.jar that comes with kaffe 1.1.0
release.

And below is my patch.

--- libraries/clib/net/InetAddressImpl.c.orig   Fri Jun 13 09:01:20 2003
+++ libraries/clib/net/InetAddressImpl.cFri Jun 13 11:35:41 2003
@@ -54,7 +54,7 @@
case java_net_InetAddressImpl_INET_ADDRESS_V4:
retval = AF_INET;
break;
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
case java_net_InetAddressImpl_INET_ADDRESS_V6:
retval = AF_INET6;
break;
@@ -120,7 +120,7 @@
   sizeof(ia));
}
}
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
if( retval == NULL )
{
struct in6_addr ia;
@@ -182,7 +182,7 @@
switch( curr-ai_family )
{
case PF_INET:
-#if defined(PF_INET6)
+#if defined(PF_INET6)  !defined(FAKE_INET6)
case PF_INET6:
 #endif
count += 1;
@@ -196,7 +196,7 @@
curr = ai;
while( curr  retval )
{
-#if defined(PF_INET6)
+#if defined(PF_INET6)  !defined(FAKE_INET6)
struct sockaddr_in6 *in6;
 #endif
struct sockaddr_in *in4;
@@ -222,7 +222,7 @@
retval = 0;
}
break;
-#if defined(PF_INET6)
+#if defined(PF_INET6)  !defined(FAKE_INET6)
case PF_INET6:
in6 = (struct sockaddr_in6 *)
curr-ai_addr;
@@ -377,7 +377,7 @@
 {
 #if defined(HAVE_GETADDRINFO)
struct Hjava_lang_String *retval = 0;
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
struct sockaddr_in6 sa_buf;
struct sockaddr_in6 *sin6 = sa_buf;
 #else
@@ -403,7 +403,7 @@
sin-sin_port = 0;
memcpy(sin-sin_addr, unhand_byte_array(addr), addr-length);
break;
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
case 16:
 #if defined(BSD44)
sin6-sin6_len = sizeof(struct sockaddr_in6);
@@ -518,7 +518,7 @@
case 4:
family = AF_INET;
break;
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
case 16:
family = AF_INET6;
break;
--- libraries/clib/net/NetworkInterfaceImpl.c.orig  Fri Jun 13 09:02:13 2003
+++ libraries/clib/net/NetworkInterfaceImpl.c   Fri Jun 13 11:35:55 2003
@@ -133,7 +133,7 @@
  NII_MAX_ADDRESS_SIZE);
retval = stringC2Java(addr);
break;
-#if defined(AF_INET6)
+#if defined(AF_INET6)  !defined(FAKE_INET6)
case AF_INET6:
inet_ntop(sa-sa_family,
  ((struct sockaddr_in6 *)sa)-
--- libraries/clib/net/PlainSocketImpl.c.orig   Fri Jun 13 09:02:53 2003
+++ libraries/clib/net/PlainSocketImpl.cFri Jun 13 11:36:25 2003
@@ -322,7 +322,7 @@
   sizeof(addr.sin_addr));
break;
 
-#if notnow  defined(AF_INET6)
+#if notnow  defined(AF_INET6)  !defined(FAKE_INET6)
case AF_INET6:
remote_addr = (HArrayOfByte *)newArray(TYPE_CLASS(TYPE_Byte),
   sizeof(in6-sin6_addr));
--- include/getaddrinfo.h.orig  Fri Jun 13 08:49:18 2003
+++ include/getaddrinfo.h   Fri Jun 13 11:30:51 2003
@@ -137,6 +137,7 @@
 

Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-06-03 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/05/30, Dalibor Topic [EMAIL PROTECTED] writes:

 In fact, automake offers bultin support for that using AM_FUNC_STRTOD. I think
 that one is supposed to use the strtod.c from libit (libiberty). If that's the
 source you used, I'll create a patch that lets kaffe use that strtod function,
 in case the system implementation is broken, and post it to the list.

I tried the strtod.c from libiberty that comes with binutils-2.13.2.1,
but found it to be a poor man's strtod which uses atof.  And atof
of my old Linux seems to use its own strtod internally, So it
cannot be of any help: it converts 4.9406564584124654418e-324 to 0.0.

The strtod I am using now is
/*  $NetBSD: strtod.c,v 1.24 1997/03/29 21:05:22 thorpej Exp $  */
which compiles without requiring extra header files.

I am afraid few people are complaining about the poor behavior
of strtod and most people recommend that libc should be updated.
So please do not spend much time on this matter.

Thank you.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-31 Thread Dalibor Topic
hi Ito,

--- Ito Kazumitsu [EMAIL PROTECTED] wrote:

 Supporting Linux 2.0 may be nothing but a burden for developers,
 but for some users it is badly desired.
 
 The following is what I did to make the current kaffe run on my
 old Linux machine.  I would NOT insist that this should be
 officially supported.  This is only for reference.

'Officially' supported depends on someone being around paying attention to the
platform in question and raising/fixing the issues coming up. As long as
someone volunteers to fix the problems on a specific platform, I see no problem
supporting it. Some platforms, like m68k-amigaos, can lie asleep for years
until someone comes along and starts getting them up to speed again. I don't
see a problem with that either. 

It seems like you've done a good deal of work necessary to fix the problems on
linux 2.0, so let's see if we can polish it and make sure it works well. Thanks
for providing the patches and figuring out a way to make it work.

 1. Patch libraries/clib/native/Double.c
 
Strtod() of my Linux is buggy.  So I got a reliable source of
strtod.c from somewhere and put it to libraries/clib/native
and make Double.c include it.

A better way is to use a replacement mechanism like the one used for getifaddr.


In fact, automake offers bultin support for that using AM_FUNC_STRTOD. I think
that one is supposed to use the strtod.c from libit (libiberty). If that's the
source you used, I'll create a patch that lets kaffe use that strtod function,
in case the system implementation is broken, and post it to the list.

 2. Patch replace/getifaddrs.c
 
Old Linux does not have linux/netlink.h and linux/rtnetlink.h.
So I do not expect kaffe to use replace/getifaddrs.c.

I'll happily let Tim deal with the ipv6 stuff ;)

 3. Install getaddrinfo.
 
Get getaddrinfo-1.5.1.tar.gz from
  http://www.sra.co.jp/people/m-kasahr/getaddrinfo/
and compile getaddrinfo.c.  This program provides
getaddrinfo() and getnameinfo().

License is modified BSD without advertising clause, which is GPL compatible, so
it can be merged in. It's up to Tim to decide if and how it should go in, as he
wrote the IPv6 support.

And put getaddrinfo.o to replace/
and patch libraries/clib/net/Makefile.in

Linking should work automatically using AC_LIBOBJ(getaddrinfo)

 That is all.  Kaffe can be built on my old Linux machine and runs on it.
 
 (I am not sure that $(top_builddir)/replace/ is the best place to
 put getaddrinfo.o.)

replace is the 'standard' directory where auto* tools look for replacement
function, afaik. So it should go in there, if Tim 'blesses' it. We'll need a
README file in the replace directory to keep track of where all the files are
coming from ;)

cheers,
dalibor topic

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-31 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux
on 03/05/30, Timothy Stack [EMAIL PROTECTED] writes:

  I have found #define HAVE_GETADDRINFO 1 in config/config.h,
  which must be undefined but configure may have wrongly guessed.
 
 Nope, it looks like it guessed right since it didn't complain about 
 getaddrinfo like it does gai_strerror and getnameinfo.  Thats just 
 messed up, we'll have to add those two to the check.

Oh, yes.

$ nm /usr/lib/libc.a | grep getaddrinfo
getaddrinfo.o:
0570 T getaddrinfo
$ nm /usr/lib/libc.a | grep getnameinfo
$


___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-31 Thread Dalibor Topic
Hi Ito, hi Tim,

--- Timothy Stack [EMAIL PROTECTED] wrote:
 
 hi,
 
 On Thursday, May 29, 2003, at 10:00  PM, Ito Kazumitsu wrote:
 
  The current libraries/clib/net/InetAddressImpl.c and some others
  cannot be compiled on my poor old Linux (2.0.38) machine.
 
  What is wrong:
 
  (1) InetAddressImpl.c checks whether AF_INET6 and PF_INET6 are
  defined.  Yes, they are defined in /usr/include/socketbits.h
  even on my old Linux host.  But it does not support IPv6, so
  struct in6_addr is not defined.
 
 argh

The dummy implementation that Ito used in his patch provides those definitions,
according to the docs. It requires some configure.in macro calls to get them.

from the docs on http://www.sra.co.jp/people/m-kasahr/getaddrinfo/:

2. IPv6 programming supplement

You may want more macros related to IPv6 such as PF_INET6.  For
example, your source might contain a code like this:

if (getaddrinfo(NULL, port_string, hints, res) == 0) {
for (r = res; r != NULL; r = r-ai_next) {
if (r-ai_family != PF_INET  r-ai_family != PF_INET6)
continue;
/* ... */
}
}

`dummyin6.h' provides macros including PF_INET6, types and external
variables used for basic IPv6 programming.  See `dummyin6.h' to know
what it defines.

To use `dummyin6.h', add the following code to `configure.ac' or
`configure.in' of your application.

AC_STRUCT_IN6_ADDR
AC_STRUCT_SOCKADDR_IN6
AC_STRUCT_SOCKADDR_STORAGE
AC_DECL_IN6ADDR_ANY
AC_DECL_IN6ADDR_LOOPBACK
AC_TYPE_SA_FAMILY_T


cheers,
dalibor topic

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-31 Thread Ito Kazumitsu
Hi, 

I [EMAIL PROTECTED] will answer in place of
[EMAIL PROTECTED].

 : == Dalibor Topic [EMAIL PROTECTED] writes:

 1. Patch libraries/clib/native/Double.c
 
 Strtod() of my Linux is buggy.  So I got a reliable source of
 strtod.c from somewhere and put it to libraries/clib/native
 and make Double.c include it.

: A better way is to use a replacement mechanism like the one used
: for getifaddr.

: In fact, automake offers bultin support for that using AM_FUNC_STRTOD.
: I think that one is supposed to use the strtod.c from libit (libiberty).
: If that's the source you used, I'll create a patch that lets kaffe use
: that strtod function, in case the system implementation is broken,
: and post it to the list.

Ito did not know of libiberty and used strtod of BSD origin.
But I hope libiberty should work on his old Linux and Ito will be
happy if he does not have to apply his patch every time he builds
kaffe.  Ito will be looking forward to your patch.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-31 Thread Timothy Stack
On Friday, May 30, 2003, at 08:08  AM, Dalibor Topic wrote:

2. Patch replace/getifaddrs.c

   Old Linux does not have linux/netlink.h and linux/rtnetlink.h.
   So I do not expect kaffe to use replace/getifaddrs.c.
I'll happily let Tim deal with the ipv6 stuff ;)
Just some configure magic i think.

3. Install getaddrinfo.

   Get getaddrinfo-1.5.1.tar.gz from
 http://www.sra.co.jp/people/m-kasahr/getaddrinfo/
   and compile getaddrinfo.c.  This program provides
   getaddrinfo() and getnameinfo().
License is modified BSD without advertising clause, which is GPL 
compatible, so
it can be merged in. It's up to Tim to decide if and how it should go 
in, as he
wrote the IPv6 support.
The existing code already falls back to the old style gethostbyname, 
its just that I didn't bother to check for both getaddrinfo/getnameinfo 
since it seemed like they would always come in pairs.  Simple enough to 
just add a check for getnameinfo too...

cheers,
dalibor topic
tim

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


[kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-30 Thread Ito Kazumitsu
The current libraries/clib/net/InetAddressImpl.c and some others
cannot be compiled on my poor old Linux (2.0.38) machine.

What is wrong:

(1) InetAddressImpl.c checks whether AF_INET6 and PF_INET6 are
defined.  Yes, they are defined in /usr/include/socketbits.h
even on my old Linux host.  But it does not support IPv6, so
struct in6_addr is not defined.

(2) InetAddressImpl.c uses getnameinfo which my old Linux host does not
have.

I am afraid Linux 2.0 should be deleted from the list of
supported systems.

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-30 Thread Kiyo Inaba
The current libraries/clib/net/InetAddressImpl.c and some others
cannot be compiled on my poor old Linux (2.0.38) machine.

Same for me on m68k-linux. 

I am afraid Linux 2.0 should be deleted from the list of supported systems.

Sigh... Then I have to find some other JVM :-

Kiyo

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-30 Thread Ito Kazumitsu

In message Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old 
Linux

 I am afraid Linux 2.0 should be deleted from the list of supported systems.
 
 Sigh... Then I have to find some other JVM :-

Supporting Linux 2.0 may be nothing but a burden for developers,
but for some users it is badly desired.

The following is what I did to make the current kaffe run on my
old Linux machine.  I would NOT insist that this should be
officially supported.  This is only for reference.

1. Patch libraries/clib/native/Double.c

   Strtod() of my Linux is buggy.  So I got a reliable source of
   strtod.c from somewhere and put it to libraries/clib/native
   and make Double.c include it.

--- libraries/clib/native/Double.c.orig Fri Apr 12 21:56:11 2002
+++ libraries/clib/native/Double.c  Fri May 16 12:33:55 2003
@@ -23,6 +23,7 @@
 #include files.h
 #include java_lang_Double.h
 #include native.h
+#include strtod.c
 
 /*
  * Convert a normal double to a string with the supplied precision.

2. Patch replace/getifaddrs.c

   Old Linux does not have linux/netlink.h and linux/rtnetlink.h.
   So I do not expect kaffe to use replace/getifaddrs.c.

--- replace/getifaddrs.c.orig   Fri Feb 21 18:50:49 2003
+++ replace/getifaddrs.cFri Mar  7 08:31:45 2003
@@ -17,6 +17,7 @@
 
 #if defined(HAVE_GETIFADDRS)
 
+/*
 #elif defined(linux)
 
 #if !defined(__set_errno)
@@ -28,6 +29,7 @@
 #endif
 
 #include ifaddrs_linux.c
+*/
 
 #else
 

3. Install getaddrinfo.

   Get getaddrinfo-1.5.1.tar.gz from
 http://www.sra.co.jp/people/m-kasahr/getaddrinfo/
   and compile getaddrinfo.c.  This program provides
   getaddrinfo() and getnameinfo().

   Put getaddrinfo.h to libraries/clib/net/
   Then insert the following lines to 
   libraries/clib/net/InetAddressImpl.c
   libraries/clib/net/NetworkInterfaceImpl.c
   libraries/clib/net/PlainSocketImpl.c

=
#undef AF_INET6
#undef PF_INET6

#if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO)
#include getaddrinfo.h
#endif
=

   And put getaddrinfo.o to replace/
   and patch libraries/clib/net/Makefile.in

--- libraries/clib/net/Makefile.in.orig Thu May 29 01:05:18 2003
+++ libraries/clib/net/Makefile.in  Fri May 30 17:30:19 2003
@@ -240,7 +240,8 @@
 AM_CPPFLAGS = -I$(top_srcdir)/kaffe
 
 libnet_la_LDFLAGS = $(KLIBFLAGS) -module -release $(KVER) -export-symbols-regex 
^([Jj]ava|kaffe)_
-libnet_la_LIBADD = $(NET_LIBS)  $(top_builddir)/replace/libreplace.la
+libnet_la_LIBADD = $(NET_LIBS)  $(top_builddir)/replace/libreplace.la \
+   $(top_builddir)/replace/getaddrinfo.o
 libnet_la_SOURCES = \
InetAddressImpl.c \
NetworkInterfaceImpl.c \

That is all.  Kaffe can be built on my old Linux machine and runs on it.

(I am not sure that $(top_builddir)/replace/ is the best place to
put getaddrinfo.o.)

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe


Re: [kaffe] libraries/clib/net/InetAddressImpl.c cannot be compiled on old Linux

2003-05-30 Thread Timothy Stack
hi,

On Thursday, May 29, 2003, at 10:00  PM, Ito Kazumitsu wrote:

The current libraries/clib/net/InetAddressImpl.c and some others
cannot be compiled on my poor old Linux (2.0.38) machine.
What is wrong:

(1) InetAddressImpl.c checks whether AF_INET6 and PF_INET6 are
defined.  Yes, they are defined in /usr/include/socketbits.h
even on my old Linux host.  But it does not support IPv6, so
struct in6_addr is not defined.
argh

(2) InetAddressImpl.c uses getnameinfo which my old Linux host does not
have.
I don't understand, its supposed to be protected by an ifdef for 
getaddrinfo.  Are you saying that it has getaddrinfo but not 
getnameinfo?  Thats odd...

I am afraid Linux 2.0 should be deleted from the list of
supported systems.
lets not be hasty

tim

___
kaffe mailing list
[EMAIL PROTECTED]
http://kaffe.org/cgi-bin/mailman/listinfo/kaffe