nightly: remove unused BINARCHIVE
[unleashed.git] / share / man / man3lgrp / lgrp_version.3lgrp
blobc750fc982a7947af3587e562c5d699238a468ab1
1 '\" te
2 .\" Copyright (c) 2003, 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 LGRP_VERSION 3LGRP "Apr 16, 2003"
7 .SH NAME
8 lgrp_version \- coordinate library and application versions
9 .SH SYNOPSIS
10 .LP
11 .nf
12 cc [ \fIflag \&.\|.\|.\fR ] \fIfile\fR\&.\|.\|. \fB-llgrp\fR [ \fIlibrary \&.\|.\|.\fR ]
13 #include <sys/lgrp_user.h>
15 \fBint\fR \fBlgrp_version\fR(\fBconst int\fR \fIversion\fR);
16 .fi
18 .SH DESCRIPTION
19 .sp
20 .LP
21 The \fBlgrp_version()\fR function takes an interface version number,
22 \fIversion\fR, as an argument and returns an lgroup interface version.  The
23 \fIversion\fR argument should be the value of \fBLGRP_VER_CURRENT\fR bound to
24 the application when it was compiled or \fBLGRP_VER_NONE\fR to find out the
25 current lgroup interface version on the running system.
26 .SH RETURN VALUES
27 .sp
28 .LP
29 If \fIversion\fR is still supported by the implementation, then
30 \fBlgrp_version()\fR returns the requested version. If \fBLGRP_VER_NONE\fR is
31 returned, the implementation cannot support the requested version. The
32 application should be recompiled and might require further changes.
33 .sp
34 .LP
35 If \fIversion\fR is \fBLGRP_VER_NONE\fR, \fBlgrp_version()\fR returns the
36 current version of the library.
37 .SH EXAMPLES
38 .LP
39 \fBExample 1 \fRTest whether the version of the interface used by the caller is
40 supported.
41 .sp
42 .LP
43 The following example tests whether the version of the interface used by the
44 caller is supported:
46 .sp
47 .in +2
48 .nf
49 #include <sys/lgrp_user.h>
51 if (lgrp_version(LGRP_VER_CURRENT) != LGRP_VER_CURRENT) {
52     fprintf(stderr, "Built with unsupported lgroup interface %d\en",
53         LGRP_VER_CURRENT);
54     exit (1);
56 .fi
57 .in -2
59 .SH ATTRIBUTES
60 .sp
61 .LP
62 See \fBattributes\fR(5) for descriptions of the following attributes:
63 .sp
65 .sp
66 .TS
67 box;
68 c | c
69 l | l .
70 ATTRIBUTE TYPE  ATTRIBUTE VALUE
72 Interface Stability     Evolving
74 MT-Level        MT-Safe
75 .TE
77 .SH SEE ALSO
78 .sp
79 .LP
80 \fBlgrp_init\fR(3LGRP), \fBliblgrp\fR(3LIB), \fBattributes\fR(5)