I stumbled into a problem I don't understand.
I'm developing a little program for an ftp client. In order to connect
to the site I need the site address from the site name, and the libc
gethostbyname() provides the required information.
gethostbyname returns a PHostEnt type which is declared
On Mon, 16 Jan 2023, Giuliano Colla via fpc-pascal wrote:
I stumbled into a problem I don't understand.
I'm developing a little program for an ftp client. In order to connect to the
site I need the site address from the site name, and the libc gethostbyname()
provides the required informati
Il 16/01/23 20:32, Michael Van Canneyt ha scritto:
On Mon, 16 Jan 2023, Giuliano Colla via fpc-pascal wrote:
.I stumbled into a problem I don't understand.
Should that not simply be
Addr := Pin_addr(HostEnt.h_addr^)
(if addr is a pointer)
or
addr:=Pin_addr(HostEnt.h_addr^)^
if Addr
On 16-1-2023 20:56, Giuliano Colla via fpc-pascal wrote:
No chance. Addr is a pointer (of type Pin_addr)
but
Addr := Pin_addr(HostEnt.h_addr^)
works only if mode is Delphi. In objfpc it raises exactly the same error.
A little bit weird, isn't it?
It depends. It assumes .h_addr is compatibl
On Mon, 16 Jan 2023 19:50:34 +0100
Giuliano Colla via fpc-pascal wrote:
> I stumbled into a problem I don't understand.
>
> I'm developing a little program for an ftp client. In order to
> connect to the site I need the site address from the site name, and
> the libc gethostbyname() provides the
On Mon, 16 Jan 2023 22:12:52 +0100
Mattias Gaertner via fpc-pascal wrote:
> On Mon, 16 Jan 2023 19:50:34 +0100
> Giuliano Colla via fpc-pascal wrote:
>
> > I stumbled into a problem I don't understand.
> >
> > I'm developing a little program for an ftp client. In order to
> > connect to the si
Il 16/01/23 20:58, Marco van de Voort via fpc-pascal ha scritto:
On 16-1-2023 20:56, Giuliano Colla via fpc-pascal wrote:
No chance. Addr is a pointer (of type Pin_addr)
but
Addr := Pin_addr(HostEnt.h_addr^)
works only if mode is Delphi. In objfpc it raises exactly the same
error.
A lit
Il 16/01/23 22:23, Mattias Gaertner via fpc-pascal ha scritto:
On Mon, 16 Jan 2023 22:12:52 +0100
Mattias Gaertner via fpc-pascal wrote:
On Mon, 16 Jan 2023 19:50:34 +0100
Giuliano Colla via fpc-pascal wrote:
I stumbled into a problem I don't understand.
I'm developing a little program fo