~ chicken-core (chicken-5) /manual/Module (chicken platform)
Trap1[[tags: manual]]2[[toc:]]34== Module (chicken platform)56This module provides procedures for obtaining information about the7platform on which the program is currently running.89=== Build information1011These procedures return information about options that can be12specified at build time.1314==== build-platform1516<procedure>(build-platform)</procedure>1718Returns a symbol specifying the toolset which has been used for19building the executing system, which is one of the following:2021 cygwin22 mingw3223 gnu24 intel25 clang26 sun27 unknown2829==== chicken-version3031<procedure>(chicken-version [FULL])</procedure>3233Returns a string containing the version number of the CHICKEN runtime34system. If the optional argument {{FULL}} is given and true, then35a full version string is returned.3637==== include-path3839<procedure>(include-path)</procedure>4041Returns a list of strings representing directory names where included files are located,42which defaults to the value of the environment variable43{{CHICKEN_INCLUDE_PATH}}, split on {{:}} (or {{;}} on Windows).44If the variable is not set, the list is initialized to contain the installation directory45(usually {{/usr/local/share/chicken}} on UNIX-like systems).4647==== repository-path4849<parameter>repository-path</parameter>5051Contains a list of strings naming the paths to the extension52repository, which defaults to the value of the environment variable53{{CHICKEN_REPOSITORY_PATH}}, split on {{:}} (or {{;}} on Windows). If54the environment variable is not set, it will be a list containing the55default library path (usually {{/usr/local/lib/chicken}} on UNIX56systems).5758==== installation-repository5960<parameter>installation-repository</parameter>6162Contains the name of the directory where extensions are installed63(as opposed to the possible locations where they can be loaded or64linked at runtime.)656667=== system-config-directory6869<procedure>(system-config-directory)</procedure>7071Returns the location of the directory for configuration files. This72obeys the XDG specification, so when the {{XDG_CONFIG_HOME}}73environment variable is set, its value is used. When it's not set, it74will default to {{$HOME/.config}} on UNIX and {{$APPDATA}} on Windows.757677=== system-cache-directory7879<procedure>(system-cache-directory)</procedure>8081Returns the location of the directory for caches. This obeys the XDG82specification, so when the {{XDG_CACHE_HOME}} environment variable is83set, its value is used. When it's not set, it will default to84{{$HOME/.cache}} on UNIX and {{$LOCALAPPDATA}} or {{$APPDATA}} on85Windows.868788=== Machine information8990These procedures return information about the type of CPU/architecture91the program is running on.9293==== machine-byte-order9495<procedure>(machine-byte-order)</procedure>9697Returns the symbol {{little-endian}} or {{big-endian}}, depending on the98machine's byte-order.99100101==== machine-type102103<procedure>(machine-type)</procedure>104105Returns a symbol specifying the processor on which this process is106currently running, which is one of the following:107108 arm109 alpha110 mips111 hppa112 ultrasparc113 sparc114 ppc115 ppc64116 ia64117 x86118 x86-64119 unknown120121=== Software information122123These procedures return information about the type of operating system124the program is running on.125126==== software-type127128<procedure>(software-type)</procedure>129130Returns a symbol specifying the operating system on which this process131is currently running, which is one of the following:132133 android134 windows135 unix136 ecos137 unknown138139140==== software-version141142<procedure>(software-version)</procedure>143144Returns a symbol specifying the operating system version on which this145process is currently running, which is one of the following:146147 linux148 freebsd149 netbsd150 openbsd151 macosx152 hpux153 dragonfly154 haiku155 solaris156 sunos157 aix158 hurd159 unknown160161162=== Feature identifiers163164165CHICKEN maintains a global list of ''features'' naming functionality available166in the current system. Additionally the {{cond-expand}} form accesses this167feature list to infer what features are provided. Predefined features are168{{chicken}}, and the SRFIs (Scheme Request For Implementation) provided by the169base system: {{srfi-23, srfi-30, srfi-39}}. If the {{eval}} unit170is used (the default), the features {{srfi-0, srfi-2, srfi-6, srfi-8, srfi-9}}171and {{srfi-10}} are defined. When compiling code (during compile-time) the172feature {{compiling}} is registered. When evaluating code in the interpreter173(csi), the feature {{csi}} is registered.174175176==== features177178<procedure>(features)</procedure>179180Returns a list of all registered features that will be accepted as valid181feature-identifiers by {{cond-expand}}.182183184==== feature?185186<procedure>(feature? ID ...)</procedure>187188Returns {{#t}} if all features with the given feature-identifiers {{ID ...}}189are registered.190191192==== register-feature!193194<procedure>(register-feature! FEATURE ...)</procedure>195196Register one or more features that will be accepted as valid197feature-identifiers by {{cond-expand}}. {{FEATURE ...}} may198be a keyword, string or symbol.199200201==== unregister-feature!202203<procedure>(unregister-feature! FEATURE ...)</procedure>204205Unregisters the specified feature-identifiers. {{FEATURE ...}}206may be a keyword, string or symbol.207208209=== Returning to the host program210211=== return-to-host212213<procedure>(return-to-host)</procedure>214215Exits the Scheme code and returns to the invoking context that called216{{CHICKEN_run}} or {{CHICKEN_continue}}.217218After {{return-to-host}} has been executed and once {{CHICKEN_run}}219returns, you can invoke callbacks which have been defined with220{{define-external}}.221222223---224Previous: [[Module (chicken pathname)]]225226Next: [[Module (chicken plist)]]