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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,632dbd0caea19836,start X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!q75g2000hsh.googlegroups.com!not-for-mail From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: System calls - GNAT library vs. direct bindings Date: 31 May 2007 07:58:40 -0700 Organization: http://groups.google.com Message-ID: <1180623520.303981.191090@q75g2000hsh.googlegroups.com> NNTP-Posting-Host: 137.138.37.241 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1180623520 15325 127.0.0.1 (31 May 2007 14:58:40 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 31 May 2007 14:58:40 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070228 Red Hat/1.5.0.10-0.1.slc3 Firefox/1.5.0.10,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: q75g2000hsh.googlegroups.com; posting-host=137.138.37.241; posting-account=Ch8E9Q0AAAA7lJxCsphg7hBNIsMsP4AE Xref: g2news1.google.com comp.lang.ada:15992 Date: 2007-05-31T07:58:40-07:00 List-Id: Hi, I would like to now your opinion about the two options in the subject. Let's suppose that the problem is a network-aware application on the POSIX system. Ada doesn't know about network per RM, so we have to look around for libraries. One option is to use the GNAT library that has some package for sockets. Another is to write thin wrappers that bind directly to relevant system calls (socket, connect, read, write, close, bind, listen, accept, select - that's it for the basic stuff). 1. The advantage of using GNAT library is portability across various systems that are targeted by GNAT. (I assume that the GNAT library is available outside of POSIX - if not, please correct me.) 2. The advantage of writing custom thin wrappers is portability across various compilers that target POSIX platforms. The first is not really important for me, I will probably use only POSIX systems. The seconds is not important neither, I will probably use only GNAT. In other words - the focus for evaluation should go elsewhere. Performance? Maintainability? Some other factors? Thank you for your feedback. -- Maciej Sobczak http://www.msobczak.com/