This developer tools enhancement is new in the Developer 9/07 release.
Starting with this release, the uid_t and gid_t types have been changed from long (32-bit binaries) and int (64-bit binaries) types to the uint32_t type. This type is used for both 32-bit and 64-bit binaries. This change promotes compatibility with other operating systems.
As part of changing the type of uid_t and gid_t, the Solaris implementation also reserves the uid_t and gid_t values that range from 231 to 232 - 2. The value 232 - 1 continues to be reserved for use as a sentinel value. Values that are assigned in this new range are temporary assignments made by the new identity mapping service. Note that, these values do not persist over a system reboot. Therefore, applications should not write UID or GID values to persistent files in the file system. Nor should applications send these values across a network connection as a means of referring to a persistent identity. For persistence, use the corresponding identity name. Solaris utilities, such as the tar command, and the NFSv4 network protocol, already follow these best practices.
Because the new and old uid_t and gid_t types occupy the same amount of space, existing binaries are not affected. For example, binaries that are compiled with older definitions. In these instances, there is no need to recompile the code. Binaries, object files, as well as shared libraries including libraries that are linked against Solaris shared libraries, are also not affected.
The impact of these changes are as following:
For Newly-compiled C binaries – When code is recompiled, standard development practices should catch any problems that are caused by changes in the uid_t and gid_t type. In cases where the change of sign might have implications for the semantics of the code, the C compiler and, or, the lint process produce certain warnings. Developers should note that any warnings generated as a result of this change should be inspected.
For C++ code – As part of the function's symbol name, C++ compilers employ a technique that is called “name mangling”. This technique encodes the primitive type names that are used in function call signatures. The change in the uid_t and gid_t type results in different name mangling for C++ functions and objects.
As with C binaries, C++ binaries and libraries continue to function as before. The exception is when libraries contain interfaces that use uid_t and gid_t.
The Solaris OS does not expose C++ interfaces of this nature. Therefore, no incompatibilities with Solaris libraries are expected.
For details on the consequences of this change, including warnings, see Changes to uid_t and gid_t Types in the Developer 9/07 Release in Solaris Express Developer Edition Release Notes.