Sun Studio 12: Fortran Library Reference

1.2 64-Bit Environments

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




Allocate memory and return a pointer 


Reposition a large file 


Determine position of a large file 

stat64, fstat64, lstat64

Determine status of a file 


Dissect system time, convert to character 


Sort the elements of an array