nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man5 / lfcompile64.5
blob5a9b0635caeba76ac42e282b563b5854affe7172
1 '\" te
2 .\"  Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH LFCOMPILE64 5 "Jan 26, 1998"
7 .SH NAME
8 lfcompile64 \- transitional compilation environment
9 .SH DESCRIPTION
10 .sp
11 .LP
12 All 64-bit applications can manipulate large files by default. The transitional
13 interfaces described on this page can be used by 32-bit and 64-bit applications
14 to manipulate large files.
15 .sp
16 .LP
17 In the transitional compilation environment, explicit 64-bit functions,
18 structures, and types are added to the  \fBAPI.\fR Compiling in this
19 environment allows both 32-bit and 64-bit applications to access files whose
20 size is greater than or equal to 2 Gbyte ( 2^31 bytes).
21 .sp
22 .LP
23 The transitional compilation environment exports all the explicit 64-bit
24 functions (\fIxxx\fR\fB64()\fR) and types in addition to all the regular
25 functions (\fIxxx\fR\fB()\fR) and types. Both \fIxxx\fR\fB()\fR and
26 \fIxxx\fR\fB64()\fR functions are available to the program source.  A 32-bit
27 application must use the \fIxxx\fR\fB64()\fR functions in order to access large
28 files. See the \fBlf64\fR(5) manual page for a complete listing of the 64-bit
29 transitional interfaces.
30 .sp
31 .LP
32 The transitional compilation environment differs from the large file
33 compilation environment, wherein the underlying interfaces are bound to 64-bit
34 functions, structures, and types. An application compiled in the large file
35 compilation environment is able to use the \fIxxx\fR\fB()\fR source interfaces
36 to access both large and small files, rather than having to explicitly utilize
37 the transitional \fIxxx\fR\fB64()\fR interface calls to access large files. See
38 the \fBlfcompile\fR(5) manual page for more information regarding the large
39 file compilation environment.
40 .sp
41 .LP
42 Applications may combine objects produced in the large file compilation
43 environment with objects produced in the transitional compilation environment,
44 but must be careful with respect to interoperability between those objects.
45 Applications should not declare global variables of types whose sizes change
46 between  compilation environments.
47 .sp
48 .LP
49 For applications that do not wish to conform to the POSIX or X/Open
50 specifications, the 64-bit transitional interfaces are available by default.
51 No compile-time flags need to be set.
52 .SS "Access to Additional Large File Interfaces"
53 .sp
54 .LP
55 Applications that wish to access the transitional interfaces as well as the
56 POSIX or X/Open specification-conforming interfaces should use the following
57 compilation methods and set whichever feature test macros are appropriate to
58 obtain the desired environment (see \fBstandards\fR(5)).
59 .RS +4
60 .TP
61 .ie t \(bu
62 .el o
63 Set the compile-time flag \fB_LARGEFILE64_SOURCE\fR to 1 before including any
64 headers.
65 .RE
66 .RS +4
67 .TP
68 .ie t \(bu
69 .el o
70 Use the \fBgetconf\fR(1) command with one or more of the following arguments:
71 .RE
72 .sp
74 .sp
75 .TS
76 box;
77 c | c
78 l | l .
79 \fBargument\fR  \fBpurpose\fR
81 \fBLFS64_CFLAGS\fR      T{
82 obtain compilation flags necessary to enable the transitional compilation environment
84 \fBLFS64_LDFLAGS\fR     obtain link editor options
85 \fBLFS64_LIBS\fR        obtain link library names
86 \fBLFS64_LINTFLAGS\fR   obtain lint options
87 .TE
89 .SH EXAMPLES
90 .sp
91 .LP
92 In the following examples, the transitional compilation environment is accessed
93 by invoking the \fBgetconf\fR utility with one of the arguments listed in the
94 table above. The additional large file interfaces are accessed either by
95 specifying \fB-D_LARGEFILE64_SOURCE\fR or by invoking the \fBgetconf\fR utility
96 with the arguments listed above.
97 .sp
98 .LP
99 The example that uses the form of command substitution specifying the command
100 within parentheses preceded by a dollar sign can be executed only in a
101 POSIX-conforming shell such as the Korn Shell (see \fBksh\fR(1)). In a shell
102 that is not POSIX-conforming, such as the Bourne Shell (see \fBsh\fR(1)) and
103 the C Shell (see \fBcsh\fR(1)), the command must be enclosed within grave
104 accent marks.
106 \fBExample 1 \fRAn example of compiling a program using transitional
107 interfaces such as \fBlseek64()\fR and \fBfopen64()\fR:
109 .in +2
111 $ c89 -D_LARGEFILE64_SOURCE        \e
112       $(getconf LFS64_CFLAGS) a.c  \e
113       $(getconf LFS64_LDFLAGS)     \e
114       $(getconf LFS64_LIBS)
116 .in -2
119 \fBExample 2 \fRAn example of running lint on a program using transitional
120 interfaces:
122 .in +2
124 % lint -D_LARGEFILE64_SOURCE        \e
125       \(gagetconf LFS64_LINTFLAGS\(ga \&.\|.\|. \e
126       \(gagetconf LFS64_LIBS\(ga
128 .in -2
130 .SH SEE ALSO
133 \fBgetconf\fR(1), \fBlseek\fR(2), \fBfopen\fR(3C), \fBlf64\fR(5),
134 \fBstandards\fR(5)