comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com>
Subject: Re: How to FD_SET in Ada on Linux?
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00	[thread overview]
Message-ID: <7blv66$8j9@hobbes.crc.com> (raw)
In-Reply-To: 7bl5pf$jik@drn.newsguy.com


nabbasi@pacbell.net wrote in message <7bl5pf$jik@drn.newsguy.com>...
>In article <36ddfd4e.0@news.pacifier.com>, "Steve says...
>>I am porting my sockets interface from Windows NT to Red Hat Linux 5.1.
>>In 'C'  FD_ZERO, FD_SET, FD_CLR, and FD_ISSET are implemented as macros in
>>the file /usr/include/selectbits.h
>if you download the Florist source tree, you should see this implemented
>in there.


It's not quite as simple as that.
Several years ago, when I did my first sockets implementation in Ada (long before GNAT), I dutifully translated all the macros to
Ada subprograms, and life was good until our UNIX vendor came out with a new version to which our customer insisted we migrate.
Well, one thing in the C header files changed which rendered our Ada code incompatible, and it was difficult to find the cause of
our large system's aberrant behavior.

Then, we realized that the better course was to automatically generate C-functions implementing those macros, and interface Ada to
those C functions, the approach which florist uses.

In the florist sources, you will not find Ada implementations, but c-implementations to which the Ada code is interfaced.

So.. I would recommend you just get and install florist.  I haven't built the RedHat 5.1 florist981211.tar.gz (the current version),
so I cannot comment specifically, but there are sure to be some things which will not work.  Most of the time I found these were
things in which I was not interested, or could see how to fix -- some with the kind help of Ted Baker and the folks at ACT (I had a
support contract on that project).

I would stay away from the 3.12w.fsu version, because it looks like it's for the fsu GNAT runtime.

I have used florist (and its predecessor forest) for several years, now on several platforms, and have found it useful, in spite of
its flaws.









  reply	other threads:[~1999-03-04  0:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-03  0:00 How to FD_SET in Ada on Linux? Steve Doiel
1999-03-03  0:00 ` nabbasi
1999-03-04  0:00   ` David C. Hoos, Sr. [this message]
1999-03-04  0:00     ` nabbasi
1999-03-04  0:00 ` dennison
1999-03-07  0:00 ` Tarjei Tj�stheim Jensen
replies disabled

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