Aleksejj Saushev <[EMAIL PROTECTED]> writes:
> Hello!
>
> On fresh CVS Gforth I get:
> ----------------------------------------------------------------
> $ gforth ~/forth/gforth/socket.fs
> redefined int% redefined c-string redefined l! redefined w! Gforth
> 0.6.2-20060527, Copyright (C) 1995-2006 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> s" smtp.mail.ru" host>addr .ip 194 67 23 111 ok
>
> $ gforth unix/socket.fs
> Gforth 0.6.2-20060527, Copyright (C) 1995-2006 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> s" smtp.mail.ru" host>addr hex u.
> :1: Invalid memory address
> s" smtp.mail.ru" >>>host>addr<<< hex u.
> Backtrace:
> $186C1954 @
>
> $ gforth ~/forth/gforth/socket.fs
> redefined int% redefined c-string redefined l! redefined w! Gforth
> 0.6.2-20060527, Copyright (C) 1995-2006 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> 0 h_addr_list . 12 ok
>
> $ gforth unix/socket.fs
> Gforth 0.6.2-20060527, Copyright (C) 1995-2006 Free Software Foundation, Inc.
> Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
> Type `bye' to exit
> 0 h_addr_list . 16 ok
>
> $ uname -mrs
> CYGWIN_NT-5.1 1.5.21(0.156/4/2) i686
> $ date
> Mon Oct 9 03:05:58 RST 2006
> ----------------------------------------------------------------
I don't understand why that patch below works:
$ gforth unix/socket.fs
Gforth 0.6.2-20060527, Copyright (C) 1995-2006 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
s" smtp.mail.ru" host>addr hex u. C243176F ok
----------------------------------------------------------------
--- unix/socket.fs 2006-10-09 02:28:36.968750000 +0400
+++ /usr/local/share/gforth/0.6.2-20060527/unix/socket.fs 2006-10-09
03:39:35.031250000 +0400
@@ -45,18 +45,18 @@
2 2 2Constant short%
struct
- cell% field h_name
- cell% field h_aliases
- int% field h_addrtype
- int% field h_length
- cell% field h_addr_list
+ int% field h_name
+ int% field h_aliases
+ short% field h_addrtype
+ short% field h_length
+ int% field h_addr_list
end-struct hostent
struct
short% field family
short% field port
int% field sin_addr
- cell% 2* field padding
+ int% 2* field padding
end-struct sockaddr_in
Create sockaddr-tmp
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]