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 |
---|
14 | platform \- 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 |
---|
26 | The \fBplatform\fR package provides several utility commands useful |
---|
27 | for the identification of the architecture of a machine running Tcl. |
---|
28 | .PP |
---|
29 | Whilst Tcl provides the \fBtcl_platform\fR array for identifying the |
---|
30 | current architecture (in particular, the platform and machine |
---|
31 | elements) this is not always sufficient. This is because (on Unix |
---|
32 | machines) \fBtcl_platform\fR reflects the values returned by the |
---|
33 | \fBuname\fR command and these are not standardized across platforms and |
---|
34 | architectures. In addition, on at least one platform (AIX) the |
---|
35 | \fBtcl_platform(machine)\fR contains the CPU serial number. |
---|
36 | .PP |
---|
37 | Consequently, individual applications need to manipulate the values in |
---|
38 | \fBtcl_platform\fR (along with the output of system specific |
---|
39 | utilities) - which is both inconvenient for developers, and introduces |
---|
40 | the potential for inconsistencies in identifying architectures and in |
---|
41 | naming conventions. |
---|
42 | .PP |
---|
43 | The \fBplatform\fR package prevents such fragmentation - i.e., it |
---|
44 | establishes a standard naming convention for architectures running Tcl |
---|
45 | and makes it more convenient for developers to identify the current |
---|
46 | architecture a Tcl program is running on. |
---|
47 | .SH COMMANDS |
---|
48 | .TP |
---|
49 | \fBplatform::identify\fR |
---|
50 | This command returns an identifier describing the platform the Tcl |
---|
51 | core is running on. The returned identifier has the general format |
---|
52 | \fIOS\fR-\fICPU\fR. The \fIOS\fR part of the identifier may contain |
---|
53 | details like kernel version, libc version, etc., and this information |
---|
54 | may contain dashes as well. The \fICPU\fR part will not contain |
---|
55 | dashes, making the preceding dash the last dash in the result. |
---|
56 | .TP |
---|
57 | \fBplatform::generic\fR |
---|
58 | This command returns a simplified identifier describing the platform |
---|
59 | the Tcl core is running on. In contrast to \fBplatform::identify\fR it |
---|
60 | leaves out details like kernel version, libc version, etc. The |
---|
61 | returned identifier has the general format \fIOS\fR-\fICPU\fR. |
---|
62 | .TP |
---|
63 | \fBplatform::patterns \fIidentifier\fR |
---|
64 | This command takes an identifier as returned by |
---|
65 | \fBplatform::identify\fR and returns a list of identifiers describing |
---|
66 | compatible architectures. |
---|
67 | .SH KEYWORDS |
---|
68 | operating system, cpu architecture, platform, architecture |
---|