'\" te .\" Copyright (c) 2003, Sun Microsystems, Inc. All Rights Reserved. .TH lgrp_version 3LGRP "16 Apr 2003" "SunOS 5.11" "Locality Group Library Functions" .SH NAME lgrp_version \- coordinate library and application versions .SH SYNOPSIS .LP .nf cc [ \fIflag \&.\|.\|.\fR ] \fIfile\fR\&.\|.\|. \fB-llgrp\fR [ \fIlibrary \&.\|.\|.\fR ] #include \fBint\fR \fBlgrp_version\fR(\fBconst int\fR \fIversion\fR); .fi .SH DESCRIPTION .sp .LP The \fBlgrp_version()\fR function takes an interface version number, \fIversion\fR, as an argument and returns an lgroup interface version. The \fIversion\fR argument should be the value of \fBLGRP_VER_CURRENT\fR bound to the application when it was compiled or \fBLGRP_VER_NONE\fR to find out the current lgroup interface version on the running system. .SH RETURN VALUES .sp .LP If \fIversion\fR is still supported by the implementation, then \fBlgrp_version()\fR returns the requested version. If \fBLGRP_VER_NONE\fR is returned, the implementation cannot support the requested version. The application should be recompiled and might require further changes. .sp .LP If \fIversion\fR is \fBLGRP_VER_NONE\fR, \fBlgrp_version()\fR returns the current version of the library. .SH EXAMPLES .LP \fBExample 1 \fRTest whether the version of the interface used by the caller is supported. .sp .LP The following example tests whether the version of the interface used by the caller is supported: .sp .in +2 .nf #include if (lgrp_version(LGRP_VER_CURRENT) != LGRP_VER_CURRENT) { fprintf(stderr, "Built with unsupported lgroup interface %d\en", LGRP_VER_CURRENT); exit (1); } .fi .in -2 .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBlgrp_init\fR(3LGRP), \fBliblgrp\fR(3LIB), \fBattributes\fR(5)