~ chicken-core (master) /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 mingw23 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 [PATHLIST])</procedure>4041Returns a list of directory names where {{include}} and {{include-ci}} locate42files to be included. If {{PATHLIST}} is given, the current include path43is changed to that value, which must be a list of strings.4445==== repository-path4647<parameter>repository-path</parameter>4849Contains a list of strings naming the paths to the extension50repository, which defaults to the value of the environment variable51{{CHICKEN_REPOSITORY_PATH}}, split on {{:}} (or {{;}} on Windows). If52the environment variable is not set, it will be a list containing the53default library path (usually {{/usr/local/lib/chicken}} on UNIX54systems).5556==== installation-repository5758<parameter>installation-repository</parameter>5960Contains the name of the directory where extensions are installed61(as opposed to the possible locations where they can be loaded or62linked at runtime.)636465=== system-config-directory6667<procedure>(system-config-directory)</procedure>6869Returns the location of the directory for configuration files. This70obeys the XDG specification, so when the {{XDG_CONFIG_HOME}}71environment variable is set, its value is used. When it's not set, it72will default to {{$HOME/.config}} on UNIX and {{$APPDATA}} on Windows.737475=== system-cache-directory7677<procedure>(system-cache-directory)</procedure>7879Returns the location of the directory for caches. This obeys the XDG80specification, so when the {{XDG_CACHE_HOME}} environment variable is81set, its value is used. When it's not set, it will default to82{{$HOME/.cache}} on UNIX and {{$LOCALAPPDATA}} or {{$APPDATA}} on83Windows.848586=== Machine information8788These procedures return information about the type of CPU/architecture89the program is running on.9091==== machine-byte-order9293<procedure>(machine-byte-order)</procedure>9495Returns the symbol {{little-endian}} or {{big-endian}}, depending on the96machine's byte-order.979899==== machine-type100101<procedure>(machine-type)</procedure>102103Returns a symbol specifying the processor on which this process is104currently running, which is one of the following:105106 arm107 alpha108 mips109 hppa110 ultrasparc111 sparc112 ppc113 ppc64114 ia64115 x86116 x86-64117 unknown118119=== Software information120121These procedures return information about the type of operating system122the program is running on.123124==== software-type125126<procedure>(software-type)</procedure>127128Returns a symbol specifying the operating system on which this process129is currently running, which is one of the following:130131 android132 windows133 unix134 ecos135 unknown136137138==== software-version139140<procedure>(software-version)</procedure>141142Returns a symbol specifying the operating system version on which this143process is currently running, which is one of the following:144145 linux146 freebsd147 netbsd148 openbsd149 macosx150 hpux151 dragonfly152 haiku153 solaris154 sunos155 aix156 hurd157 unknown158159160=== Feature identifiers161162163CHICKEN maintains a global list of ''features'' naming functionality available164in the current system. Additionally the {{cond-expand}} form accesses this165feature list to infer what features are provided. Predefined features are166{{chicken}}, and the SRFIs (Scheme Request For Implementation) provided by the167base system: {{srfi-23, srfi-30, srfi-39}}. If the {{eval}} unit168is used (the default), the features {{srfi-0, srfi-2, srfi-6, srfi-8, srfi-9}}169and {{srfi-10}} are defined. When compiling code (during compile-time) the170feature {{compiling}} is registered. When evaluating code in the interpreter171(csi), the feature {{csi}} is registered.172173174==== feature?175176<procedure>(feature? ID ...)</procedure>177178Returns {{#t}} if all features with the given feature-identifiers {{ID ...}}179are registered.180181182==== register-feature!183184<procedure>(register-feature! FEATURE ...)</procedure>185186Register one or more features that will be accepted as valid187feature-identifiers by {{cond-expand}}. {{FEATURE ...}} may188be a keyword, string or symbol.189190191==== unregister-feature!192193<procedure>(unregister-feature! FEATURE ...)</procedure>194195Unregisters the specified feature-identifiers. {{FEATURE ...}}196may be a keyword, string or symbol.197198199=== Returning to the host program200201=== return-to-host202203<procedure>(return-to-host)</procedure>204205Exits the Scheme code and returns to the invoking context that called206{{CHICKEN_run}} or {{CHICKEN_continue}}.207208After {{return-to-host}} has been executed and once {{CHICKEN_run}}209returns, you can invoke callbacks which have been defined with210{{define-external}}.211212213---214Previous: [[Module (chicken pathname)]]215216Next: [[Module (chicken plist)]]