You should be aware of the following considerations when moving programs to AIX 4.3:
Library functions which take an argument of time_t or return type time_t may find type mismatches with your existing code in 32-bit mode. time_t is changed from long type in AIX 4.2 to int type in AIX 4.3. The change in types may cause compile-time errors in your programs.
MB_CUR_MAX is a macro defined in stdlib.h that calls _getmbcurmax( ). This function now returns size_t which has always been unsigned long. In AIX 4.2, it was prototyped to return an int.
If you have user locales defined, you must recompile them in 64-bit mode using localedef. This generates 32-bit and 64-bit versions of your locale file. Otherwise, calling setlocale in 64-bit mode will not find the user-defined locale file.
However, localedef in AIX 4.3 supports only the charmap that is supplied with the AIX 4.3 distribution. If you need the charmaps from an older AIX distribution, you must explicitly copy them into your directory before using localedef with your custom locale definition file.
Also, localedef by default is set up to use /bin/cc and /usr/bin/cc. The IBM VisualAge C++ product does not create links in /usr/bin or /bin to avoid conflicts with CSet distributions. Since localedef requires the use of a 64-bit compiler, you need to run /usr/vac/bin/replaceCSet to create links pointing to the VisualAge C++ product. Invoke localedef, then execute restoreCSet to restore the links as they were before.
The make tool only discriminates on the timestamp of files. The only case where this can cause problems is when you try to add same-named 32 and 64-bit objects into the archive. Running make first in 32-bit mode, then in 64-bit mode, will not update the 2nd object. Make only checks the timestamp of the first object it finds with the correct name.
If you use int64 as a variable name, this is now a typedef in inttypes.h
There are many header file predefined types, such as size_t and ptrdiff_t, which remain the same type regardless of 32 or 64-bit compiler mode. This presents a subtle opportunity for differences when compiling the same code in different mode of the compiler.
Although size_t remains the same type (unsigned long), the length of size_t will change between different modes of AIX. This can cause library functions that return or take size_t to change behavior in 32-bit to 64-bit mode. Specifically, sizeof will return an 8-byte value in 64-bit and a 4-byte value in 32-bit mode. The same applies to prtdiff_t, which is signed long in both modes.
The m:n thread model is one of the 3 models used to map user threads to kernel threads.
Previously, AIX 4.3.0 XPG-5 based applications ran in 1:1 mode. The same application now runs in m:n mode in AIX 4.3.1. The application should continue to function correctly, however, the performance of the application is likely to change.
The AIXTHREAD_SCOPE environment variable resets the disposition of the default attribute. This can be used to change the scheduling policy from m:n to 1:1 or vice versa. Settings for this environment variable are:
AIXTHREAD_SCOPE=sched_policy
where sched_policy is one of:
P
- process based scheduling (m:n) S
- system based scheduling (1:1)
The AIXTHREAD_SCOPE environment variable can also be used to overcome problems associated with the m:n based scheduling. APAR IX76628 is available to fix these problems.
We recommend setting the environment variable to S
if your threaded
application encounters problems.