Compiling a program to run in a 64-bit operating environment (that is, compiling with -m64, and running the executable on a 64–bit enabled SPARC or x86 platform) changes the return values of certain functions. These are usually functions that interface standard system-level routines, such as malloc(3F) (see 1.4.35 malloc, malloc64, realloc, free: Allocate/Reallocate/Deallocate Memory), and may take or return 32-bit or 64-bit values depending on the environment. To provide portability of code between 32-bit and 64-bit environments, 64-bit versions of these routines have been provided that always take and/or return 64-bit values. The following table identifies library routine provided for use in 64-bit environments:
Table 1–1 Library Routines for 64-bit Environments
Function |
Description |
---|---|
malloc64 |
Allocate memory and return a pointer |
fseeko64 |
Reposition a large file |
ftello64 |
Determine position of a large file |
stat64, fstat64, lstat64 |
Determine status of a file |
time64,ctime64,gmtime64,ltime64 |
Dissect system time, convert to character |
qsort64 |
Sort the elements of an array |