From: "Sergey Koshcheyev" <serko84@hotmail.com>
Subject: Re: Put_Line for chars_ptr
Date: Sun, 23 Jun 2002 13:57:39 +0200
Date: 2002-06-23T13:57:39+02:00 [thread overview]
Message-ID: <af4d2n$1c52$1@ns.felk.cvut.cz> (raw)
In-Reply-To: slrnaha10h.102.adi@drcomp.erfurt.thur.de
"Adrian Knoth" <adi@drcomp.erfurt.thur.de> wrote in message
news:slrnaha10h.102.adi@drcomp.erfurt.thur.de...
> Hi!
>
> I have a record (struct) for interfacing uname(). The record looks like
>
> type myStruct is record
> sysname : chars_ptr;
> nodename: chars_ptr;
> release : chars_ptr;
> version : chars_ptr;
> machine : chars_ptr;
> end record;
I've just looked at the uname man page, and the structure looks like this:
struct utsname {
char sysname[SYS_NMLN];
char nodename[SYS_NMLN];
char release[SYS_NMLN];
char version[SYS_NMLN];
char machine[SYS_NMLN];
char domainname[SYS_NMLN];
};
There aren't pointers there, but the arrays themselves. So you should
declare your Ada structure as
type utsname is record
sysname : char_array (1 .. SYS_NMLN);
...
end record;
Sergey.
next prev parent reply other threads:[~2002-06-23 11:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-22 23:11 Put_Line for chars_ptr Adrian Knoth
2002-06-23 2:13 ` tmoran
2002-06-23 9:20 ` Adrian Knoth
2002-06-23 11:57 ` Sergey Koshcheyev [this message]
2002-06-23 13:09 ` Adrian Knoth
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox