24.05.2014 Views

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

AIX Version 4.3 Differences Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

• Fixed width types are used in all header files. The following are the fixed width<br />

types: char, short, int, and long long. (Of course, these types are only fixed<br />

with respect to <strong>AIX</strong>.)<br />

Note: Pointers exist in some of the existing header files. Since pointers are<br />

not fixed-width types, source code using these pointers will not compile in<br />

64-bit mode.<br />

• Source code compatibility is maintained for 32-bit programs written to process<br />

32-bit XCOFF files.<br />

• Minimal changes are required to port a 32-bit program that manipulates 32-bit<br />

XCOFF files to a 32-bit program that manipulates 64-bit XCOFF files.<br />

• Minimal changes are required to port a 32-bit program that manipulates 32-bit<br />

XCOFF files to a 64-bit program that manipulates 32-bit XCOFF files.<br />

3.2.3.2 Using the XCOFF Formats<br />

There are different options for an application to use the XCOFF formats. The<br />

following strategies are possible:<br />

• Using 32-bit XCOFF declarations.<br />

To only use the 32-bit XCOFF definitions, an application must include the<br />

appropriate header files. This will define only the structures for 32-bit XCOFF<br />

files. The 64-bit XCOFF structures and field names will not be defined.<br />

Structure names and field names will match those in previous versions of <strong>AIX</strong>,<br />

providing source compatibility.<br />

Note: Existing uses of shorthand type notation (for example, uint, ulong) have<br />

been removed.<br />

• Using 64-bit XCOFF declarations.<br />

To only use the 64-bit XCOFF definitions, an application must define the<br />

preprocessor macro __XCOFF64__ . This will define only the structures for<br />

64-bit XCOFF files. The 32-bit XCOFF structures and field names will not be<br />

defined. Structure names and field names will match the 32-bit XCOFF<br />

versions.<br />

• Using both XCOFF declarations.<br />

To use separate 32-bit XCOFF and 64-bit XCOFF definitions, an application<br />

must define both the preprocessor macros __XCOFF32__ and<br />

__XCOFF64__. This will define structures for both kinds of XCOFF files.<br />

Structure and typedef names for 64-bit XCOFF will have the suffix _64 added<br />

to them, even if a common structure could be used.<br />

• Using a hybrid of both XCOFF declarations.<br />

To use a hybrid of both the 32-bit XCOFF and 64-bit XCOFF definitions, an<br />

application must define the preprocessor macro __XCOFF_HYBRID__. This<br />

will define single structures that can be used with both 32-bit XCOFF and<br />

64-bit XCOFF, where possible. Where fields in structures are a different size<br />

or at a different offset, suffixes 32 and 64 are used to differentiate between the<br />

fields. For example, the symbol table definition (in /usr/include/syms.h) will<br />

have the names n_offset32 and n_offset64, which should be used for 32-bit<br />

XCOFF and 64-bit XCOFF files respectively.<br />

64-Bit Enablement 47

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!