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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,38fc011071df5a27 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-06-02 14:16:20 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!news.uunet.ca!nf3.bellglobal.com!nf1.bellglobal.com!nf2.bellglobal.com!news20.bellglobal.com.POSTED!not-for-mail Message-ID: <3EDBBB1B.9060001@cogeco.ca> From: "Warren W. Gay VE3WWG" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ideas for Ada 200X (Ada.Sockets) References: <6a90b886.0305262344.1d558079@posting.google.com> <3ED4A94C.2020501@noplace.com> <3ed4c9a2@news.wineasy.se> <3ED4EB4E.6050108@cogeco.ca> <3ED63B23.5040308@cogeco.ca> <3ed7278b@news.wineasy.se> <3ED79241.2060908@cogeco.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 02 Jun 2003 17:01:15 -0400 NNTP-Posting-Host: 198.96.223.163 X-Complaints-To: abuse@sympatico.ca X-Trace: news20.bellglobal.com 1054587674 198.96.223.163 (Mon, 02 Jun 2003 17:01:14 EDT) NNTP-Posting-Date: Mon, 02 Jun 2003 17:01:14 EDT Organization: Bell Sympatico Xref: archiver1.google.com comp.lang.ada:38402 Date: 2003-06-02T17:01:15-04:00 List-Id: Simon Wright wrote: > "Warren W. Gay VE3WWG" writes: >>Ada streams and endian issues are also important. Write a program >>that uses a socket between two endian different machines and the >>endian issue becomes painfully important. This also shows up >>in the strangest places. My APQ PostgreSQL package lets you use >>Ada streams to write blobs to the database. Well, guess what. If >>you have machines of a different endian persuation trying to read >>back those blobs written by a different endian persuation (with >>Ada streams), then "they ain't right". Right now, I live with that >>limitation because there is no elegant way to fix this. > > The GLADE (GNAT Annex E support) contains an implementation of > System.Stream_Attributes, in s-stratt.adb, that magically makes streams > endian-independent (uses XDR formatting). > > You do need to use the gnatmake flag (-a ?) that says "recompile > everything". I know that the code is there as part of GLADE, and certainly if you use GLADE, this works great. While most of my stuff is GNAT specific, I prefer however to make it unecessarily so. The difficulty is, do I make my packages insist on GLADE? If I do, I can immediately rule out support for FreeBSD for example. However, if you decide that GNAT only is good enough, then there is still the issue of whether or not ACT will leave "System.Stream_Attributes, in s-stratt.adb" alone. Or will it change? Certainly there is a lot of flexibility when it comes to your own personal pet project(s) that the world never sees. I see a larger issue with code I want to publish however. -- Warren W. Gay VE3WWG http://home.cogeco.ca/~ve3wwg