1lfcompile64(5)        Standards, Environments, and Macros       lfcompile64(5)
2
3
4

NAME

6       lfcompile64 - transitional compilation environment
7

DESCRIPTION

9       All  64-bit  applications  can  manipulate  large files by default. The
10       transitional interfaces described on this page can be  used  by  32-bit
11       and 64-bit applications to manipulate large files.
12
13
14       In the transitional compilation environment, explicit 64-bit functions,
15       structures, and types are added to the  API. Compiling in this environ‐
16       ment  allows  both 32-bit and 64-bit applications to access files whose
17       size is greater than or equal to 2 Gbyte ( 2^31 bytes).
18
19
20       The transitional  compilation  environment  exports  all  the  explicit
21       64-bit  functions  (xxx64())  and  types in addition to all the regular
22       functions (xxx()) and types.  Both  xxx()  and  xxx64()  functions  are
23       available  to  the  program  source.  A 32-bit application must use the
24       xxx64() functions in order to access large files. See the lf64(5)  man‐
25       ual page for a complete listing of the 64-bit transitional interfaces.
26
27
28       The  transitional  compilation  environment differs from the large file
29       compilation environment, wherein the underlying interfaces are bound to
30       64-bit functions, structures, and types. An application compiled in the
31       large file compilation environment is able  to  use  the  xxx()  source
32       interfaces  to access both large and small files, rather than having to
33       explicitly utilize the transitional xxx64() interface calls  to  access
34       large  files.  See  the  lfcompile(5)  manual page for more information
35       regarding the large file compilation environment.
36
37
38       Applications may combine objects produced in the large file compilation
39       environment with objects produced in the transitional compilation envi‐
40       ronment, but must be careful with respect to  interoperability  between
41       those  objects.  Applications  should  not  declare global variables of
42       types whose sizes change between  compilation environments.
43
44
45       For applications that do not wish to conform to  the  POSIX  or  X/Open
46       specifications,  the  64-bit  transitional  interfaces are available by
47       default.  No compile-time flags need to be set.
48
49   Access to Additional Large File Interfaces
50       Applications that wish to access the transitional interfaces as well as
51       the  POSIX or X/Open specification-conforming interfaces should use the
52       following compilation methods and set whichever feature test macros are
53       appropriate to obtain the desired environment (see standards(5)).
54
55           o      Set  the  compile-time  flag _LARGEFILE64_SOURCE to 1 before
56                  including any headers.
57
58           o      Use the getconf(1) command with one or more of the following
59                  arguments:
60
61
62
63
64       ┌──────────────────┬────────────────────────────────────────┐
65argument      purpose                 
66       ├──────────────────┼────────────────────────────────────────┤
67LFS64_CFLAGS      │ obtain  compilation flags necessary to │
68       │                  │ enable  the  transitional  compilation │
69       │                  │ environment                            │
70LFS64_LDFLAGS     │ obtain link editor options             │
71LFS64_LIBS        │ obtain link library names              │
72LFS64_LINTFLAGS   │ obtain lint options                    │
73       └──────────────────┴────────────────────────────────────────┘
74

EXAMPLES

76       In  the following examples, the transitional compilation environment is
77       accessed by invoking the getconf utility  with  one  of  the  arguments
78       listed  in  the  table  above. The additional large file interfaces are
79       accessed either by specifying -D_LARGEFILE64_SOURCE or by invoking  the
80       getconf utility with the arguments listed above.
81
82
83       The  example  that uses the form of command substitution specifying the
84       command within parentheses preceded by a dollar sign  can  be  executed
85       only  in  a POSIX-conforming shell such as the Korn Shell (see ksh(1)).
86       In a shell that is not POSIX-conforming, such as the Bourne Shell  (see
87       sh(1))  and  the  C  Shell  (see  csh(1)), the command must be enclosed
88       within grave accent marks.
89
90       Example 1 An example of compiling a program using transitional   inter‐
91       faces such as lseek64() and fopen64():
92
93         $ c89 -D_LARGEFILE64_SOURCE        \
94               $(getconf LFS64_CFLAGS) a.c  \
95               $(getconf LFS64_LDFLAGS)     \
96               $(getconf LFS64_LIBS)
97
98
99       Example  2  An  example of running lint on a program using transitional
100       interfaces:
101
102         % lint -D_LARGEFILE64_SOURCE        \
103               `getconf LFS64_LINTFLAGS` ... \
104               `getconf LFS64_LIBS`
105
106

SEE ALSO

108       getconf(1), lseek(2), fopen(3C), lf64(5), standards(5)
109
110
111
112SunOS 5.11                        26 Jan 1998                   lfcompile64(5)
Impressum