From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fcda7,a3e7a54875d85e53 X-Google-Attributes: gidfcda7,public X-Google-Thread: fc89c,a3e7a54875d85e53 X-Google-Attributes: gidfc89c,public X-Google-Thread: fee84,a3e7a54875d85e53 X-Google-Attributes: gidfee84,public From: John Neumann Subject: Re: Porting from Compaq Alpha to HP-UX Date: 2000/02/01 Message-ID: <38972C88.8C1FDA9D@titan.com>#1/1 X-Deja-AN: 580455226 Content-Transfer-Encoding: 7bit References: <873qtt$fds@romeo.logica.co.uk> <2000Jan31.083911.1@eisner> <874g9m$p20@romeo.logica.co.uk> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@verio.net X-Trace: ord-read.news.verio.net 949431522 209.57.40.23 (Tue, 01 Feb 2000 18:58:42 GMT) Organization: SKUM Team MIME-Version: 1.0 Reply-To: neumann@titan.com NNTP-Posting-Date: Tue, 01 Feb 2000 18:58:42 GMT Newsgroups: comp.sys.hp.hpux,comp.unix.osf.osf1,comp.unix.programmer Hi Mike - Sending binary data although usually much faster (not in all cases) is a very limited interface due to the obvious. Since you have the source code and have some time, try writing a small interface program that will both encode and decode the binary data structures into an ASCII stream type message. This way you can test the code on both machines without having to rewrite a lot of the bit masking and/or field manipulations. Start with as small amount of data you can for parsing and encoding and then grow from there. We have done similar parsers when trying to port code/data from DEC to SUN/HP workstations in the past. The parsers took much less time that trying to rewrite large amount of algorithms, YMMV. Good luck! -John neumann@titan.com Mike Holland wrote: > Indeed! This is made worse by the fact that some messages between the > platforms are mapped onto 'C' unions, hence the end-swapping utility needs > knowledge of the meaning of the tag fields. > > Ideally, I could do with a tool which processed 'C' type definitions (plus > additional info about the tags) and produced such an end-swapping program. > This surely must have been written by someone already! > > Does anyone know of such a program? > > Mike Holland > > Bob Koehler wrote in message <2000Jan31.083911.1@eisner>... > >In article <873qtt$fds@romeo.logica.co.uk>, "Mike Holland" > writes: > >> I need to port a large-ish application (about a million lines of 'C' > code) > >> from Compaq Alpha UNIX 4.0e to run additionally on HP-UX. It will be > >> particularly entertaining because the application exchanges messages with > >> programs running on Windows NT. > >> > > > >Alphas running Compaq's UNIX and all systems running WNT are running in > >little endian mode. HP-UX runs in big endian mode. If you are > >exchanging binary data you will have to byte and/or word swap between > >the WNT and HP. > > > >---------------------------------------------------------------------- > >Bob Koehler | Computer Sciences Corporation > >Hubble Space Telescope Payload | Federal Sector, Civil Group > > Flight Software Team | please remove ".aspm" when replying