From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,50cbf078a700bcff X-Google-Attributes: gid103376,public From: "Tarjei Tj�stheim Jensen" Subject: Re: How to FD_SET in Ada on Linux? Date: 1999/03/07 Message-ID: <36E24E63.823E093F@online.no>#1/1 X-Deja-AN: 452173627 Content-Transfer-Encoding: 7bit References: <36ddfd4e.0@news.pacifier.com> Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@online.no X-Trace: news1.online.no 920801234 130.67.224.177 (Sun, 07 Mar 1999 11:07:14 MET DST) Organization: Jensen programvareutvikling MIME-Version: 1.0 NNTP-Posting-Date: Sun, 07 Mar 1999 11:07:14 MET DST Newsgroups: comp.lang.ada Date: 1999-03-07T00:00:00+00:00 List-Id: Steve Doiel wrote: > 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 > > I would like to replicate their functionality in Ada, but am having a great > deal of difficulty in demangling the C code. Has anyone already implemented > these functions in Ada? The easiest way of doing this would perhaps be to write a C program that emitted an Ada module which containes the correct values for these and other constants. An alternative would perhaps be to use Perl instead of C. However I suspect that a C version will be easiest to handle. It should assure portability to other operating systems as the values would always be correct. Greetings,