Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Re: Porting to Alpha's OSF1
       [not found] <DF7tJH.21J@applicom.co.il>
@ 1995-09-20  4:00 ` Ron Natalie
  1995-09-21  4:00   ` oberman
  1995-09-21  4:00   ` Gadzhiev A. M.
  1995-09-21  4:00 ` Carl J. Appellof
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 10+ messages in thread
From: Ron Natalie @ 1995-09-20  4:00 UTC (permalink / raw)


Gil Bregman (gil@applicom.co.il) wrote:
: I'm about to port a project of about 200,000 lines of code to Alpha.
: The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
: and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
: Motif and RPC.

There is really only two major differences between the UNIX on the
Alpha and pretty much standard BSD.

	1. Byte Order
	2. Pointers are 64 bits.

If your code is trully portable, then you shouldn't have a problem.
There is only one "ALPHA" hack in our million lines of code.  The
rest is just to make sure that you really did use htons, etc...
where appropriate and don't cheat alias pointers to int.

-Ron



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
       [not found] <DF7tJH.21J@applicom.co.il>
                   ` (2 preceding siblings ...)
  1995-09-21  4:00 ` Richard Gorton
@ 1995-09-21  4:00 ` Richard Readings
  3 siblings, 0 replies; 10+ messages in thread
From: Richard Readings @ 1995-09-21  4:00 UTC (permalink / raw)
  To: gil, readings

gil@applicom.co.il (Gil Bregman) wrote:
>I'm about to port a project of about 200,000 lines of code to Alpha.
>The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
>and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
>Motif and RPC.

Try our Alpha Developer Support home page: 		            

	http://www-usa.partner.digital.com/www-swdev/

In particular

http://www-usa.partner.digital.com/www-swdev/pages/Home/TECH/documents/OSF-migration.html

contains pointers to a number of Migration Guides available on-line. The SunOS
V4.X to DEC OSF/1 Migration Guide listed there may prove useful.

Richard

-- 
Richard Readings			email:	readings@bst.dec.com
Digital Equipment Co Ltd.		
England




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
  1995-09-20  4:00 ` Porting to Alpha's OSF1 Ron Natalie
  1995-09-21  4:00   ` oberman
@ 1995-09-21  4:00   ` Gadzhiev A. M.
  1 sibling, 0 replies; 10+ messages in thread
From: Gadzhiev A. M. @ 1995-09-21  4:00 UTC (permalink / raw)


Ron Natalie (ron@topaz.sensor.com) wrote:
: Gil Bregman (gil@applicom.co.il) wrote:
: : I'm about to port a project of about 200,000 lines of code to Alpha.
: : The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
: : and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
: : Motif and RPC.

: There is really only two major differences between the UNIX on the
: Alpha and pretty much standard BSD.

: 	1. Byte Order
: 	2. Pointers are 64 bits.

: If your code is trully portable, then you shouldn't have a problem.
: There is only one "ALPHA" hack in our million lines of code.  The
: rest is just to make sure that you really did use htons, etc...
: where appropriate and don't cheat alias pointers to int.
  Really i often get one bug in network program .
People directly use "unsigned long" as IP address . This is not true for Alpha.
And sometimes  they use "unsigned long" or long as synonym to "int".
  If program don't work my first step is : "grep long *" :)

: -Ron
-- 
Alexey Gadzhiev 
Computer Center of Energy Department of Russia
e-mail : alexey@angel.energy.msk.su



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
       [not found] <DF7tJH.21J@applicom.co.il>
  1995-09-20  4:00 ` Porting to Alpha's OSF1 Ron Natalie
  1995-09-21  4:00 ` Carl J. Appellof
@ 1995-09-21  4:00 ` Richard Gorton
  1995-09-21  4:00 ` Richard Readings
  3 siblings, 0 replies; 10+ messages in thread
From: Richard Gorton @ 1995-09-21  4:00 UTC (permalink / raw)



If you want to try a quick port to Digital Unix, you might want
to check out:
	http://www.novalink.com/freeport-express

And use FreePort Express to translate your SunOS application directly.
-- 
Richard Gorton			Project Leader: mx & FreePort Express
Alpha Migration Tools		Digital Equipment Corp.
Reply-to: gorton@tallis.enet.dec.com
All standard disclaimers apply.



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
       [not found] <DF7tJH.21J@applicom.co.il>
  1995-09-20  4:00 ` Porting to Alpha's OSF1 Ron Natalie
@ 1995-09-21  4:00 ` Carl J. Appellof
  1995-09-21  4:00 ` Richard Gorton
  1995-09-21  4:00 ` Richard Readings
  3 siblings, 0 replies; 10+ messages in thread
From: Carl J. Appellof @ 1995-09-21  4:00 UTC (permalink / raw)


gil@applicom.co.il (Gil Bregman) wrote:
>I realize I'll have to make sure int's and pointers are not
>mixed,

Also, on Digital UNIX, sizeof(long) == 8, sizeof(int) == 4.

If you use ONC RPC (aka Sun RPC), realize that the RPC "long" datatype
is 32 bits.
-- 
Carl Appellof
not speaking for
Digital Equipment Corporation





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
  1995-09-20  4:00 ` Porting to Alpha's OSF1 Ron Natalie
@ 1995-09-21  4:00   ` oberman
  1995-09-21  4:00     ` Ron Natalie
  1995-09-21  4:00   ` Gadzhiev A. M.
  1 sibling, 1 reply; 10+ messages in thread
From: oberman @ 1995-09-21  4:00 UTC (permalink / raw)


In Article <43po5s$7l3@topaz.sensor.com>
ron@topaz.sensor.com (Ron Natalie) writes:
>Gil Bregman (gil@applicom.co.il) wrote:
>: I'm about to port a project of about 200,000 lines of code to Alpha.
>: The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
>: and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
>: Motif and RPC.
>
>There is really only two major differences between the UNIX on the
>Alpha and pretty much standard BSD.
>
>	1. Byte Order
>	2. Pointers are 64 bits.

Byte order is different from some platforms, but BSD was developed on VAX
processors which have the same byte ordering as the Alpha. PCs are also the
same. Sun and MIPS are not unless it's a Digital MIPS box.

One other, very common problem, is the assumption that a long is 32 bits. I
have to routinely change many variable typed as long to int.

>If your code is trully portable, then you shouldn't have a problem.
>There is only one "ALPHA" hack in our million lines of code.  The
>rest is just to make sure that you really did use htons, etc...
>where appropriate and don't cheat alias pointers to int.

Pretty much true from my experience.

R. Kevin Oberman			
Energy Sciences Network (ESnet)
National Energy Research Supercomputer Center (NERSC)
Lawrence Livermore National Laboratory (LLNL)
Internet: koberman@llnl.gov		+1 510-422-6955



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
  1995-09-21  4:00   ` oberman
@ 1995-09-21  4:00     ` Ron Natalie
  0 siblings, 0 replies; 10+ messages in thread
From: Ron Natalie @ 1995-09-21  4:00 UTC (permalink / raw)


oberman@icaen.llnl.gov wrote:
: In Article <43po5s$7l3@topaz.sensor.com>
: ron@topaz.sensor.com (Ron Natalie) writes:
: >Gil Bregman (gil@applicom.co.il) wrote:
: >: I'm about to port a project of about 200,000 lines of code to Alpha.
: >: The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
: >: and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
: >: Motif and RPC.
: >
: >There is really only two major differences between the UNIX on the
: >Alpha and pretty much standard BSD.
: >
: >	1. Byte Order
: >	2. Pointers are 64 bits.

: Byte order is different from some platforms, but BSD was developed on VAX
: processors which have the same byte ordering as the Alpha. PCs are also the
: same. Sun and MIPS are not unless it's a Digital MIPS box.

Intel and DEC boxes are the only LSBFirst machines in common use today.  The
issue is that if you leave out an htonl on a Sun, you'll never know it as
it's a no-op.

-Ron




^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Porting to Alpha's OSF1
@ 1995-09-26  4:00 Karen Michaels
  1995-10-04  4:00 ` James Mucklow
  0 siblings, 1 reply; 10+ messages in thread
From: Karen Michaels @ 1995-09-26  4:00 UTC (permalink / raw)



>I'm about to port a project of about 200,000 lines of code to Alpha.
>The system works currently on SunOS 4.1.X, Solaris 2.X, HP-UX, AIX 3.2.5
>and IRIX 5.X. The system involves a lot of TCP/IP sockets stuff, X and
>Motif and RPC.
>
>Any help of the things I should look for in the porting will be most
>welcomed. I realize I'll have to make sure int's and pointers are not
>mixed, but any other pointers can really help me. I've heard about a
>stack problem I should look for, could you give me details about it?
>
>Thanks,
>
>    Gil Bregman

A product called the Digital Porting Assistant should help you in your
port.  It analyzes source code and points out problems and potential
problems.  It also includes extensive on-line help.

Version 1 is available now for FREE.  I have attached a summary of this product
at the end of this message.  If you want to get a copy send mail to 
port-comments@zko.dec.com.

Karen Michaels
Digital Porting Assistant Project Leader
Digital Equipment Corportation
--------------------------
                The Digital Porting Assistant
                              
The Porting Assistant is a tool that helps application
developers port their code to Digital UNIX(TM).  It analyzes C
and C++ code and identifies code that may not compile or run
properly.  The Porting Assistant reduces the time and cost
of porting an application to Digital UNIX.  It provides
quick access to technical porting information.  The Porting
Assistant is available now for free.

Features:
The Porting Assistant provides an interactive environment in
which the user can locate places in the code to change,
understand why they need to make the changes and then make
the change.  The Porting Assistant also provides a global
replace capability which allows the users to perform a
replace operation over a set of files.

Using the Porting Assistant, the user can run a check and
then look at the diagnostic messages that the check
produces.  The Porting Assistant allows the user to navigate
though the diagnostic messages using their editor (vi, emacs
or a Motif editor).  From the editor the user can see both
the diagnostic and the source code that caused the
diagnostic.

Checking code:

The Porting Assistant runs the following checks over source
code:

- locates conditional code (#ifdef) that might also need
  a Digital UNIX branch
- locates includes (#include) of files that don't exist
  and reports locations where a file of the same name exists
- locates calls to library functions that don't match
  Digital UNIX definitions
- locates code with 32-bit dependencies
- locates calls to library functions with different
  semantics on Digital UNIX

Some applications that people port to Digital UNIX may
already run on multiple platforms.  If this is the case,
they may use conditional code that applies to one or more
platform.  The Porting Assistant can locate this conditional
code, so that the developer can determine whether or not the
code applies to Digital UNIX.

Different operating systems store different include files in
different directories.  The Porting Assistant locates
include files that are not found in the specified location.
If possible, it reports locations where the file does exist.
For example, the file dkio.h is located in /usr/include/sun
on SunOS systems, but it is located in /usr/include/sys on
Digital UNIX systems.  The Porting Assistant will flag
references to /usr/include/sun/dkio.h and suggest that the
user include /usr/include/sys/dkio.h instead.

The Porting Assistant checks for functions that do not have
function definitions.  This may be the case if an
application calls a system function that is available on
another platform, but does not exist on Digital UNIX.  The
Porting Assistant also flags functions that have calls that
are inconsistent with their definition.  This may occur if a
function has a different signature on Digital UNIX, than on
another platform.

The Porting Assistant locates code that makes assumptions
that it is running on a 32-bit architecture.  This includes
operations such as assigning or casting pointers to
integers, assignments of longs to other types and sign
extension problems.

The Porting Assistant provides a list of functions that have
different semantics on Digital UNIX than on other platforms.
These functions are different because Digital UNIX is a 64-
bit architecture.  For each function, the Porting Assistant
provides access to the function's man page as well as a
special man page that describes how this function is
different on Digital UNIX.  The Porting Assistant searches
the user's code to find calls to these functions.

Help using the Porting Assistant and fixing problems:
The Porting Assistant includes online hypertext help that
describes how to use it and the relevance of each of its
checks.  Included in the online help are porting tips that
cover topics such as byte ordering, data alignment and
shared libraries.  In addition, the Porting Assistant
provides extensive help text for the errors that it reports.
This help text includes a description of the problem and a
suggestion on how the user can fix it.

Global Replace:
As part of porting, developers may have to change function
names, variable name or type name in their source files.
The Porting Assistant supports this activity through its
global replace capability.  It allows the user to change a
specified string to a different string in a set of files.
The Porting Assistant can perform the substitution for the
user with or without confirmation.  When the user wants to
confirm each substitution, the Porting Assistant brings each
file into the user's editor and positions on each occurrence
of the specified string.  The user can then indicate whether
or not they want to change the current occurrence of the
string.

Requirements:
The Porting Assistant requires a typical software
development configuration.  This consists of an Alpha
machine with the following configuration:

- 64 MB of memory
  
- DEC OSF/1 Alpha Operating System V3.0 or greater
  
- DEC OSF/1 Alpha UNIX C Developers' Extensions V3.0 or 
  greater

- 48 MB of disk space




^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: Porting to Alpha's OSF1
  1995-09-26  4:00 Karen Michaels
@ 1995-10-04  4:00 ` James Mucklow
  1995-10-04  4:00   ` Mark Charette
  0 siblings, 1 reply; 10+ messages in thread
From: James Mucklow @ 1995-10-04  4:00 UTC (permalink / raw)


I agree with most of what has been said before however two more points:

1)	Check the defines associated with std1 and std, we had to make a change
from std to std1 in our make files.

2) I was working on OSF2.1 so this may have changed, but watch our for
something like this

void setVal( Int *i)
long l;

...
	setVal( (int*) &l)

We found half of the long was initialised in setVal, but the rest was
rubbish - causig a few problems.

Basically it comes down to longs and pointers are 64 bits which are not the
same size as other data types.

Hope that helps

James Mucklow
james@demon.co.uk
or
james.mucklow@pa-consulting.com





^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Porting to Alpha's OSF1
  1995-10-04  4:00 ` James Mucklow
@ 1995-10-04  4:00   ` Mark Charette
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Charette @ 1995-10-04  4:00 UTC (permalink / raw)


James Mucklow (jemuckl@freyja.demon.co.uk) wrote:
: 2) I was working on OSF2.1 so this may have changed, but watch our for
: something like this

: void setVal( Int *i)
: long l;

: ...
: 	setVal( (int*) &l)

: We found half of the long was initialised in setVal, but the rest was
: rubbish - causig a few problems.

Code using casts to shut up the compiler even though the compiler complaint
was valid still breaks in newer versions of the OS, as well it should.

--
Mark Charette                     charette@mika.com
MIKA Systems, Inc
17197 N. Laurel Park Dr Suite 115
Livonia, MI 48152



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~1995-10-04  4:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <DF7tJH.21J@applicom.co.il>
1995-09-20  4:00 ` Porting to Alpha's OSF1 Ron Natalie
1995-09-21  4:00   ` oberman
1995-09-21  4:00     ` Ron Natalie
1995-09-21  4:00   ` Gadzhiev A. M.
1995-09-21  4:00 ` Carl J. Appellof
1995-09-21  4:00 ` Richard Gorton
1995-09-21  4:00 ` Richard Readings
1995-09-26  4:00 Karen Michaels
1995-10-04  4:00 ` James Mucklow
1995-10-04  4:00   ` Mark Charette

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