comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: is type String from Ada Binary-Safe ?
Date: Wed, 14 Sep 2016 15:12:09 +0200
Date: 2016-09-14T15:12:09+02:00	[thread overview]
Message-ID: <nrbico$5gb$1@gioia.aioe.org> (raw)
In-Reply-To: db8c7272-6320-4d6c-a2dd-a479a499aab1@googlegroups.com

On 14/09/2016 14:51, Daniel Norte Moraes wrote:

> Type String from Ada is Binary-Safe ?
>
> I want use it with a 'recfrom()' from C with udp .

1. No array with dynamic bounds is. You need a flat array without 
bounds, e.g. a string subtype or object.

2. Whether Character'Size = 8, AFAIK there is no requirement for that in 
Ada.

3. Whether String is packed is not mandated either.

For recfrom the safe choice is to use flat char_array or chars_ptr, see 
the package Interfaces.C.

BTW, Why don't you use GNAT.Sockets?

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de

  reply	other threads:[~2016-09-14 13:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-14 12:51 is type String from Ada Binary-Safe ? Daniel Norte Moraes
2016-09-14 13:12 ` Dmitry A. Kazakov [this message]
2016-09-14 19:55   ` Jeffrey R. Carter
2016-09-15  5:32   ` AdaMagica
2016-09-15 13:21 ` Daniel Norte Moraes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox