[an error occurred while processing this directive]

HP OpenVMS Systems

ask the wizard
Content starts here

Help Porting C to OpenVMS Alpha?

» close window

The Question is:

 
What are the considerations in  porting C code from
VAX to Alpha OpenVMS over DEC C compiler. Is it a straight recompile? Our
application also use DEC's
TCP/IP (UCX). Will it influence the port to Alpha?
 
 


The Answer is :

 
  Documentation on porting from VAX C to DEC C is available in the DEC C
  for OpenVMS VAX documentation.
 
  In general, this port is usually little more than recompilation and
  relink.
 
  I would recommend porting from VAX C to DEC C on OpenVMS VAX, and then
  porting from OpenVMS VAX to OpenVMS Alpha.  Both VAX C and DEC C can
  be licensed with a current "C" PAK, and both can be installed on the
  same system at the same time.
 
  The most common problems with porting the C code from OpenVMS VAX to
  OpenVMS Alpha tend to involve:
 
    o resolving various C coding errors and questionable coding
      practices.
 
      There are a number of constructs that the older compiler(s)
      did not tend to detect.
 
    o the use of the compiler builtins that are not also available
      on OpenVMS Alpha
 
      Various pragmas and RTL routines are available.
 
    o assumptions around the structure padding.  This tends to come
      into play (only) when sharing data structures -- tyically via
      network packets or file records -- between OpenVMS VAX and
      OpenVMS Alpha systems.
 
      OpenVMS Alpha uses natural alignment for structure members,
      while OpenVMS VAX uses byte alignment the fields within a
      structure.
 
      One can use the member alignment qualifier and the associated
      member alignment pragma to override the defaults.
 
 
  And sometimes, the use of CC/DECC/STANDARD=VAXC can be useful when
  initially porting the code to DEC C.
 

answer written or last revised on ( 22-APR-1998 )

» close window