Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/tcl8.5.2/doc/platform.n @ 33

Last change on this file since 33 was 25, checked in by landauf, 17 years ago

added tcl to libs

File size: 2.7 KB
Line 
1'\"
2'\" Copyright (c) 2006 ActiveState Software Inc
3'\"
4'\" See the file "license.terms" for information on usage and redistribution
5'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6'\"
7'\" RCS: @(#) $Id: platform.n,v 1.5 2008/03/26 09:59:22 dkf Exp $
8'\"
9.so man.macros
10.TH "platform" n 1.0.3 platform "Tcl Bundled Packages"
11.BS
12'\" Note:  do not modify the .SH NAME line immediately below!
13.SH NAME
14platform \- System identification support code and utilities
15.SH SYNOPSIS
16.nf
17\fBpackage require platform ?1.0.3?\fR
18.sp
19\fBplatform::generic\fR
20\fBplatform::identify\fR
21\fBplatform::patterns \fIidentifier\fR
22.fi
23.BE
24.SH DESCRIPTION
25.PP
26The \fBplatform\fR package provides several utility commands useful
27for the identification of the architecture of a machine running Tcl.
28.PP
29Whilst Tcl provides the \fBtcl_platform\fR array for identifying the
30current architecture (in particular, the platform and machine
31elements) this is not always sufficient. This is because (on Unix
32machines) \fBtcl_platform\fR reflects the values returned by the
33\fBuname\fR command and these are not standardized across platforms and
34architectures. In addition, on at least one platform (AIX) the
35\fBtcl_platform(machine)\fR contains the CPU serial number.
36.PP
37Consequently, individual applications need to manipulate the values in
38\fBtcl_platform\fR (along with the output of system specific
39utilities) - which is both inconvenient for developers, and introduces
40the potential for inconsistencies in identifying architectures and in
41naming conventions.
42.PP
43The \fBplatform\fR package prevents such fragmentation - i.e., it
44establishes a standard naming convention for architectures running Tcl
45and makes it more convenient for developers to identify the current
46architecture a Tcl program is running on.
47.SH COMMANDS
48.TP
49\fBplatform::identify\fR
50This command returns an identifier describing the platform the Tcl
51core is running on. The returned identifier has the general format
52\fIOS\fR-\fICPU\fR. The \fIOS\fR part of the identifier may contain
53details like kernel version, libc version, etc., and this information
54may contain dashes as well.  The \fICPU\fR part will not contain
55dashes, making the preceding dash the last dash in the result.
56.TP
57\fBplatform::generic\fR
58This command returns a simplified identifier describing the platform
59the Tcl core is running on. In contrast to \fBplatform::identify\fR it
60leaves out details like kernel version, libc version, etc. The
61returned identifier has the general format \fIOS\fR-\fICPU\fR.
62.TP
63\fBplatform::patterns   \fIidentifier\fR
64This command takes an identifier as returned by
65\fBplatform::identify\fR and returns a list of identifiers describing
66compatible architectures.
67.SH KEYWORDS
68operating system, cpu architecture, platform, architecture
Note: See TracBrowser for help on using the repository browser.