/****************************************************************************
 *
 *      Copyright (c) 2000, 2001 Micro Focus International Ltd.
 *
 *      CCI Trace Front Layer template Header File
 *
 *      Source Module ccipack1.h
 *
 *      Sccs Identification  @(#)ccipack1.h $Revision: 1.13 $
 *
 *      $Modtime:   Aug 22 2001 17:31:44  $
 *
 ****************************************************************************/

/** Start of source module ccipack1.h **/

/* 

   This file contains a simple statement to alter the byte packing level of
   the compiler from the point of inclusion of this file onwards.

   When used with ccipack1.h this file is used to pack the intervening
   structure definitions as single byte aligned strutures for passing to
   COBOL or shippping on the wire to another system.

   The statements in this file set the byte packing to single-byte aligned.

 */

 /****************************************************************************
 * Revision History
 *
 * $Log: ccipack1.h,v $
 * Revision 1.13  2007/07/26 14:55:57  hps
 * Fix RPI "546096 casstart on HP Itanium gives "no licenses found.""
 *
 *  - HP/UX on IA64 is apparently our first ALIGN16 platform. Add check for
 * ALIGN16 in "ccipack" headers so that #pragma pack is used as expected.
 *
 * Revision 1.12  2007/03/06 16:06:44  mww
 * Use actual working XL C pragmas on AIX, not the ones that the XL C docs
 * claim will work (but don't).
 *
 * Revision 1.11  2007/03/04 20:46:44  mww
 * Suport AIX (replacing "-qalign=packed" compiler option).  See email
 * stream notestream of 1-2 March 2007 for details.
 *
 * Revision 1.10  2006/01/24 18:55:04  mww
 * Merged from NX5-branch
 *
 * Revision 1.9.2.1  2006/01/10 19:55:36  mww
 * Unix portation fix: packing being turned on for wrong platforms
 *
 * Revision 1.9  2005/09/28 22:22:22  mww
 * 1056899: Enable packing pragma for WIN32.  This allows removing -Zp1 from
 * trace/makefile, which in turn fixes the WIN64 build properly.
 *
 * Revision 1.8  2005/08/08 20:33:20  hps
 * Remove toxic line breaks.
 *
 * Revision 1.7  2005/08/08 15:38:18  hps
 * WIN64 changes.
 *
 * Revision 1.6  2001/08/23 12:28:50  SPE
 * Update copyright to Micro Focus International Ltd
 * from MERANT.
 *
 * 
 *    Rev 1.5   Aug 23 2001 12:28:50   SPE
 * Update copyright to Micro Focus International Ltd 
 * from MERANT.
 * 
 *    Rev 1.4   23 Jan 2001 11:45:42   SPE
 * Don't use #pragma to pack structures on HP_UX 10.20, which is
 * a K&R C compiler and uses "-u1" to achieve the same task.
 * 
 *    Rev 1.3   07 Dec 2000 10:40:46   SPE
 * Really use correct syntax for HP_UX packing pragma this time.
 * 
 *    Rev 1.2   06 Dec 2000 17:46:02   SPE
 * Switch off use of #pragma verbs on AIX (RS600 definition).
 * 
 *    Rev 1.1   06 Dec 2000 12:02:44   SPE
 * change definition dependencies for packing as some platforms
 * define ALIGN1 and ALIGN8 at the same time. (duh???)
 * 
 *    Rev 1.0   04 Dec 2000 15:27:54   SPE
 * ccipack1.h and ccipackn.h alter the compilers byte-packing 
 * level to single-byte and the system default value respectively.
 *
 ****************************************************************************/


/* Enable if Windows, or for Unix platforms that have alignment requirements
   and are not AIX or HP-UX 10.20 */

#if defined(WIN32) || defined(WIN64) || \
    (defined(UNIX) && !defined(HPUX1020) \
                   && (defined(ALIGN16) || \
                       defined(ALIGN8) || \
                       defined(ALIGN4)))
#  ifdef HP_UX                                                   /* SPE 1.3 */
#    pragma pack 1                                               /* SPE 1.3 */
#  elif defined RS6000                                           /* MWW 1.11 */
#    pragma options align=packed                                 /* MWW 1.12 */
#  else  /* HP_UX or AIX5 above */                               /* MWW 1.11 */
#    pragma pack(1)
#  endif                                                         /* SPE 1.3 */

#endif

