diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 603a459849..30e67ec8ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,6 @@ on: env: LM_LICENSE_FILE: "${{ github.workspace }}/tools/cw/license.dat" BUILD: /var/tmp/pokeplatinum - WINEARCH: win32 jobs: build: @@ -22,17 +21,15 @@ jobs: steps: - name: Install Software run: | - sudo dpkg --add-architecture i386 - sudo mkdir -pm755 /etc/apt/keyrings - sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key - sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources sudo apt-get update -y - sudo apt-get install -y bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 - sudo apt-get install -y --install-recommends winehq-stable + sudo apt-get install -y bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 wget xz-utils - name: Checkout Repo uses: actions/checkout@v2 + - name: Install Metroskrew + run: sudo make skrew + - name: Configure Repo run: make configure diff --git a/.gitignore b/.gitignore index 184d7282ed..4b777a3d16 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,11 @@ -# Meson files +# Build directory /build/ -/tools/cw/build/ -/tools/cw/mwrap -/tools/cw/mwrap.exe -# Wrapped subprojects folders +# Metroskrew artifacts +/metroskrew-*.tar.xz +/metroskrew-*.7z + +# Subproject folders /subprojects/libvct-*/ /subprojects/NitroDWC-*/ /subprojects/NitroSDK-*/ @@ -22,6 +23,10 @@ /subprojects/rapidjson-*/ /subprojects/meson-*/ /subprojects/nitrorom/ +/subprojects/metroskrew/ + +# Legacy mwrap compiler +/tools/cw/mwrap # CLion folders .idea/ diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index ab3ce89216..0000000000 --- a/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM ubuntu:noble - -RUN apt-get update -y -RUN apt-get install -y bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 wget ninja-build - -RUN dpkg --add-architecture i386 -RUN mkdir -pm755 /etc/apt/keyrings -RUN wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key -RUN wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/noble/winehq-noble.sources -RUN apt-get update -y -RUN apt-get install -y --install-recommends winehq-stable -RUN hash -r - -CMD [ "/bin/sh" ] diff --git a/INSTALL.md b/INSTALL.md index 6be7713a9e..210153fbcc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -118,7 +118,7 @@ install to a more recent version of `Ubuntu`: registry: ```bash - sudo apt install bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 + sudo apt install bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 p7zip ``` 2. [Download the repository](#2-downloading-the-repository). @@ -135,7 +135,7 @@ and install it on your system. To update your package registry, enter the following command: ```bash - sudo pacman -Syu + pacman -Syu ``` Press 'Y' when prompted to confirm the update. This process may take a few @@ -147,7 +147,7 @@ the following commands to install necessary build dependencies: ```bash echo 'export PATH=${PATH}:/mingw64/bin' >> ~/.bashrc source ~/.bashrc - sudo pacman -S bison flex gcc git make ninja python mingw-w64-x86_64-arm-none-eabi-gcc + pacman -S bison flex gcc git make ninja python mingw-w64-x86_64-arm-none-eabi-gcc p7zip ``` Press 'Y' when prompted to confirm the installation. @@ -163,24 +163,29 @@ to install these, run: xcode-select --install ``` -2. Additional packages can be installed using Homebrew; if you do not already have -Homebrew installed, [do so](https://brew.sh/). Once Homebrew is installed, run -the following commands: +2. Install [Homebrew](https://brew.sh/). + +3. Run the following commands to install additional dependencies: ```zsh brew update - brew install gcc@14 ninja libpng pkg-config arm-none-eabi-gcc + brew install gcc@14 ninja libpng pkg-config arm-none-eabi-gcc xz brew install --cask wine-stable ``` -3. If your MacOS installation is Monterey (12) or earlier, then you may also need +4. You may need to authorize the Wine installation to satisfy MacOS security +requirements. To do this, open the Applications folder in Finder and locate the +Wine Stable application. Control-Click on this icon to open the context menu, +then Control-Click on Open and grant the requested permissions. + +5. If your MacOS installation is Monterey (12) or earlier, then you may also need GNU `coreutils` installed to run the build scripts: ```zsh brew install coreutils ``` -4. [Download the repository](#2-downloading-the-repository). +6. [Download the repository](#2-downloading-the-repository). ### Linux @@ -189,79 +194,37 @@ GNU `coreutils` installed to run the build scripts: > package registry. A handful of common distributions are listed below for > convenience. -> [!IMPORTANT] -> This project requires `meson` version `1.5.0` or higher. If the version of -> `meson` provided by your package manager is out of date, then follow -> [these instructions](https://mesonbuild.com/Getting-meson.html) to get the -> most recent version. - -Once you have installed all the above dependencies, proceed to [downloading +Once you have installed all of the listed dependencies, proceed to [downloading the repository](#2-downloading-the-repository). -#### Ubuntu (and other Debian derivatives) +#### Debian (and derivatives, e.g., Ubuntu, Mint) -1. Install `wine`: +1. Enable 32-bit installations using `dpkg`: ```bash sudo dpkg --add-architecture i386 - sudo mkdir -pm755 /etc/apt/keyrings - sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key - sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/ubuntu/dists/$(lsb_release -cs)/winehq-$(lsb_release -cs).sources - sudo apt update - sudo apt install --install-recommends wine-stable ``` 2. Install the following packages via `apt`: -```bash -sudo apt install bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config python3 -``` + ```bash + sudo apt install bison flex g++ gcc-arm-none-eabi git make ninja-build pkg-config wget python3 xz-utils libc6:i386 + ``` -#### Arch Linux (and derivatives) +#### Arch Linux (and derivatives, e.g., Manjaro, Endeavour) -Enable the [multilib repository](https://wiki.archlinux.org/title/Multilib). +1. Enable the [multilib repository](https://wiki.archlinux.org/title/Multilib). -Install dependencies via `pacman`: +2. Install dependencies via `pacman`: + + ```bash + sudo pacman -S arm-none-eabi-gcc bison flex gcc git make ninja python wget xz lib32-glibc + ``` + +#### Fedora (and derivatives, e.g., AlmaLinux, Red Hat Enterprise Linux) ```bash -sudo pacman -S arm-none-eabi-gcc bison flex gcc git make ninja python wine -``` - -#### Fedora (and derivatives) - -```bash -sudo dnf install arm-none-eabi-gcc-cs bison flex gcc-c++ git make ninja-build python3 wine-core.i686 wine-core.x86_64 -``` - -### Docker - -> [!CAUTION] -> The Docker build method is currently unmaintained and unsupported. Proceed at -> your own risk, and know that you may not receive much support from repository -> maintainers. - -A `Dockerfile` is provided with the repository should you choose to build the -project as a container. If you do not have `docker` installed on your machine -and wish to make use of this feature, follow the instructions [here](https://docs.docker.com/desktop/). - -Once `docker` is installed, to the build environment, run: - -```bash -make clean # only if you have an existing development environment -docker build . -t pret/pokeplatinum -``` - -Then, run the following to build the ROM: - -```bash -docker run -u $USER -w /rom -v .:/rom pret/pokeplatinum make -``` - -If you wish to stop using the `docker` build feature and switch back to a native -build environment, then run the following: - -```bash -docker run -u $USER -w /rom -v .:/rom pret/pokeplatinum make clean +sudo dnf install arm-none-eabi-gcc-cs bison flex gcc-c++ git make ninja-build python3 wget2 xz glibc32 ``` ## 2. Downloading the Repository @@ -320,33 +283,3 @@ make update ``` And then try rebuilding. - -### Meson Replies With `ERROR: Unknown compiler(s)` - -Example error message: - -``` -meson.build:1:0: ERROR: Unknown compiler(s): [['/mnt/c/pokeplatinum/tools/cw/mwrap', 'mwccarm']] -``` - -Meson provides some basic logging for its configuration process in -`build/meson-logs/meson-log.txt`. In that file, you should see some entries that -begin with `Detecting compiler via: ...`, which will give some insight into the -root of the error. For example: - -``` -Detecting compiler via: `/mnt/c/pokeplatinum/tools/cw/mwrap mwccarm --version` -> 1 -stderr: -wine: '/home//.wine' is a 64-bit installation, it cannot be used with a 32-bit wineserver. ------------ - -meson.build:1:0: ERROR: Unknown compiler(s): [['/mnt/c/pokeplatinum/tools/cw/mwrap', 'mwccarm']] -``` - -In this instance, the user has installed 64-bit `wine`. Ensure that you have -installed 32-bit `wine`, then rebuild _after_ removing the prefix directory -using the following command: - -``` -rm -rf ~/.wine -``` diff --git a/Makefile b/Makefile index eee7e52f6d..8cc41a345b 100644 --- a/Makefile +++ b/Makefile @@ -1,63 +1,74 @@ -.PHONY: all release debug check rom data target format clean distclean purge update setup_release setup_debug configure meson +.PHONY: all release debug check rom data target format clean distclean purge update setup_release setup_debug configure skrew meson + +SUBPROJ_DIR := subprojects MESON_VER := 1.7.0 -MESON_DIR := subprojects/meson-$(MESON_VER) +MESON_DIR := $(SUBPROJ_DIR)/meson-$(MESON_VER) MESON_SUB := $(MESON_DIR)/meson.py MESON ?= $(MESON_SUB) NINJA ?= ninja -WINELOADER ?= wine GIT ?= git BUILD ?= build ROOT_INI := $(BUILD)/root.ini -DOT_MWCONFIG := $(BUILD)/.mwconfig - -TOOLS := tools -WRAP := $(TOOLS)/cw -WRAP_BUILD := $(WRAP)/build -MWRAP := $(WRAP)/mwrap UNAME_R := $(shell uname -r) UNAME_S := $(shell uname -s) CWD := $(shell pwd) +# Check for Windows-drive access ifneq (,$(findstring Microsoft,$(UNAME_R))) -ifneq (,$(filter /mnt/%,$(CWD))) -WSL_ACCESSING_WINDOWS := 0 + ifneq (,$(filter /mnt/%,$(realpath $(CWD)))) + WSL_ACCESSING_WINDOWS := 0 + else + WSL_ACCESSING_WINDOWS := 1 + endif else -WSL_ACCESSING_WINDOWS := 1 -endif -else -WSL_ACCESSING_WINDOWS := 1 + WSL_ACCESSING_WINDOWS := 1 endif -WRAP_CONFIG := 0 +# Set up the compiler toolchain dependency +SKREW_GET := tools/devtools/get_metroskrew.sh +SKREW_VER := 0.1.2 +SKREW_DIR := $(SUBPROJ_DIR)/metroskrew + ifneq (,$(findstring Linux,$(UNAME_S))) -ifeq (0,$(WSL_ACCESSING_WINDOWS)) -NATIVE := native.ini -CROSS := cross_unix.ini + ifeq (0,$(WSL_ACCESSING_WINDOWS)) + NATIVE := native.ini + CROSS := cross.ini + SKREW_SYS := windows + SKREW_EXE := $(SKREW_DIR)/bin/skrewrap.exe + else + NATIVE := native.ini + CROSS := cross_unix.ini + SKREW_SYS := linux + SKREW_EXE := $(SKREW_DIR)/bin/skrewrap + endif else -NATIVE := native_unix.ini -CROSS := cross_unix.ini -endif -else -ifneq (,$(findstring Darwin,$(UNAME_S))) -NATIVE := native_macos.ini -CROSS := cross_unix.ini -else -ifneq (,$(findstring BSD, $(UNAME_S))) -NATIVE := native_unix.ini -CROSS := cross_unix.ini -else -NATIVE := native.ini -CROSS := cross.ini -endif -endif + ifneq (,$(findstring Darwin,$(UNAME_S))) + NATIVE := native_macos.ini + CROSS := cross_unix.ini + SKREW_SYS := wine + SKREW_EXE := $(SKREW_DIR)/bin/skrewrap + else + ifneq (,$(findstring BSD, $(UNAME_S))) + NATIVE := native.ini + CROSS := cross_unix.ini + SKREW_SYS := linux + SKREW_EXE := $(SKREW_DIR)/bin/skrewrap + else + NATIVE := native.ini + CROSS := cross.ini + SKREW_SYS := windows + SKREW_EXE := $(SKREW_DIR)/bin/skrewrap.exe + endif + endif endif export NINJA_STATUS := [%p %f/%t] +# Modders can delete the `check` dependency here after their first build. all: release check .NOTPARALLEL: release @@ -82,22 +93,23 @@ rom: $(BUILD)/build.ninja data data: $(BUILD)/build.ninja $(NINJA) -C $(BUILD) data -target: $(BUILD)/build.ninja - $(MESON) compile -C $(BUILD) $(MESON_TARGET) - format: $(BUILD)/build.ninja $(NINJA) -C $(BUILD) clang-format +target: $(BUILD)/build.ninja + $(MESON) compile -C $(BUILD) $(MESON_TARGET) + clean: $(BUILD)/build.ninja $(MESON) compile -C $(BUILD) --clean distclean: - rm -rf $(BUILD) $(MWRAP) + rm -rf $(BUILD) purge: distclean + rm -rf $(SKREW_DIR) ifeq ($(MESON),$(MESON_SUB)) ! test -f $(MESON) || $(MESON) subprojects purge --confirm - rm -rf $(dir $(MESON_SUB)) + rm -rf $(MESON_DIR) else $(MESON) subprojects purge --confirm endif @@ -113,50 +125,22 @@ setup_debug: $(BUILD)/build.ninja configure: $(BUILD)/build.ninja -$(BUILD)/build.ninja: $(ROOT_INI) $(DOT_MWCONFIG) | $(BUILD) meson - MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(MESON) setup \ - --wrap-mode=nopromote \ - --native-file=meson/$(NATIVE) \ - --native-file=$(ROOT_INI) \ - --cross-file=meson/$(CROSS) \ - --cross-file=$(ROOT_INI) \ - -- $(BUILD) +$(BUILD)/build.ninja: $(ROOT_INI) | $(BUILD) $(SKREW_EXE) meson + $(MESON) setup \ + --wrap-mode=nopromote \ + --native-file=meson/$(NATIVE) \ + --native-file=$(ROOT_INI) \ + --cross-file=meson/$(CROSS) \ + --cross-file=$(ROOT_INI) \ + -- $(BUILD) $(ROOT_INI): | $(BUILD) echo "[constants]" > $@ echo "root = '$$PWD'" >> $@ -$(DOT_MWCONFIG): $(MWRAP) | $(BUILD) -ifneq (,$(filter native_%.ini,$(NATIVE))) - WINE="$$(command -v $(WINELOADER))"; \ - BUILD="$(BUILD)"; \ - MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(MWRAP) -conf \ - -wine "$$WINE" \ - -path_unx "$$PWD" \ - -path_win "$$("$$WINE" winepath -w "$$PWD")" \ - -path_build_unx "$$BUILD" \ - -path_build_win "$$("$$WINE" winepath -w "$$BUILD")" -else ifeq (0,$(WSL_ACCESSING_WINDOWS)) - BUILD="$(BUILD)"; \ - MWCONFIG=$(abspath $(DOT_MWCONFIG)) $(MWRAP) -conf \ - -path_unx "$$PWD" \ - -path_win "$$(wslpath -w "$$PWD")" \ - -path_build_unx "$$BUILD" \ - -path_build_win "$$(wslpath -w "$$PWD")" -else - touch $(DOT_MWCONFIG) -endif - $(BUILD): mkdir -p -- $(BUILD) -$(MWRAP): | meson - rm -rf $(MWRAP) $(WRAP_BUILD) - $(MESON) setup $(WRAP_BUILD) $(WRAP) - $(MESON) compile -C $(WRAP_BUILD) - install -m755 $(WRAP_BUILD)/$(@F) $@ - rm -rf $(WRAP_BUILD) - meson: ; ifeq ($(MESON),$(MESON_SUB)) meson: $(MESON_SUB) @@ -164,3 +148,8 @@ endif $(MESON_SUB): $(GIT) clone --depth=1 -b $(MESON_VER) https://github.com/mesonbuild/meson $(@D) + +skrew: $(SKREW_EXE) + +$(SKREW_EXE): + SKREW_SYS=$(SKREW_SYS) SKREW_VER=$(SKREW_VER) SKREW_DIR=$(SKREW_DIR) $(SKREW_GET) diff --git a/include/brightness_controller.h b/include/brightness_controller.h index 85d0b23376..8925973f27 100644 --- a/include/brightness_controller.h +++ b/include/brightness_controller.h @@ -1,7 +1,7 @@ #ifndef POKEPLATINUM_BRIGHTNESS_CONTROLLER_H #define POKEPLATINUM_BRIGHTNESS_CONTROLLER_H -#include "include/constants/screen.h" +#include "constants/screen.h" #define BRIGHTNESS_NO_SCREENS (0) #define BRIGHTNESS_MAIN_SCREEN (1 << DS_SCREEN_MAIN) diff --git a/lib/spl/meson.build b/lib/spl/meson.build index bb8573d1b4..89dbc690a0 100644 --- a/lib/spl/meson.build +++ b/lib/spl/meson.build @@ -1,8 +1,8 @@ libspl_c_args = [ '-nothumb', - '-wrap:ver', '1.2/base_b73', - '-wrap:noipa' + '-wrap:sdk', '1.2/base_b73', + '-wrap:noipa', ] libspl_link_args = [ @@ -31,6 +31,6 @@ libspl = static_library('spl', c_args: libspl_c_args, link_args: libspl_link_args, include_directories: [public_includes, libspl_public_includes], - dependencies: [ nitrosdk_dep, nitrosystem_dep ], + dependencies: [nitrosdk_dep, nitrosystem_dep], pic: false ) diff --git a/meson.build b/meson.build index 76b53dd8f5..6f903234ae 100644 --- a/meson.build +++ b/meson.build @@ -34,6 +34,7 @@ c_args = [ '-stdinc', '-sym', 'on', '-DPOKEPLATINUM_GENERATED_ENUM', + '-D_MSL_RESTRICT=', ] if get_option('gdb_debugging') @@ -85,27 +86,27 @@ link_args = [ ############################################################ nitrosdk_dep = dependency('NitroSDK', default_options: { - 'mwrap_ver': '2.0/sp1p2', + 'mwrap_sdk': '2.0/sp1p2', 'sp1p3_conditionals': true } ) nitrosystem_dep = dependency('NitroSystem', default_options: { - 'mwrap_ver': '2.0/sp2' + 'mwrap_sdk': '2.0/sp2', } ) nitrowifi_dep = dependency('NitroWiFi', default_options: { - 'mwrap_ver': '2.0/sp1p2', + 'mwrap_sdk': '2.0/sp1p2', 'sp1p3_conditionals': true } ) nitrodwc_dep = dependency('NitroDWC', default_options: { - 'mwrap_ver': '2.0/sp2p2', + 'mwrap_sdk': '2.0/sp2p2', 'link_ppwlobby': true } ) diff --git a/meson/cross.ini b/meson/cross.ini index 11b2954ecc..6a10a27416 100644 --- a/meson/cross.ini +++ b/meson/cross.ini @@ -1,10 +1,10 @@ [binaries] -c = [root + '/tools/cw/mwrap.exe', 'mwccarm'] -c_ld = [root + '/tools/cw/mwrap.exe', 'mwldarm'] -cpp = [root + '/tools/cw/mwrap.exe', 'mwccarm'] -cpp_ld = [root + '/tools/cw/mwrap.exe', 'mwldarm'] -nasm = [root + '/tools/cw/mwrap.exe', 'mwasmarm'] -ar = [root + '/tools/cw/mwrap.exe', 'mwldarm'] +c = [root + '/subprojects/metroskrew/bin/mwccarm.exe', '-wrap:sdk', '2.0/sp2p2'] +c_ld = [root + '/subprojects/metroskrew/bin/mwldarm.exe', '-wrap:sdk', '2.0/sp2p2'] +cpp = [root + '/subprojects/metroskrew/bin/mwccarm.exe', '-wrap:sdk', '2.0/sp2p2'] +cpp_ld = [root + '/subprojects/metroskrew/bin/mwldarm.exe', '-wrap:sdk', '2.0/sp2p2'] +nasm = [root + '/subprojects/metroskrew/bin/mwasmarm.exe', '-wrap:sdk', '2.0/sp2p2'] +ar = [root + '/subprojects/metroskrew/bin/mwldarm.exe', '-wrap:sdk', '2.0/sp2p2'] strip = ['false'] [host_machine] diff --git a/meson/cross_unix.ini b/meson/cross_unix.ini index f4aa5f5557..4894c62444 100644 --- a/meson/cross_unix.ini +++ b/meson/cross_unix.ini @@ -1,10 +1,10 @@ [binaries] -c = [root + '/tools/cw/mwrap', 'mwccarm'] -c_ld = [root + '/tools/cw/mwrap', 'mwldarm'] -cpp = [root + '/tools/cw/mwrap', 'mwccarm'] -cpp_ld = [root + '/tools/cw/mwrap', 'mwldarm'] -nasm = [root + '/tools/cw/mwrap', 'mwasmarm'] -ar = [root + '/tools/cw/mwrap', 'mwldarm'] +c = [root + '/subprojects/metroskrew/bin/mwccarm', '-wrap:sdk', '2.0/sp2p2'] +c_ld = [root + '/subprojects/metroskrew/bin/mwldarm', '-wrap:sdk', '2.0/sp2p2'] +cpp = [root + '/subprojects/metroskrew/bin/mwccarm', '-wrap:sdk', '2.0/sp2p2'] +cpp_ld = [root + '/subprojects/metroskrew/bin/mwldarm', '-wrap:sdk', '2.0/sp2p2'] +nasm = [root + '/subprojects/metroskrew/bin/mwasmarm', '-wrap:sdk', '2.0/sp2p2'] +ar = [root + '/subprojects/metroskrew/bin/mwldarm', '-wrap:sdk', '2.0/sp2p2'] strip = ['false'] [host_machine] diff --git a/meson/native.ini b/meson/native.ini index f3cc50a266..f707ded7a1 100644 --- a/meson/native.ini +++ b/meson/native.ini @@ -2,6 +2,3 @@ c = 'gcc' cpp = 'g++' ar = 'ar' - -makebanner = root + '/tools/maketools/makebanner.exe' -makerom = root + '/tools/maketools/makerom.exe' diff --git a/meson/native_macos.ini b/meson/native_macos.ini index 25e98ecba2..be5081ce40 100644 --- a/meson/native_macos.ini +++ b/meson/native_macos.ini @@ -2,6 +2,3 @@ c = 'gcc-14' cpp = 'g++-14' ar = 'ar' - -makebanner = ['wine', root + '/tools/maketools/makebanner.exe'] -makerom = ['wine', root + '/tools/maketools/makerom.exe'] diff --git a/meson/native_unix.ini b/meson/native_unix.ini deleted file mode 100644 index c4dd3609a8..0000000000 --- a/meson/native_unix.ini +++ /dev/null @@ -1,7 +0,0 @@ -[binaries] -c = 'gcc' -cpp = 'g++' -ar = 'ar' - -makebanner = ['wine', root + '/tools/maketools/makebanner.exe'] -makerom = ['wine', root + '/tools/maketools/makerom.exe'] diff --git a/src/brightness_controller.c b/src/brightness_controller.c index a61fe85337..5b480294e6 100644 --- a/src/brightness_controller.c +++ b/src/brightness_controller.c @@ -3,7 +3,7 @@ #include #include -#include "include/constants/screen.h" +#include "constants/screen.h" #define IS_SCREEN_SELECTED(screenMask, screenConst) (screenMask & screenConst) diff --git a/subprojects/NitroDWC.wrap b/subprojects/NitroDWC.wrap index ac9f0d99dd..20806a8667 100644 --- a/subprojects/NitroDWC.wrap +++ b/subprojects/NitroDWC.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/ntrtwl/NitroDWC.git -revision = 8220c8bdec2e8b5252ee710cf3cc0c148228a03a +revision = 4d29f686ae4c2af03f7132571e1481620df3ade1 depth = 1 directory = NitroDWC-2.2.30008 diff --git a/subprojects/NitroSDK.wrap b/subprojects/NitroSDK.wrap index 8f4e9c769b..5dddb39a29 100644 --- a/subprojects/NitroSDK.wrap +++ b/subprojects/NitroSDK.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/ntrtwl/NitroSDK.git -revision = 1bbf15f2675c6063b9f8085715e645604206d8d5 +revision = e6fbeba60332e660639ad664eda2dc85c0e14649 depth = 1 directory = NitroSDK-4.2.30001 diff --git a/subprojects/NitroSystem.wrap b/subprojects/NitroSystem.wrap index 367621e3d1..7af4a04734 100644 --- a/subprojects/NitroSystem.wrap +++ b/subprojects/NitroSystem.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/ntrtwl/NitroSystem.git -revision = 507acff1585505bdac3f996551ca5123f8408073 +revision = 7a089c4aa15184380dfea76e8b28663f5c779613 depth = 1 directory = NitroSystem-071126.1 diff --git a/subprojects/NitroWiFi.wrap b/subprojects/NitroWiFi.wrap index 16a74e6792..5b8a948851 100644 --- a/subprojects/NitroWiFi.wrap +++ b/subprojects/NitroWiFi.wrap @@ -1,6 +1,6 @@ [wrap-git] url = https://github.com/ntrtwl/NitroWiFi.git -revision = 0bb999007564dbe913cb8f6df8bfb27ac775221f +revision = e6048fc294480831e154b3d53205d6cbda1775cd depth = 1 directory = NitroWiFi-2.1.30003 diff --git a/tools/cw/1.2/base_b73/lmgr8c.dll b/tools/cw/1.2/base_b73/lmgr8c.dll deleted file mode 100644 index 31a4d5fdfb..0000000000 Binary files a/tools/cw/1.2/base_b73/lmgr8c.dll and /dev/null differ diff --git a/tools/cw/1.2/base_b73/mwasmarm.exe b/tools/cw/1.2/base_b73/mwasmarm.exe deleted file mode 100644 index fa30085511..0000000000 Binary files a/tools/cw/1.2/base_b73/mwasmarm.exe and /dev/null differ diff --git a/tools/cw/1.2/base_b73/mwccarm.exe b/tools/cw/1.2/base_b73/mwccarm.exe deleted file mode 100644 index 04f776494a..0000000000 Binary files a/tools/cw/1.2/base_b73/mwccarm.exe and /dev/null differ diff --git a/tools/cw/1.2/base_b73/mwldarm.exe b/tools/cw/1.2/base_b73/mwldarm.exe deleted file mode 100644 index 6be8190da5..0000000000 Binary files a/tools/cw/1.2/base_b73/mwldarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/ELFIO.dll b/tools/cw/2.0/sp1p2/ELFIO.dll deleted file mode 100644 index c84adf0e18..0000000000 Binary files a/tools/cw/2.0/sp1p2/ELFIO.dll and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/MSL_All-DLL80_x86.dll b/tools/cw/2.0/sp1p2/MSL_All-DLL80_x86.dll deleted file mode 100644 index a733bbb982..0000000000 Binary files a/tools/cw/2.0/sp1p2/MSL_All-DLL80_x86.dll and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/lmgr8c.dll b/tools/cw/2.0/sp1p2/lmgr8c.dll deleted file mode 100644 index 31a4d5fdfb..0000000000 Binary files a/tools/cw/2.0/sp1p2/lmgr8c.dll and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/mwasmarm.exe b/tools/cw/2.0/sp1p2/mwasmarm.exe deleted file mode 100644 index 8797554d89..0000000000 Binary files a/tools/cw/2.0/sp1p2/mwasmarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/mwccarm.exe b/tools/cw/2.0/sp1p2/mwccarm.exe deleted file mode 100644 index 07e75c8181..0000000000 Binary files a/tools/cw/2.0/sp1p2/mwccarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp1p2/mwldarm.exe b/tools/cw/2.0/sp1p2/mwldarm.exe deleted file mode 100644 index 44d817b689..0000000000 Binary files a/tools/cw/2.0/sp1p2/mwldarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2/ELFIO.dll b/tools/cw/2.0/sp2/ELFIO.dll deleted file mode 100644 index c84adf0e18..0000000000 Binary files a/tools/cw/2.0/sp2/ELFIO.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2/MSL_All-DLL80_x86.dll b/tools/cw/2.0/sp2/MSL_All-DLL80_x86.dll deleted file mode 100644 index a733bbb982..0000000000 Binary files a/tools/cw/2.0/sp2/MSL_All-DLL80_x86.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2/lmgr8c.dll b/tools/cw/2.0/sp2/lmgr8c.dll deleted file mode 100644 index 31a4d5fdfb..0000000000 Binary files a/tools/cw/2.0/sp2/lmgr8c.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2/mwasmarm.exe b/tools/cw/2.0/sp2/mwasmarm.exe deleted file mode 100644 index 8797554d89..0000000000 Binary files a/tools/cw/2.0/sp2/mwasmarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2/mwccarm.exe b/tools/cw/2.0/sp2/mwccarm.exe deleted file mode 100644 index b2159431db..0000000000 Binary files a/tools/cw/2.0/sp2/mwccarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2/mwldarm.exe b/tools/cw/2.0/sp2/mwldarm.exe deleted file mode 100644 index 8608e71aa6..0000000000 Binary files a/tools/cw/2.0/sp2/mwldarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/ELFIO.dll b/tools/cw/2.0/sp2p2/ELFIO.dll deleted file mode 100644 index c84adf0e18..0000000000 Binary files a/tools/cw/2.0/sp2p2/ELFIO.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/MSL_All-DLL80_x86.dll b/tools/cw/2.0/sp2p2/MSL_All-DLL80_x86.dll deleted file mode 100644 index a733bbb982..0000000000 Binary files a/tools/cw/2.0/sp2p2/MSL_All-DLL80_x86.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/lmgr8c.dll b/tools/cw/2.0/sp2p2/lmgr8c.dll deleted file mode 100644 index 31a4d5fdfb..0000000000 Binary files a/tools/cw/2.0/sp2p2/lmgr8c.dll and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/mwasmarm.exe b/tools/cw/2.0/sp2p2/mwasmarm.exe deleted file mode 100644 index 65aea82eee..0000000000 Binary files a/tools/cw/2.0/sp2p2/mwasmarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/mwccarm.exe b/tools/cw/2.0/sp2p2/mwccarm.exe deleted file mode 100644 index 8454b8a32d..0000000000 Binary files a/tools/cw/2.0/sp2p2/mwccarm.exe and /dev/null differ diff --git a/tools/cw/2.0/sp2p2/mwldarm.exe b/tools/cw/2.0/sp2p2/mwldarm.exe deleted file mode 100644 index 8608e71aa6..0000000000 Binary files a/tools/cw/2.0/sp2p2/mwldarm.exe and /dev/null differ diff --git a/tools/cw/include/MSL_C/PREFIX_NITRO.h b/tools/cw/include/MSL_C/PREFIX_NITRO.h deleted file mode 100644 index 93f3ad0762..0000000000 --- a/tools/cw/include/MSL_C/PREFIX_NITRO.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef __PREFIX_NITRO__ -#define __PREFIX_NITRO__ - -#define _MSL_THREADSAFE 1 - -#define _MSL_LOCALDATA_AVAILABLE 0 - -#define _MSL_OS_DIRECT_MALLOC - -#define _MSL_OS_ALLOC_SUPPORT 1 - -#define _MSL_NEEDS_EXTRAS 1 - -#define _MSL_OS_TIME_SUPPORT 0 - -#define SDK_ARM9 1 - -#endif diff --git a/tools/cw/include/MSL_C/abort_exit.h b/tools/cw/include/MSL_C/abort_exit.h deleted file mode 100644 index 3ebe9144c8..0000000000 --- a/tools/cw/include/MSL_C/abort_exit.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _MSL_ABORT_EXIT_H -#define _MSL_ABORT_EXIT_H - -#include - -_MSL_BEGIN_EXTERN_C - -extern void _MSL_CDECL (* __stdio_exit) (void); -extern void _MSL_CDECL (* __console_exit)(void); - -extern int __aborting; - -int _MSL_CDECL __atexit(void(_MSL_CDECL * func)(void)) _MSL_CANT_THROW; -void _MSL_CDECL __exit(int status) _MSL_CANT_THROW; - -#define __setup_exit() - -int _MSL_CDECL __register_atexit(void (*func)(void)) _MSL_CANT_THROW; -extern void _MSL_CDECL __destroy_global_chain(void) _MSL_CANT_THROW; - -#if _MSL_USES_EXIT_PROCESS -_MSL_IMP_EXP_C void _MSL_CDECL _ExitProcess(void) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/ansi_files.h b/tools/cw/include/MSL_C/ansi_files.h deleted file mode 100644 index 28f379dd4c..0000000000 --- a/tools/cw/include/MSL_C/ansi_files.h +++ /dev/null @@ -1,61 +0,0 @@ -#ifndef _MSL_ANSI_FILES_H -#define _MSL_ANSI_FILES_H - -#include -#include - -#define set_eof(file) \ - do \ - { \ - (file)->state.io_state = __neutral; \ - (file)->state.eof = 1; \ - (file)->buffer_len = 0; \ - } \ - while (0) - -#define set_error(file) \ - do \ - { \ - (file)->state.error = 1; \ - (file)->buffer_len = 0; \ - } \ - while (0) - -#if _MSL_BUFFERED_CONSOLE - - #define console_buff_mode _IOLBF - - #define console_buff_size 256 - -typedef unsigned char console_buff[console_buff_size]; - -static console_buff stdin_buff; -static console_buff stdout_buff; -static console_buff stderr_buff; - -#else - - #define console_buff_mode _IONBF - - #define console_buff_size 1 - - #define stdin_buff &__files[0].char_buffer - #define stdout_buff &__files[1].char_buffer - #define stderr_buff &__files[2].char_buffer - -#endif - -_MSL_BEGIN_EXTERN_C - -#if _MSL_OS_DISK_FILE_SUPPORT - __std(FILE) * _MSL_CDECL __find_unopened_file(void) _MSL_CANT_THROW; -#endif - -void _MSL_CDECL __init_file(__std(FILE) *, __std(__file_modes) mode, char * buff, __std(size_t)) _MSL_CANT_THROW; -void _MSL_CDECL __close_all(void) _MSL_CANT_THROW; -int _MSL_CDECL __flush_all(void) _MSL_CANT_THROW; -int _MSL_CDECL __flush_line_buffered_output_files(void) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/ansi_fp.h b/tools/cw/include/MSL_C/ansi_fp.h deleted file mode 100644 index cc9071806d..0000000000 --- a/tools/cw/include/MSL_C/ansi_fp.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _MSL_ANSI_FP_H -#define _MSL_ANSI_FP_H - -#include -#include - -#pragma options align=native - -_MSL_BEGIN_EXTERN_C - - #ifndef _MSL_SIGDIGLEN - #define _MSL_SIGDIGLEN 32 - #endif - - #define SIGDIGLEN _MSL_SIGDIGLEN - - #define FLOATDECIMAL ((char)(0)) - #define FIXEDDECIMAL ((char)(1)) - -typedef struct decimal { - char sgn; - char unused; - short exp; - struct { - unsigned char length; - unsigned char text[SIGDIGLEN]; - unsigned char unused; - } sig; -} decimal; - -typedef struct decform { - char style; - char unused; - short digits; -} decform; - - #if _MSL_FLOATING_POINT - -_MSL_IMP_EXP_C void _MSL_CDECL __num2dec(const decform * f, double x, decimal * d) _MSL_CANT_THROW; -_MSL_IMP_EXP_C double _MSL_CDECL __dec2num(const decimal * d) _MSL_CANT_THROW; - - #endif - -_MSL_END_EXTERN_C - -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/ansi_params.h b/tools/cw/include/MSL_C/ansi_params.h deleted file mode 100644 index a78425ece0..0000000000 --- a/tools/cw/include/MSL_C/ansi_params.h +++ /dev/null @@ -1,309 +0,0 @@ -#ifndef _MSL_ANSI_PARMS_H -#define _MSL_ANSI_PARMS_H - -#include -#include - -#if defined(_No_Console) && !defined(_MSL_CONSOLE_SUPPORT) -#define _MSL_CONSOLE_SUPPORT 0 -#endif - -#ifndef _MSL_CONSOLE_SUPPORT -#define _MSL_CONSOLE_SUPPORT 1 -#endif - -#if defined(_Unbuffered_Console) && !defined(_MSL_BUFFERED_CONSOLE) -#define _MSL_BUFFERED_CONSOLE 0 -#endif - -#ifndef _MSL_BUFFERED_CONSOLE -#define _MSL_BUFFERED_CONSOLE 1 -#endif - -#ifndef _MSL_CONSOLE_FILE_IS_DISK_FILE -#define _MSL_CONSOLE_FILE_IS_DISK_FILE 0 -#endif - -#ifndef _MSL_FILE_CONSOLE_ROUTINES -#define _MSL_FILE_CONSOLE_ROUTINES 0 -#endif - -#ifndef _MSL_NULL_CONSOLE_ROUTINES - #if _MSL_CONSOLE_SUPPORT - #define _MSL_NULL_CONSOLE_ROUTINES 0 - #else - #define _MSL_NULL_CONSOLE_ROUTINES 1 - #endif -#endif - -#if defined(_No_Disk_File_OS_Support) && !defined(_MSL_OS_DISK_FILE_SUPPORT) -#define _MSL_OS_DISK_FILE_SUPPORT 0 -#endif - -#ifndef _MSL_OS_DISK_FILE_SUPPORT -#define _MSL_OS_DISK_FILE_SUPPORT 1 -#endif - -#if defined(_No_Alloc_OS_Support) && !defined(_MSL_OS_ALLOC_SUPPORT) -#define _MSL_OS_ALLOC_SUPPORT 0 -#endif - -#ifndef _MSL_OS_ALLOC_SUPPORT -#define _MSL_OS_ALLOC_SUPPORT 1 -#endif - -#if !_MSL_OS_ALLOC_SUPPORT && defined(_MSL_OS_DIRECT_MALLOC) -#error Defining _MSL_OS_DIRECT_MALLOC requires _MSL_OS_ALLOC_SUPPORT -#endif - -#if defined(_No_Time_OS_Support) && !defined(_MSL_OS_TIME_SUPPORT) -#define _MSL_OS_TIME_SUPPORT 0 -#endif - -#ifndef _MSL_OS_TIME_SUPPORT -#define _MSL_OS_TIME_SUPPORT 1 -#endif - -#ifndef _MSL_CLOCK_T_AVAILABLE -#define _MSL_CLOCK_T_AVAILABLE 1 -#endif - -#ifndef _MSL_TIME_T_AVAILABLE -#define _MSL_TIME_T_AVAILABLE 1 -#endif - -#ifndef _MSL_TM_STRUCT_AVAILABLE -#define _MSL_TM_STRUCT_AVAILABLE 1 -#endif - -#ifndef _MSL_TIME_T_IS_LOCALTIME -#define _MSL_TIME_T_IS_LOCALTIME 1 -#endif - -#if _MSL_OS_TIME_SUPPORT && ((!_MSL_CLOCK_T_AVAILABLE) || (!_MSL_TIME_T_AVAILABLE)) -#error _MSL_CLOCK_T_AVAILABLE and _MSL_TIME_T_AVAILABLE must match _MSL_OS_TIME_SUPPORT -#endif - -#ifndef _MSL_THREADSAFE -#define _MSL_THREADSAFE 0 -#endif - -#ifndef _MSL_PTHREADS -#define _MSL_PTHREADS 0 -#endif - -#if _MSL_PTHREADS && !_MSL_THREADSAFE -#error _MSL_PTHREADS and _MSL_THREADSAFE must match -#endif - -#ifndef _MSL_LONGLONG -#define _MSL_LONGLONG 1 -#endif - -#if defined(_No_Floating_Point) && !defined(_MSL_FLOATING_POINT) -#define _MSL_FLOATING_POINT 0 -#endif - -#ifndef _MSL_FLOATING_POINT -#define _MSL_FLOATING_POINT 1 -#endif - -#ifndef _MSL_WIDE_CHAR -#define _MSL_WIDE_CHAR 0 -#endif - -#ifndef _MSL_USES_SUN_MATH_LIB -#define _MSL_USES_SUN_MATH_LIB 0 -#endif - -#ifndef _MSL_C99 -#define _MSL_C99 1 -#endif - -#ifndef _MSL_C_HAS_CPP_EXTENSIONS -#ifdef __cplusplus -#define _MSL_C_HAS_CPP_EXTENSIONS 1 -#else -#define _MSL_C_HAS_CPP_EXTENSIONS 0 -#endif -#endif - -#ifndef _MSL_POSIX -#define _MSL_POSIX 0 -#endif - -#ifndef _MSL_NEEDS_EXTRAS -#define _MSL_NEEDS_EXTRAS 0 -#endif - -#ifndef _MSL_STRERROR_KNOWS_ERROR_NAMES -#define _MSL_STRERROR_KNOWS_ERROR_NAMES 1 -#endif - -#ifndef _MSL_C_LOCALE_ONLY -#define _MSL_C_LOCALE_ONLY 0 -#endif - -#ifndef _MSL_FLOATING_POINT_IO -#define _MSL_FLOATING_POINT_IO 1 -#endif - -#ifndef _MSL_USES_EXIT_PROCESS -#define _MSL_USES_EXIT_PROCESS 0 -#endif - -#ifndef _MSL_USING_MW_C_HEADERS -#define _MSL_USING_MW_C_HEADERS 1 -#endif - -#ifndef _MSL_PUT_THIRD_PARTY_C_IN_STD -#define _MSL_PUT_THIRD_PARTY_C_IN_STD 0 -#endif - -#ifndef _MSL_IMP_EXP -#define _MSL_IMP_EXP -#endif - -#ifndef _MSL_IMP_EXP_C -#define _MSL_IMP_EXP_C _MSL_IMP_EXP -#endif - -#ifndef _MSL_IMP_EXP_SIOUX -#define _MSL_IMP_EXP_SIOUX _MSL_IMP_EXP -#endif - -#ifndef _MSL_IMP_EXP_RUNTIME -#define _MSL_IMP_EXP_RUNTIME _MSL_IMP_EXP -#endif - -#ifndef _MSL_MALLOC_IS_ALTIVEC_ALIGNED -#define _MSL_MALLOC_IS_ALTIVEC_ALIGNED 0 -#endif - -#ifndef _MSL_WFILEIO_AVAILABLE -#define _MSL_WFILEIO_AVAILABLE 0 -#endif - -#ifndef _MSL_FLOAT_HEX - #if _MSL_C99 - #define _MSL_FLOAT_HEX 1 - #else - #define _MSL_FLOAT_HEX 0 - #endif -#endif - -#ifndef _MSL_CDECL -#define _MSL_CDECL -#endif - -#ifndef _MSL_MATH_CDECL -#define _MSL_MATH_CDECL -#endif - -#ifndef _MSL_INLINE -#define _MSL_INLINE __inline -#endif - -#ifndef _MSL_DO_NOT_INLINE -#define _MSL_DO_NOT_INLINE __declspec(weak) -#endif - -#ifndef _MSL_LOCALDATA -#define _MSL_LOCALDATA(_a) _a -#endif - -#ifndef _MSL_LOCALDATA_AVAILABLE -#define _MSL_LOCALDATA_AVAILABLE 1 -#endif - -#ifndef _MSL_RESTRICT - #if defined(__MWERKS__) - #if __option(c99) - #define _MSL_RESTRICT restrict - #else - #define _MSL_RESTRICT - #endif - #else - #define _MSL_RESTRICT - #endif -#endif - -#ifndef _MSL_MATH_ERRHANDLING -#define _MSL_MATH_ERRHANDLING 1 -#endif - -#ifndef _MSL_LITTLE_ENDIAN - #if defined(__MWERKS__) - #if __option(little_endian) - #define _MSL_LITTLE_ENDIAN 1 - #else - #define _MSL_LITTLE_ENDIAN 0 - #endif - #else - #define _MSL_LITTLE_ENDIAN 0 - #endif -#endif - -#ifdef __cplusplus - #define _MSL_BEGIN_EXTERN_C extern "C" { - #define _MSL_END_EXTERN_C } - - #ifdef _MSL_USING_NAMESPACE - #define _MSL_BEGIN_NAMESPACE_STD namespace std { - #define _MSL_END_NAMESPACE_STD } - - #define __std(ref) ::std::ref - #define __global() :: - #else - #define _MSL_BEGIN_NAMESPACE_STD - #define _MSL_END_NAMESPACE_STD - - #define __std(ref) ref - #define __global() - #endif -#else - #define _MSL_BEGIN_EXTERN_C - #define _MSL_END_EXTERN_C - - #define _MSL_BEGIN_NAMESPACE_STD - #define _MSL_END_NAMESPACE_STD - - #define __std(ref) ref - #define __global() -#endif - -#if !defined(_MSL_NO_THROW_SPECS) - #ifndef _MSL_NO_THROW - #if defined(__cplusplus) - #define _MSL_NO_THROW throw() - #else - #define _MSL_NO_THROW - #endif - #endif - #ifndef _MSL_CANT_THROW - #define _MSL_CANT_THROW __attribute__((nothrow)) - #endif -#else - #ifndef _MSL_NO_THROW - #define _MSL_NO_THROW - #endif - #ifndef _MSL_CANT_THROW - #define _MSL_CANT_THROW - #endif -#endif - -#ifndef _MSL_ATTRIBUTE_CONST - #define _MSL_ATTRIBUTE_CONST __attribute__((const)) -#endif - -#if !defined(_MSL_USE_INLINE) && !defined(RC_INVOKED) && defined(__MWERKS__) - #if !__option(dont_inline) - #define _MSL_USE_INLINE 1 - #endif -#endif - -#ifndef __has_intrinsic - #define __has_intrinsic(_a) 0 -#endif - -#endif diff --git a/tools/cw/include/MSL_C/ansi_prefix.ARM.h b/tools/cw/include/MSL_C/ansi_prefix.ARM.h deleted file mode 100644 index 4dcbfce21c..0000000000 --- a/tools/cw/include/MSL_C/ansi_prefix.ARM.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef __ansi_prefix__ -#define __ansi_prefix__ - -#include - -#define __dest_os __arm_bare - -#ifndef _MSL_CONSOLE_SUPPORT - #define _MSL_CONSOLE_SUPPORT 1 -#endif - -#ifndef _MSL_OS_DISK_FILE_SUPPORT - #define _MSL_OS_DISK_FILE_SUPPORT 0 -#endif - -#ifndef _MSL_OS_TIME_SUPPORT - #define _MSL_OS_TIME_SUPPORT 1 -#endif - -#ifndef _MSL_CLOCK_T_AVAILABLE - #define _MSL_CLOCK_T_AVAILABLE 1 -#endif - -#ifndef _MSL_TIME_T_AVAILABLE - #define _MSL_TIME_T_AVAILABLE 1 -#endif - -#if _MSL_OS_TIME_SUPPORT && ((!_MSL_CLOCK_T_AVAILABLE) || (!_MSL_TIME_T_AVAILABLE)) - #error _MSL_CLOCK_T_AVAILABLE and _MSL_CLOCK_T_AVAILABLE must match _MSL_OS_TIME_SUPPORT -#endif - -#ifndef _MSL_THREADSAFE - #define _MSL_THREADSAFE 0 -#endif - -#ifndef _MSL_PTHREADS - #define _MSL_PTHREADS 0 -#endif - -#if _MSL_PTHREADS && !_MSL_THREADSAFE - #error _MSL_PTHREADS and _MSL_THREADSAFE must match -#endif - -#ifndef _MSL_LOCALDATA_AVAILABLE - #define _MSL_LOCALDATA_AVAILABLE 1 -#endif - -#ifndef _MSL_OS_ALLOC_SUPPORT - #define _MSL_OS_ALLOC_SUPPORT 0 -#endif - -#ifndef _MSL_HEAP_EXTERN_PROTOTYPES - #define _MSL_HEAP_EXTERN_PROTOTYPES \ - extern char __heap_addr[]; \ - extern char __heap_size[]; -#endif - -#ifndef _MSL_HEAP_START - #define _MSL_HEAP_START __heap_addr -#endif - -#ifndef _MSL_HEAP_SIZE - #define _MSL_HEAP_SIZE __heap_size -#endif - -#ifndef _MSL_LONGLONG - #define _MSL_LONGLONG 1 -#endif - -#ifndef _MSL_FLOATING_POINT - #define _MSL_FLOATING_POINT 1 -#endif - -#ifndef _MSL_WIDE_CHAR - #define _MSL_WIDE_CHAR 1 -#endif - -#ifndef _MSL_USES_SUN_MATH_LIB - #define _MSL_USES_SUN_MATH_LIB 1 -#endif - -#ifndef _MSL_POSIX - #define _MSL_POSIX 0 -#endif - -#ifndef _MSL_NEEDS_EXTRAS - #define _MSL_NEEDS_EXTRAS 0 -#endif - -#ifndef _MSL_STRERROR_KNOWS_ERROR_NAMES - #define _MSL_STRERROR_KNOWS_ERROR_NAMES 1 -#endif - -#ifndef _MSL_ASSERT_DISPLAYS_FUNC - #define _MSL_ASSERT_DISPLAYS_FUNC 1 -#endif - -#ifndef _MSL_C_LOCALE_ONLY - #define _MSL_C_LOCALE_ONLY 1 -#endif - -#ifndef _MSL_C99 - #define _MSL_C99 1 -#endif - -#if !_MSL_C99 && !_MSL_C_LOCALE_ONLY - #error _MSL_C_LOCALE_ONLY must be turned on if _MSL_C99 is off -#endif - -#ifndef _MSL_FLOATING_POINT_IO - #define _MSL_FLOATING_POINT_IO 1 -#endif - -#ifndef _MSL_USES_EXIT_PROCESS - #define _MSL_USES_EXIT_PROCESS 1 -#endif - -#ifndef _MSL_FLT_EVAL_METHOD - #define _MSL_FLT_EVAL_METHOD 0 -#endif - -#if defined(__cplusplus) - #define _MSL_USING_NAMESPACE -#endif - -#define __ANSI_OVERLOAD__ - -#define _MSL_INTEGRAL_MATH - -#if SDK_CW - #undef _MSL_OS_TIME_SUPPORT - #define _MSL_OS_TIME_SUPPORT 0 -#endif - -#endif diff --git a/tools/cw/include/MSL_C/ansi_prefix.ARM.size.h b/tools/cw/include/MSL_C/ansi_prefix.ARM.size.h deleted file mode 100644 index 3b75416946..0000000000 --- a/tools/cw/include/MSL_C/ansi_prefix.ARM.size.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __ansi_prefix_ARM_size_h__ -#define __ansi_prefix_ARM_size_h__ - -#define _MSL_C_LOCALE_ONLY 1 -#define _MSL_FLOATING_POINT_IO 0 -#define _MSL_ACCURATE_BUT_LARGE_ANSI_FP 0 -#define _MSL_STRERROR_KNOWS_ERROR_NAMES 0 -#define _MSL_ASSERT_DISPLAYS_FUNC 0 - -#endif diff --git a/tools/cw/include/MSL_C/arith.h b/tools/cw/include/MSL_C/arith.h deleted file mode 100644 index 5f58852b8e..0000000000 --- a/tools/cw/include/MSL_C/arith.h +++ /dev/null @@ -1,41 +0,0 @@ -#ifndef _MSL_ARITH_H -#define _MSL_ARITH_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -int _MSL_CDECL __msl_add(int * x, int y) _MSL_CANT_THROW; -int _MSL_CDECL __msl_ladd(long * x, long y) _MSL_CANT_THROW; - -int _MSL_CDECL __msl_mul(int * x, int y) _MSL_CANT_THROW; -int _MSL_CDECL __msl_lmul(long * x, long y) _MSL_CANT_THROW; - -__std(ldiv_t) _MSL_CDECL __msl_ldiv(long x, long y) _MSL_CANT_THROW; -__std(div_t) _MSL_CDECL __msl_div(int x, int y) _MSL_CANT_THROW; - - #if _MSL_LONGLONG - -int _MSL_CDECL __lladd(long long * x, long long y) _MSL_CANT_THROW; -int _MSL_CDECL __llmul(long long * x, long long y) _MSL_CANT_THROW; - #if _MSL_C99 -__std(lldiv_t) _MSL_CDECL __lldiv(long long x, long long y) _MSL_CANT_THROW; - #endif - - #endif - - #ifndef __MOTO__ - -int _MSL_CDECL __msl_mod(int x, int y) _MSL_CANT_THROW; -long _MSL_CDECL __msl_lmod(long x, long y) _MSL_CANT_THROW; - - #if _MSL_LONGLONG -long long _MSL_CDECL __llmod(long long x, long long y) _MSL_CANT_THROW; - #endif - - #endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/assert.h b/tools/cw/include/MSL_C/assert.h deleted file mode 100644 index 0f698b45d4..0000000000 --- a/tools/cw/include/MSL_C/assert.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3000 - #pragma notonce - #endif -#endif - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - #include -#endif diff --git a/tools/cw/include/MSL_C/assert_api.h b/tools/cw/include/MSL_C/assert_api.h deleted file mode 100644 index de3722e78f..0000000000 --- a/tools/cw/include/MSL_C/assert_api.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _MSL_ASSERT_API_H -#define _MSL_ASSERT_API_H - -_MSL_BEGIN_EXTERN_C - -#ifndef _MSL_ASSERT_DISPLAYS_FUNC - #ifdef __MWERKS__ - #if __option(c99) - #define _MSL_ASSERT_DISPLAYS_FUNC 1 - #else - #define _MSL_ASSERT_DISPLAYS_FUNC 0 - #endif - #else - #define _MSL_ASSERT_DISPLAYS_FUNC 1 - #endif -#endif - -_MSL_IMP_EXP_C void _MSL_CDECL __msl_assertion_failed(char const *, char const *, char const *, int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/buffer_io.h b/tools/cw/include/MSL_C/buffer_io.h deleted file mode 100644 index 3afc3bbc15..0000000000 --- a/tools/cw/include/MSL_C/buffer_io.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef _MSL_BUFFER_IO_H -#define _MSL_BUFFER_IO_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -enum { - __align_buffer, - __dont_align_buffer -}; - -void _MSL_CDECL __convert_from_newlines(unsigned char * p, __std(size_t) * n) _MSL_CANT_THROW; -void _MSL_CDECL __convert_to_newlines(unsigned char * p, __std(size_t) * n) _MSL_CANT_THROW; -void _MSL_CDECL __prep_buffer(__std(FILE) *) _MSL_CANT_THROW; -int _MSL_CDECL __load_buffer(__std(FILE) *, __std(size_t) * bytes_loaded, int alignment) _MSL_CANT_THROW; -int _MSL_CDECL __flush_buffer(__std(FILE) *, __std(size_t) * bytes_flushed) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/cassert b/tools/cw/include/MSL_C/cassert deleted file mode 100644 index 10e118dab4..0000000000 --- a/tools/cw/include/MSL_C/cassert +++ /dev/null @@ -1,31 +0,0 @@ -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3000 - #pragma notonce - #endif -#endif - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include -#elif defined(__PALMOS_TRAPS__) - #include -#else - -#ifdef assert - #undef assert -#endif - -#ifdef NDEBUG - #define assert(ignore) ((void) 0) -#else - #include - - #if _MSL_ASSERT_DISPLAYS_FUNC - #define assert(condition) ((condition) ? ((void) 0) : __msl_assertion_failed(#condition, __FILE__, __func__, __LINE__)) - #else - #define assert(condition) ((condition) ? ((void) 0) : __msl_assertion_failed(#condition, __FILE__, 0, __LINE__)) - #endif -#endif - -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_C/cctype b/tools/cw/include/MSL_C/cctype deleted file mode 100644 index 835a69bf18..0000000000 --- a/tools/cw/include/MSL_C/cctype +++ /dev/null @@ -1,70 +0,0 @@ -#ifndef _MSL_CCTYPE -#define _MSL_CCTYPE - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#include -#include -#include -#include - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL isalnum(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isalpha(int) _MSL_CANT_THROW; -#if _MSL_C99 -_MSL_IMP_EXP_C int _MSL_CDECL isblank(int) _MSL_CANT_THROW; -#endif -_MSL_IMP_EXP_C int _MSL_CDECL iscntrl(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isdigit(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isgraph(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL islower(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isprint(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL ispunct(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isspace(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isupper(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL isxdigit(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL tolower(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL toupper(int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#if _MSL_USE_INLINE - - _MSL_INLINE int _MSL_CDECL isalnum(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_alnum); } - _MSL_INLINE int _MSL_CDECL isalpha(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_alpha); } -#if _MSL_C99 - _MSL_INLINE int _MSL_CDECL isblank(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_blank); } -#endif - _MSL_INLINE int _MSL_CDECL iscntrl(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_cntrl); } - _MSL_INLINE int _MSL_CDECL isdigit(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_digit); } - _MSL_INLINE int _MSL_CDECL isgraph(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_graph); } - _MSL_INLINE int _MSL_CDECL islower(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_lower); } - _MSL_INLINE int _MSL_CDECL isprint(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_print); } - _MSL_INLINE int _MSL_CDECL ispunct(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_punct); } - _MSL_INLINE int _MSL_CDECL isspace(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_space); } - _MSL_INLINE int _MSL_CDECL isupper(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_upper); } - _MSL_INLINE int _MSL_CDECL isxdigit(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? 0 : (int) (_MSL_CMAP_ACCESS[c] & __msl_xdigit); } - _MSL_INLINE int _MSL_CDECL tolower(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? c : (int) (_MSL_CLOWER_ACCESS[c]); } - _MSL_INLINE int _MSL_CDECL toupper(int c) _MSL_CANT_THROW { return ((c < 0) || (c >= __msl_cmap_size)) ? c : (int) (_MSL_CUPPER_ACCESS[c]); } - -#endif - -_MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cerrno b/tools/cw/include/MSL_C/cerrno deleted file mode 100644 index 62c6138ad0..0000000000 --- a/tools/cw/include/MSL_C/cerrno +++ /dev/null @@ -1,107 +0,0 @@ -#ifndef _MSL_CERRNO -#define _MSL_CERRNO - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include -#else - -#include - -#ifndef EAGAIN -#define EAGAIN 11 -#endif - -#ifndef EDEADLK -#define EDEADLK 35 -#endif - -#ifndef ENAMETOOLONG -#define ENAMETOOLONG 36 -#endif - -#ifndef ENOSYS -#define ENOSYS 38 -#endif - -#ifndef ENOTEMPTY -#define ENOTEMPTY 39 -#endif - -#if _MSL_C99 -#ifndef EILSEQ -#define EILSEQ 88 -#endif -#endif - -#define E2BIG 7 -#define EACCES 13 -#define EBADF 9 -#define EBUSY 16 -#define ECHILD 10 -#define EDEADLOCK EDEADLK -#define EDOM 33 -#define EEXIST 17 -#define EFAULT 14 -#define EFBIG 27 -#define EFPOS 40 -#define EINTR 4 -#define EINVAL 22 -#define EIO 5 -#define EISDIR 21 -#define EMFILE 24 -#define EMLINK 31 -#define ENFILE 23 -#define ENODEV 19 -#define ENOENT 2 -#define ENOERR 0 -#define ENOEXEC 8 -#define ENOLCK 77 -#define ENOMEM 12 -#define ENOSPC 28 -#define ENOTDIR 20 -#define ENOTTY 25 -#define ENXIO 6 -#define EPERM 1 -#define EPIPE 32 -#define ERANGE 34 -#define EROFS 30 -#define ESIGPARM 26 -#define ESPIPE 29 -#define ESRCH 3 -#define EUNKNOWN 99 -#define EXDEV 18 - -#if !defined(_MSL_ERRNO) && !defined(RC_INVOKED) - - _MSL_BEGIN_EXTERN_C - - #if _MSL_THREADSAFE && _MSL_LOCALDATA_AVAILABLE - #include - #define errno (_MSL_LOCALDATA(_errno)) - - #ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma errno_name ... - #endif - #endif - #else - _MSL_IMP_EXP_C extern int errno; - - #ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #ifndef _ENTERPRISE_C_ - #pragma errno_name errno - #endif - #endif - #endif - #endif - - _MSL_END_EXTERN_C - -#endif - -#endif - -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_C/cfloat b/tools/cw/include/MSL_C/cfloat deleted file mode 100644 index 3ce38533e5..0000000000 --- a/tools/cw/include/MSL_C/cfloat +++ /dev/null @@ -1,201 +0,0 @@ -#ifndef _MSL_CFLOAT -#define _MSL_CFLOAT - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include -#else - -#include - -#if _MSL_FLOATING_POINT - -#ifndef RC_INVOKED - -#define DECIMAL_DIG 17 - -#ifndef _MSL_FLT_EVAL_METHOD - #error _MSL_FLT_EVAL_METHOD must be defined in the ansi_prefix.xxx.h -#else - #define FLT_EVAL_METHOD _MSL_FLT_EVAL_METHOD -#endif - -#ifndef _MSL_FLOAT_SIZE - #define _MSL_FLOAT_SIZE 32 -#endif - -#ifndef _MSL_DOUBLE_SIZE - #define _MSL_DOUBLE_SIZE 64 -#endif - -#ifndef _MSL_LONG_DOUBLE_SIZE - #define _MSL_LONG_DOUBLE_SIZE 64 -#endif - -#if !_MSL_FLOAT_HEX - -_MSL_BEGIN_EXTERN_C - -extern _MSL_IMP_EXP_C _INT32 __float_min[], __float_max[], __float_epsilon[]; -extern _MSL_IMP_EXP_C _INT32 __double_min[], __double_max[], __double_epsilon[]; -extern _MSL_IMP_EXP_C _INT32 __extended_min[], __extended_max[], __extended_epsilon[]; - -_MSL_END_EXTERN_C - -#endif - -#define FLT_ROUNDS 1 -#define FLT_RADIX 2 - -#if _MSL_FLOAT_SIZE == 32 - - #define FLT_MANT_DIG 24 - #define FLT_DIG 6 - #define FLT_MIN_EXP (-125) - #define FLT_MIN_10_EXP (-37) - #define FLT_MAX_EXP 128 - #define FLT_MAX_10_EXP 38 -#if _MSL_FLOAT_HEX - #define FLT_MAX 0x1.fffffeP127F - #define FLT_EPSILON 0x1.000000P-23F - #define FLT_MIN 0x1.000000P-126F -#endif - -#else - - #error unsupported size for float in - -#endif - -#if !_MSL_FLOAT_HEX - - #define FLT_MAX (*(float *)__float_max) - #define FLT_EPSILON (*(float *)__float_epsilon) - #define FLT_MIN (*(float *)__float_min) - -#endif - -#if _MSL_DOUBLE_SIZE == 32 - - #define DBL_MANT_DIG 24 - #define DBL_DIG 6 - #define DBL_MIN_EXP (-125) - #define DBL_MIN_10_EXP (-37) - #define DBL_MAX_EXP 128 - #define DBL_MAX_10_EXP 38 -#if _MSL_FLOAT_HEX - #define DBL_MAX 0x1.fffffeP127 - #define DBL_EPSILON 0x1.000000P-23 - #define DBL_MIN 0x1.000000P-126 -#endif - -#elif _MSL_DOUBLE_SIZE == 64 - - #define DBL_MANT_DIG 53 - #define DBL_DIG 15 - #define DBL_MIN_EXP (-1021) - #define DBL_MIN_10_EXP (-308) - #define DBL_MAX_EXP 1024 - #define DBL_MAX_10_EXP 308 -#if _MSL_FLOAT_HEX - #define DBL_MAX 0x1.fffffffffffffP1023 - #define DBL_EPSILON 0x1.0000000000000P-52 - #define DBL_MIN 0x1.0000000000000P-1022 -#endif - -#elif _MSL_DOUBLE_SIZE == 80 || _MSL_DOUBLE_SIZE == 96 - - #define DBL_MANT_DIG 64 - #define DBL_DIG 18 - #define DBL_MIN_EXP (-16381) - #define DBL_MIN_10_EXP (-4931) - #define DBL_MAX_EXP 16384 - #define DBL_MAX_10_EXP 4932 -#if _MSL_FLOAT_HEX - #define DBL_MAX 0x1.fffffffffffffffeP16383 - #define DBL_EPSILON 0x1.0000000000000000P-63 - #define DBL_MIN 0x1.0000000000000000P-16382 -#endif - -#else - - #error unsupported size for double in - -#endif - -#if !_MSL_FLOAT_HEX - - #define DBL_MAX (*(double *)__double_max) - #define DBL_EPSILON (*(double *)__double_epsilon) - #define DBL_MIN (*(double *)__double_min) - -#endif - -#if _MSL_LONG_DOUBLE_SIZE == 32 - - #define LDBL_MANT_DIG 24 - #define LDBL_DIG 6 - #define LDBL_MIN_EXP (-125) - #define LDBL_MIN_10_EXP (-37) - #define LDBL_MAX_EXP 128 - #define LDBL_MAX_10_EXP 38 -#if _MSL_FLOAT_HEX - #define LDBL_MAX 0x1.fffffeP127L - #define LDBL_EPSILON 0x1.000000P-23L - #define LDBL_MIN 0x1.000000P-126L -#endif - -#elif _MSL_LONG_DOUBLE_SIZE == 64 - - #define LDBL_MANT_DIG 53 - #define LDBL_DIG 15 - #define LDBL_MIN_EXP (-1021) - #define LDBL_MIN_10_EXP (-308) - #define LDBL_MAX_EXP 1024 - #define LDBL_MAX_10_EXP 308 -#if _MSL_FLOAT_HEX - #define LDBL_MAX 0x1.fffffffffffffP1023L - #define LDBL_EPSILON 0x1.0000000000000P-52L - #define LDBL_MIN 0x1.0000000000000P-1022L -#endif - -#elif _MSL_LONG_DOUBLE_SIZE == 80 || _MSL_LONG_DOUBLE_SIZE == 96 - - #define LDBL_MANT_DIG 64 - #define LDBL_DIG 18 - #define LDBL_MIN_EXP (-16381) - #define LDBL_MIN_10_EXP (-4931) - #define LDBL_MAX_EXP 16384 - #define LDBL_MAX_10_EXP 4932 -#if _MSL_FLOAT_HEX - #define LDBL_MAX 0x1.fffffffffffffffeP16383L - #define LDBL_EPSILON 0x1.0000000000000000P-63L - #define LDBL_MIN 0x1.0000000000000000P-16382L -#endif - -#else - - #error unsupported size for long double in - -#endif - -#if !_MSL_FLOAT_HEX - - #define LDBL_MAX (*(long double *)__extended_max) - #define LDBL_EPSILON (*(long double *)__extended_epsilon) - #define LDBL_MIN (*(long double *)__extended_min) - -#endif - -#endif - -if defined(__arm) - #include -#endif - -#endif - -#endif - -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_C/char_io.h b/tools/cw/include/MSL_C/char_io.h deleted file mode 100644 index 57a9ce6d03..0000000000 --- a/tools/cw/include/MSL_C/char_io.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _MSL_CHAR_IO_H -#define _MSL_CHAR_IO_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -int _MSL_CDECL __ungotten(__std(FILE) *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/cinttypes b/tools/cw/include/MSL_C/cinttypes deleted file mode 100644 index c7abc15dfd..0000000000 --- a/tools/cw/include/MSL_C/cinttypes +++ /dev/null @@ -1,274 +0,0 @@ -#ifndef _MSL_CINTTYPES -#define _MSL_CINTTYPES - -#include - -#if _MSL_C99 - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#include -#include -#if _MSL_WIDE_CHAR - #include -#endif - -#include - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -#if _MSL_LONGLONG -typedef lldiv_t imaxdiv_t; -#else -typedef ldiv_t imaxdiv_t; -#endif - -#if (!defined(__cplusplus)) || defined(__STDC_FORMAT_MACROS) - #define PRId8 "d" - #define PRId16 "hd" - #define PRId32 "ld" - #define PRId64 "lld" - #define PRIdLEAST8 "d" - #define PRIdLEAST16 "hd" - #define PRIdLEAST32 "ld" - #define PRIdLEAST64 "lld" - #define PRIdFAST8 "d" - #define PRIdFAST16 "hd" - #define PRIdFAST32 "ld" - #define PRIdFAST64 "lld" - #define PRIdMAX "lld" - #define PRIdPTR "ld" - #define PRIi8 "i" - #define PRIi16 "hi" - #define PRIi32 "li" - #define PRIi64 "lli" - #define PRIiLEAST8 "i" - #define PRIiLEAST16 "hi" - #define PRIiLEAST32 "li" - #define PRIiLEAST64 "lli" - #define PRIiFAST8 "i" - #define PRIiFAST16 "hi" - #define PRIiFAST32 "li" - #define PRIiFAST64 "lli" - #define PRIiMAX "lli" - #define PRIiPTR "li" -#endif - -#if (!defined(__cplusplus)) || defined(__STDC_FORMAT_MACROS) - #define PRIo8 "o" - #define PRIo16 "ho" - #define PRIo32 "lo" - #define PRIo64 "llo" - #define PRIoLEAST8 "o" - #define PRIoLEAST16 "ho" - #define PRIoLEAST32 "lo" - #define PRIoLEAST64 "llo" - #define PRIoFAST8 "o" - #define PRIoFAST16 "ho" - #define PRIoFAST32 "lo" - #define PRIoFAST64 "llo" - #define PRIoMAX "llo" - #define PRIoPTR "lo" - #define PRIu8 "u" - #define PRIu16 "hu" - #define PRIu32 "lu" - #define PRIu64 "llu" - #define PRIuLEAST8 "u" - #define PRIuLEAST16 "hu" - #define PRIuLEAST32 "lu" - #define PRIuLEAST64 "llu" - #define PRIuFAST8 "u" - #define PRIuFAST16 "hu" - #define PRIuFAST32 "lu" - #define PRIuFAST64 "llu" - #define PRIuMAX "llu" - #define PRIuPTR "lu" - #define PRIx8 "x" - #define PRIx16 "hx" - #define PRIx32 "lx" - #define PRIx64 "llx" - #define PRIxLEAST8 "x" - #define PRIxLEAST16 "hx" - #define PRIxLEAST32 "lx" - #define PRIxLEAST64 "llx" - #define PRIxFAST8 "x" - #define PRIxFAST16 "hx" - #define PRIxFAST32 "lx" - #define PRIxFAST64 "llx" - #define PRIxMAX "llx" - #define PRIxPTR "lx" - #define PRIX8 "X" - #define PRIX16 "hX" - #define PRIX32 "lX" - #define PRIX64 "llX" - #define PRIXLEAST8 "X" - #define PRIXLEAST16 "hX" - #define PRIXLEAST32 "lX" - #define PRIXLEAST64 "llX" - #define PRIXFAST8 "X" - #define PRIXFAST16 "hX" - #define PRIXFAST32 "lX" - #define PRIXFAST64 "llX" - #define PRIXMAX "llX" - #define PRIXPTR "lX" -#endif - -#if (!defined(__cplusplus)) || defined(__STDC_FORMAT_MACROS) - #define SCNd8 "hhd" - #define SCNd16 "hd" - #define SCNd32 "ld" - #define SCNd64 "lld" - #define SCNdLEAST8 "hhd" - #define SCNdLEAST16 "hd" - #define SCNdLEAST32 "ld" - #define SCNdLEAST64 "lld" - #define SCNdFAST8 "hhd" - #define SCNdFAST16 "hd" - #define SCNdFAST32 "ld" - #define SCNdFAST64 "lld" - #define SCNdMAX "lld" - #define SCNdPTR "ld" - #define SCNi8 "hhi" - #define SCNi16 "hi" - #define SCNi32 "li" - #define SCNi64 "lli" - #define SCNiLEAST8 "hhi" - #define SCNiLEAST16 "hi" - #define SCNiLEAST32 "li" - #define SCNiLEAST64 "lli" - #define SCNiFAST8 "hhi" - #define SCNiFAST16 "hi" - #define SCNiFAST32 "li" - #define SCNiFAST64 "lli" - #define SCNiMAX "lli" - #define SCNiPTR "li" -#endif - -#if (!defined(__cplusplus)) || defined(__STDC_FORMAT_MACROS) - #define SCNo8 "hho" - #define SCNo16 "ho" - #define SCNo32 "lo" - #define SCNo64 "llo" - #define SCNoLEAST8 "hho" - #define SCNoLEAST16 "ho" - #define SCNoLEAST32 "lo" - #define SCNoLEAST64 "llo" - #define SCNoFAST8 "hho" - #define SCNoFAST16 "ho" - #define SCNoFAST32 "lo" - #define SCNoFAST64 "llo" - #define SCNoMAX "llo" - #define SCNoPTR "lo" - #define SCNu8 "hhu" - #define SCNu16 "hu" - #define SCNu32 "lu" - #define SCNu64 "llu" - #define SCNuLEAST8 "hhu" - #define SCNuLEAST16 "hu" - #define SCNuLEAST32 "lu" - #define SCNuLEAST64 "llu" - #define SCNuFAST8 "hhu" - #define SCNuFAST16 "hu" - #define SCNuFAST32 "lu" - #define SCNuFAST64 "llu" - #define SCNuMAX "llu" - #define SCNuPTR "lu" - #define SCNx8 "hhx" - #define SCNx16 "hx" - #define SCNx32 "lx" - #define SCNx64 "llx" - #define SCNxLEAST8 "hhx" - #define SCNxLEAST16 "hx" - #define SCNxLEAST32 "lx" - #define SCNxLEAST64 "llx" - #define SCNxFAST8 "hhx" - #define SCNxFAST16 "hx" - #define SCNxFAST32 "lx" - #define SCNxFAST64 "llx" - #define SCNxMAX "llx" - #define SCNxPTR "lx" -#endif - -#if _MSL_LONGLONG -intmax_t _MSL_CDECL imaxabs(intmax_t j) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL imaxabs (intmax_t j) _MSL_CANT_THROW { - return (llabs(j)); -} -#else -intmax_t _MSL_CDECL imaxabs(intmax_t j) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL imaxabs (intmax_t j) _MSL_CANT_THROW { - return (labs(j)); -} -#endif - -#if _MSL_LONGLONG -imaxdiv_t _MSL_CDECL imaxdiv(intmax_t numer, intmax_t denom) _MSL_CANT_THROW; -_MSL_INLINE imaxdiv_t _MSL_CDECL imaxdiv (intmax_t numer, intmax_t denom) _MSL_CANT_THROW { - return (lldiv(numer, denom)); -} -#else -imaxdiv_t _MSL_CDECL imaxdiv(intmax_t numer, intmax_t denom) _MSL_CANT_THROW; -_MSL_INLINE imaxdiv_t _MSL_CDECL imaxdiv (intmax_t numer, intmax_t denom) _MSL_CANT_THROW { - return (ldiv(numer, denom)); -} -#endif - -#if _MSL_LONGLONG -intmax_t _MSL_CDECL strtoimax(const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL strtoimax (const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (strtoll(nptr, endptr, base)); -} -uintmax_t _MSL_CDECL strtoumax(const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE uintmax_t _MSL_CDECL strtoumax (const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (strtoull(nptr, endptr, base)); -} -#else -intmax_t _MSL_CDECL strtoimax(const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL strtoimax (const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (strtol(nptr, endptr, base)); -} -uintmax_t _MSL_CDECL strtoumax(const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE uintmax_t _MSL_CDECL strtoumax (const char * _MSL_RESTRICT nptr, char * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (strtoul(nptr, endptr, base)); -} -#endif - -#if _MSL_WIDE_CHAR - #if _MSL_LONGLONG -intmax_t _MSL_CDECL wcstoimax(const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL wcstoimax (const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (wcstoll(nptr, endptr, base)); -} -uintmax_t _MSL_CDECL wcstoumax(const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE uintmax_t _MSL_CDECL wcstoumax (const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (wcstoull(nptr, endptr, base)); -} - #else -intmax_t _MSL_CDECL wcstoimax(const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE intmax_t _MSL_CDECL wcstoimax (const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (wcstol(nptr, endptr, base)); -} -uintmax_t _MSL_CDECL wcstoumax(const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW; -_MSL_INLINE uintmax_t _MSL_CDECL wcstoumax (const wchar_t * _MSL_RESTRICT nptr, wchar_t * * _MSL_RESTRICT endptr, int base) _MSL_CANT_THROW { - return (wcstoul(nptr, endptr, base)); -} - #endif -#endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif -#endif -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_C/ciso646 b/tools/cw/include/MSL_C/ciso646 deleted file mode 100644 index 35f57db735..0000000000 --- a/tools/cw/include/MSL_C/ciso646 +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _MSL_CISO646 -#define _MSL_CISO646 - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#ifndef RC_INVOKED - - #ifndef __cplusplus - - #define and && - #define and_eq &= - #define bitand & - #define bitor | - #define compl ~ - #define not ! - #define not_eq != - #define or || - #define or_eq |= - #define xor ^ - #define xor_eq ^= - - #endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/climits b/tools/cw/include/MSL_C/climits deleted file mode 100644 index e1611314b7..0000000000 --- a/tools/cw/include/MSL_C/climits +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _MSL_CLIMITS -#define _MSL_CLIMITS - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include -#else - -#ifndef RC_INVOKED - -#include - -#define MB_LEN_MAX _MSL_MB_LEN_MAX -#define CHAR_BIT _MSL_CHAR_BIT - -#define SCHAR_MAX _MSL_SCHAR_MAX -#define UCHAR_MAX _MSL_UCHAR_MAX -#define SCHAR_MIN _MSL_SCHAR_MIN - -#define CHAR_MIN _MSL_CHAR_MIN -#define CHAR_MAX _MSL_CHAR_MAX - -#define SHRT_MAX _MSL_SHRT_MAX -#define USHRT_MAX _MSL_USHRT_MAX -#define SHRT_MIN _MSL_SHRT_MIN - -#define INT_MAX _MSL_INT_MAX -#define UINT_MAX _MSL_UINT_MAX -#define INT_MIN _MSL_INT_MIN - -#define LONG_MAX _MSL_LONG_MAX -#define ULONG_MAX _MSL_ULONG_MAX -#define LONG_MIN _MSL_LONG_MIN - -#if _MSL_LONGLONG && _MSL_C99 - #define LLONG_MAX _MSL_LLONG_MAX - #define ULLONG_MAX _MSL_ULLONG_MAX - #define LLONG_MIN _MSL_LLONG_MIN -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/clocale b/tools/cw/include/MSL_C/clocale deleted file mode 100644 index 6657e46050..0000000000 --- a/tools/cw/include/MSL_C/clocale +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef _MSL_CLOCALE -#define _MSL_CLOCALE - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#ifndef RC_INVOKED - -#include - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #define LC_FIRST 0 - #define LC_COLLATE 0x01 - #define LC_CTYPE 0x02 - #define LC_MONETARY 0x04 - #define LC_NUMERIC 0x08 - #define LC_TIME 0x10 - #define LC_ALL 0x1F - #define LC_LAST LC_ALL - -#if !_MSL_C_LOCALE_ONLY - #pragma options align=native - #pragma warn_padding off -struct lconv { - char * decimal_point; - char * thousands_sep; - char * grouping; - char * mon_decimal_point; - char * mon_thousands_sep; - char * mon_grouping; - char * positive_sign; - char * negative_sign; - char * currency_symbol; - char frac_digits; - char p_cs_precedes; - char n_cs_precedes; - char p_sep_by_space; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char * int_curr_symbol; - char int_frac_digits; -#if _MSL_C99 - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -#endif -}; - #pragma warn_padding reset - #pragma options align=reset - -_MSL_IMP_EXP_C struct lconv * _MSL_CDECL localeconv(void) _MSL_CANT_THROW; - -#endif - -_MSL_IMP_EXP_C char * _MSL_CDECL setlocale(int, const char *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cmath b/tools/cw/include/MSL_C/cmath deleted file mode 100644 index 6fd5b7ab4b..0000000000 --- a/tools/cw/include/MSL_C/cmath +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _MSL_CMATH -#define _MSL_CMATH - -#ifndef __cmath__ - #define __cmath__ -#endif - -#include - -#if _MSL_FLOATING_POINT && !defined(_MSL_NO_MATH_LIB) - -#if _MSL_C99 - #ifndef MATH_ERRNO - #define MATH_ERRNO 1 - #endif - - #ifndef MATH_ERREXCEPT - #define MATH_ERREXCEPT 2 - #endif - - #ifndef math_errhandling - #define math_errhandling _MSL_MATH_ERRHANDLING - #endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/complex.h b/tools/cw/include/MSL_C/complex.h deleted file mode 100644 index f5fe389e5d..0000000000 --- a/tools/cw/include/MSL_C/complex.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _MSL_COMPLEX_H -#define _MSL_COMPLEX_H - -#ifdef __cplusplus - -#include - -#ifndef _MSL_NO_CPP_NAMESPACE - #if _MSL_FLOATING_POINT && !defined(_MSL_NO_MATH_LIB) -using std::complex; - #endif -#endif - -#else - -#include - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #endif -#else - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/console_io.h b/tools/cw/include/MSL_C/console_io.h deleted file mode 100644 index 080b7b61f3..0000000000 --- a/tools/cw/include/MSL_C/console_io.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MSL_CONSOLE_IO_H -#define _MSL_CONSOLE_IO_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - - #if _MSL_CONSOLE_SUPPORT -int _MSL_CDECL __read_console(__std(__file_handle) handle, unsigned char * buffer, __std(size_t) * count, __std(__ref_con) ref_con); -int _MSL_CDECL __write_console(__std(__file_handle) handle, unsigned char * buffer, __std(size_t) * count, __std(__ref_con) ref_con); -int _MSL_CDECL __close_console(__std(__file_handle) handle) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/critical_regions.NITRO.h b/tools/cw/include/MSL_C/critical_regions.NITRO.h deleted file mode 100644 index 122018eaf6..0000000000 --- a/tools/cw/include/MSL_C/critical_regions.NITRO.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _MSL_CRITICAL_REGIONS_PTHREADS_H -#define _MSL_CRITICAL_REGIONS_PTHREADS_H - -#include -#include -#include - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C extern OSMutex __cs[num_critical_regions]; -extern int __cs_id[num_critical_regions]; -extern int __cs_ref[num_critical_regions]; - -_MSL_INLINE void __init_critical_regions (void) _MSL_CANT_THROW { - int i; - - for (i = 0; i < num_critical_regions; i++) { - OS_InitMutex(&__cs[i]); - } -} - -_MSL_INLINE void __kill_critical_regions (void) _MSL_CANT_THROW { -} - -_MSL_INLINE void __begin_critical_region (int region) _MSL_CANT_THROW { - OSThread * currentThread; - - if (OS_TryLockMutex(&__cs[region]) == 0) { - currentThread = OS_GetCurrentThread(); - __cs_id[region] = OS_GetThreadId(currentThread); - __cs_ref[region] = 1; - } else { - currentThread = OS_GetCurrentThread(); - OS_GetThreadId(currentThread); - if (OS_GetThreadId(currentThread) == __cs_id[region]) { - __cs_ref[region]++; - } else { - OS_LockMutex(&__cs[region]); - currentThread = OS_GetCurrentThread(); - __cs_id[region] = OS_GetThreadId(currentThread); - __cs_ref[region] = 1; - } - } -} - -_MSL_INLINE void __end_critical_region (int region) _MSL_CANT_THROW { - if (--__cs_ref[region] == 0) { - OS_UnlockMutex(&__cs[region]); - } -} - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/critical_regions.h b/tools/cw/include/MSL_C/critical_regions.h deleted file mode 100644 index 8e99bd0b10..0000000000 --- a/tools/cw/include/MSL_C/critical_regions.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef _MSL_CRITICAL_REGIONS_H -#define _MSL_CRITICAL_REGIONS_H - -#include - -_MSL_BEGIN_EXTERN_C - - enum critical_regions - { - atexit_funcs_access =0, - malloc_pool_access =1, - stdin_access =2, - stdout_access =3, - stderr_access =4, - files_access =5, - console_status_access =6, - signal_funcs_access =7, - thread_access =8, - num_critical_regions =9 - }; - - #if _MSL_THREADSAFE - - _MSL_INLINE void _MSL_CDECL __init_critical_regions(void) _MSL_CANT_THROW; - _MSL_INLINE void _MSL_CDECL __kill_critical_regions(void) _MSL_CANT_THROW; - _MSL_INLINE void _MSL_CDECL __begin_critical_region(int region) _MSL_CANT_THROW; - _MSL_INLINE void _MSL_CDECL __end_critical_region(int region) _MSL_CANT_THROW; - - #if __dest_os == __arm_bare - #include - #elif _MSL_PTHREADS - #include - #endif - - #else - - #define __init_critical_regions() - #define __kill_critical_regions() - #define __begin_critical_region(x) - #define __end_critical_region(x) - - #endif - -_MSL_END_EXTERN_C - -#endif - - - - - - - - - - - - - - - - - - - - diff --git a/tools/cw/include/MSL_C/critical_regions.pthreads.h b/tools/cw/include/MSL_C/critical_regions.pthreads.h deleted file mode 100644 index 870d46a1a5..0000000000 --- a/tools/cw/include/MSL_C/critical_regions.pthreads.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _MSL_CRITICAL_REGIONS_PTHREADS_H -#define _MSL_CRITICAL_REGIONS_PTHREADS_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C extern pthread_mutex_t __cs[num_critical_regions]; - -_MSL_INLINE void __init_critical_regions (void) _MSL_CANT_THROW { - int i; - - for (i = 0; i < num_critical_regions; i++) { - pthread_mutex_init(&__cs[i], 0); - } - -#if _MSL_LOCALDATA_AVAILABLE - __msl_InitializeMainThreadData(); -#endif -} - -_MSL_INLINE void __kill_critical_regions (void) _MSL_CANT_THROW { - int i; - -#if _MSL_LOCALDATA_AVAILABLE - __msl_DisposeAllThreadData(); -#endif - - for (i = 0; i < num_critical_regions; i++) { - pthread_mutex_destroy(&__cs[i]); - } -} - -_MSL_INLINE void __begin_critical_region (int region) _MSL_CANT_THROW { - pthread_mutex_lock(&__cs[region]); -} - -_MSL_INLINE void __end_critical_region (int region) _MSL_CANT_THROW { - pthread_mutex_unlock(&__cs[region]); -} - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/csetjmp b/tools/cw/include/MSL_C/csetjmp deleted file mode 100644 index 9a40abb0a6..0000000000 --- a/tools/cw/include/MSL_C/csetjmp +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _MSL_CSETJMP -#define _MSL_CSETJMP - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#ifndef RC_INVOKED - -#if __dest_os == __arm_bare - #include -#else - #error Unknown platform -#endif - -#ifndef _MSL_SETJMP_LONGJMP_DEFINED -#define _MSL_SETJMP_LONGJMP_DEFINED - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL setjmp(__std(jmp_buf)); - -_MSL_END_EXTERN_C - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C void _MSL_CDECL longjmp(jmp_buf, int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C void _MSL_CDECL __longjmp_ldestr(jmp_buf, int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/csignal b/tools/cw/include/MSL_C/csignal deleted file mode 100644 index 1f862f1b87..0000000000 --- a/tools/cw/include/MSL_C/csignal +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef _MSL_CSIGNAL -#define _MSL_CSIGNAL - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -typedef int sig_atomic_t; -typedef void (* __signal_func_ptr)(int); - -_MSL_IMP_EXP_C __signal_func_ptr _MSL_CDECL signal(int, __signal_func_ptr) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL raise(int) _MSL_CANT_THROW; - - #ifndef SIG_DFL - #define SIG_DFL ((__std(__signal_func_ptr)) 0) - #endif - - #ifndef SIG_IGN - #define SIG_IGN ((__std(__signal_func_ptr)) 1) - #endif - - #ifndef SIG_ERR - #define SIG_ERR ((__std(__signal_func_ptr)) - 1) - #endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#ifndef SIGABRT -#define SIGABRT 1 -#endif - -#ifndef SIGFPE -#define SIGFPE 2 -#endif - -#ifndef SIGILL -#define SIGILL 3 -#endif - -#ifndef SIGINT -#define SIGINT 4 -#endif - -#ifndef SIGSEGV -#define SIGSEGV 5 -#endif - -#ifndef SIGTERM -#define SIGTERM 6 -#endif - -#ifndef SIGBREAK -#define SIGBREAK 7 -#endif - -#define __msl_signal_max 7 - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cstdarg b/tools/cw/include/MSL_C/cstdarg deleted file mode 100644 index df54cb8ff1..0000000000 --- a/tools/cw/include/MSL_C/cstdarg +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _MSL_CSTDARG -#define _MSL_CSTDARG - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#include - -#if __dest_os == __arm_bare - #include -#else - #error Unknown platform -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cstddef b/tools/cw/include/MSL_C/cstddef deleted file mode 100644 index 2c4580db42..0000000000 --- a/tools/cw/include/MSL_C/cstddef +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _MSL_CSTDDEF -#define _MSL_CSTDDEF - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#ifndef RC_INVOKED - -#include -#include -#include - -#ifndef _MSL_OFFSETOF - #define _MSL_OFFSETOF(type, member) ((__std(size_t)) & (((type *)0)->member)) -#endif - -#ifndef offsetof - #define offsetof(type, member) _MSL_OFFSETOF(type, member) -#endif - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #ifndef _MSL_PTRDIFF_T_TYPE - #define _MSL_PTRDIFF_T_TYPE __typeof__((char *)0 - (char *)0) - #endif - -typedef _MSL_PTRDIFF_T_TYPE ptrdiff_t; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cstdint b/tools/cw/include/MSL_C/cstdint deleted file mode 100644 index b664c285ac..0000000000 --- a/tools/cw/include/MSL_C/cstdint +++ /dev/null @@ -1,217 +0,0 @@ -#ifndef _MSL_CSTDINT -#define _MSL_CSTDINT - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#include -#include - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -typedef signed char int8_t; -typedef short int int16_t; -typedef long int int32_t; - -#if _MSL_LONGLONG -typedef long long int64_t; -#endif - -typedef unsigned char uint8_t; -typedef unsigned short int uint16_t; -typedef unsigned long int uint32_t; - -#if _MSL_LONGLONG -typedef unsigned long long uint64_t; -#endif - -#if (_MSL_C99 || defined(__cplusplus)) - -typedef signed char int_least8_t; -typedef short int int_least16_t; -typedef long int int_least32_t; - -#if _MSL_LONGLONG -typedef long long int_least64_t; -#endif - -typedef unsigned char uint_least8_t; -typedef unsigned short int uint_least16_t; -typedef unsigned long int uint_least32_t; - -#if _MSL_LONGLONG -typedef unsigned long long uint_least64_t; -#endif - -typedef signed char int_fast8_t; -typedef short int int_fast16_t; -typedef long int int_fast32_t; - -#if _MSL_LONGLONG -typedef long long int_fast64_t; -#endif - -typedef unsigned char uint_fast8_t; -typedef unsigned short int uint_fast16_t; -typedef unsigned long int uint_fast32_t; - -#if _MSL_LONGLONG -typedef unsigned long long uint_fast64_t; -#endif - -typedef int32_t intptr_t; -typedef uint32_t uintptr_t; - -#if _MSL_LONGLONG -typedef int64_t intmax_t; -#else -typedef int32_t intmax_t; -#endif - -#if _MSL_LONGLONG -typedef uint64_t uintmax_t; -#else -typedef uint32_t uintmax_t; -#endif - -#endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif -#endif - -#endif - -#if _MSL_USING_MW_C_HEADERS - -#if (!defined(__cplusplus)) || defined(__STDC_LIMIT_MACROS) -#ifndef INT8_MIN - -#define INT8_MIN _MSL_SCHAR_MIN -#define INT16_MIN _MSL_SHRT_MIN -#define INT32_MIN _MSL_LONG_MIN -#if _MSL_LONGLONG -#define INT64_MIN _MSL_LLONG_MIN -#endif - -#define INT8_MAX _MSL_SCHAR_MAX -#define INT16_MAX _MSL_SHRT_MAX -#define INT32_MAX _MSL_LONG_MAX -#if _MSL_LONGLONG -#define INT64_MAX _MSL_LLONG_MAX -#endif - -#define UINT8_MAX _MSL_UCHAR_MAX -#define UINT16_MAX _MSL_USHRT_MAX -#define UINT32_MAX _MSL_ULONG_MAX -#if _MSL_LONGLONG -#define UINT64_MAX _MSL_ULLONG_MAX -#endif - -#define INT_LEAST8_MIN _MSL_SCHAR_MIN -#define INT_LEAST16_MIN _MSL_SHRT_MIN -#define INT_LEAST32_MIN _MSL_LONG_MIN -#if _MSL_LONGLONG -#define INT_LEAST64_MIN _MSL_LLONG_MIN -#endif - -#define INT_LEAST8_MAX _MSL_SCHAR_MAX -#define INT_LEAST16_MAX _MSL_SHRT_MAX -#define INT_LEAST32_MAX _MSL_LONG_MAX -#if _MSL_LONGLONG -#define INT_LEAST64_MAX _MSL_LLONG_MAX -#endif -#define UINT_LEAST8_MAX _MSL_UCHAR_MAX -#define UINT_LEAST16_MAX _MSL_USHRT_MAX -#define UINT_LEAST32_MAX _MSL_ULONG_MAX -#if _MSL_LONGLONG -#define UINT_LEAST64_MAX _MSL_ULLONG_MAX -#endif - -#define INT_FAST8_MIN _MSL_SCHAR_MIN -#define INT_FAST16_MIN _MSL_SHRT_MIN -#define INT_FAST32_MIN _MSL_LONG_MIN -#if _MSL_LONGLONG -#define INT_FAST64_MIN _MSL_LLONG_MIN -#endif - -#define INT_FAST8_MAX _MSL_SCHAR_MAX -#define INT_FAST16_MAX _MSL_SHRT_MAX -#define INT_FAST32_MAX _MSL_LONG_MAX -#if _MSL_LONGLONG -#define INT_FAST64_MAX _MSL_LLONG_MAX -#endif - -#define UINT_FAST8_MAX _MSL_UCHAR_MAX -#define UINT_FAST16_MAX _MSL_USHRT_MAX -#define UINT_FAST32_MAX _MSL_ULONG_MAX -#if _MSL_LONGLONG -#define UINT_FAST64_MAX _MSL_ULLONG_MAX -#endif - -#define INTPTR_MIN _MSL_LONG_MIN -#define INTPTR_MAX _MSL_LONG_MAX -#define UINTPTR_MAX _MSL_ULONG_MAX - -#if _MSL_LONGLONG - #define INTMAX_MIN _MSL_LLONG_MIN - #define INTMAX_MAX _MSL_LLONG_MAX - #define UINTMAX_MAX _MSL_ULLONG_MAX -#endif - -#define PTRDIFF_MIN _MSL_LONG_MIN -#define PTRDIFF_MAX _MSL_LONG_MAX -#define SIG_ATOMIC_MIN _MSL_INT_MIN -#define SIG_ATOMIC_MAX _MSL_INT_MAX - -#define SIZE_MAX _MSL_ULONG_MAX - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ - #ifndef _MSL_RSIZE_MAX - #define _MSL_RSIZE_MAX (SIZE_MAX >> 1) - #endif - - #define RSIZE_MAX _MSL_RSIZE_MAX -#endif - -#if _MSL_WIDE_CHAR - #include - #define WINT_MIN WCHAR_MIN - #define WINT_MAX WCHAR_MAX -#endif - -#endif -#endif - -#if (!defined(__cplusplus)) || defined(__STDC_CONSTANT_MACROS) -#ifndef INT8_C - -#define INT8_C(value) value -#define INT16_C(value) value -#define INT32_C(value) value ## L -#define INT64_C(value) value ## LL -#define UINT8_C(value) value ## U -#define UINT16_C(value) value ## U -#define UINT32_C(value) value ## UL -#define UINT64_C(value) value ## ULL - -#if _MSL_LONGLONG - #define INTMAX_C(value) value ## LL - #define UINTMAX_C(value) value ## ULL -#endif - -#endif -#endif -#endif diff --git a/tools/cw/include/MSL_C/cstdio b/tools/cw/include/MSL_C/cstdio deleted file mode 100644 index a633940f04..0000000000 --- a/tools/cw/include/MSL_C/cstdio +++ /dev/null @@ -1,184 +0,0 @@ -#ifndef _MSL_CSTDIO -#define _MSL_CSTDIO - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#include -#include -#include -#include - -#if _MSL_WFILEIO_AVAILABLE - #include -#endif - -#include -#include -#include -#include - -#if _MSL_POSIX - #include -#endif - -#ifndef RC_INVOKED - -#pragma options align=native - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C void _MSL_CDECL setbuf(FILE * _MSL_RESTRICT, char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL setvbuf(FILE * _MSL_RESTRICT, char * _MSL_RESTRICT, int, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fclose(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fflush(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fscanf(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL scanf(const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL sprintf(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL snprintf(char * _MSL_RESTRICT, size_t, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL sscanf(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfscanf(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vsscanf(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vscanf(const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfprintf(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vprintf(const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vsprintf(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vsnprintf(char * _MSL_RESTRICT, size_t, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fgetc(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL fgets(char * _MSL_RESTRICT, int, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fputc(int, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fputs(const char * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL gets(char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL puts(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL ungetc(int, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL fread(void * _MSL_RESTRICT, size_t, size_t, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL fwrite(const void * _MSL_RESTRICT, size_t, size_t, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fgetpos(FILE * _MSL_RESTRICT, fpos_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long _MSL_CDECL ftell(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fsetpos(FILE *, const fpos_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fseek(FILE *, long, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL rewind(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL clearerr(FILE *) _MSL_CANT_THROW; - -#if _MSL_OS_DISK_FILE_SUPPORT -_MSL_IMP_EXP_C void _MSL_CDECL perror(const char *) _MSL_CANT_THROW; -#endif - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C int _MSL_CDECL fscanf_s(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL scanf_s(const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL sscanf_s(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfscanf_s(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vsscanf_s(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL gets_s(char *, rsize_t) _MSL_CANT_THROW; -#endif - -#if _MSL_OS_DISK_FILE_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL remove(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL rename(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL tmpnam(char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C FILE * _MSL_CDECL tmpfile(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fprintf(FILE * _MSL_RESTRICT, const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C FILE * _MSL_CDECL fopen(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C FILE * _MSL_CDECL freopen(const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL fopen_s(FILE * _MSL_RESTRICT * _MSL_RESTRICT, const char * _MSL_RESTRICT, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL freopen_s(FILE * _MSL_RESTRICT * _MSL_RESTRICT, const char * _MSL_RESTRICT, const char * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL tmpfile_s(FILE * *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL tmpnam_s(char *, rsize_t) _MSL_CANT_THROW; -#endif -#if _MSL_WFILEIO_AVAILABLE -_MSL_IMP_EXP_C int _MSL_CDECL _wremove(const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL _wrename(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL _wtmpnam(wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C FILE * _MSL_CDECL _wfopen(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C FILE * _MSL_CDECL _wfreopen(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL _wfopen_s(FILE * _MSL_RESTRICT * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL _wfreopen_s(FILE * _MSL_RESTRICT * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL _wtmpnam_s(wchar_t *, rsize_t) _MSL_CANT_THROW; -#endif -#endif -#endif - -#if _MSL_CONSOLE_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL printf(const char * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -#endif - -#ifdef __cplusplus - -#if _MSL_THREADSAFE -_MSL_IMP_EXP_C int _MSL_CDECL getc(FILE *); -_MSL_IMP_EXP_C int _MSL_CDECL putc(int c, FILE *); - -_MSL_END_EXTERN_C -#else -_MSL_END_EXTERN_C - -inline int _MSL_CDECL getc (FILE * file) _MSL_CANT_THROW { - return __getc(file); -} - -inline int _MSL_CDECL putc (int c, FILE * file) _MSL_CANT_THROW { - return __putc(c, file); -} -#endif - -inline int _MSL_CDECL getchar () _MSL_CANT_THROW { - return getc(stdin); -} - -inline int _MSL_CDECL putchar (int c) _MSL_CANT_THROW { - return putc(c, stdout); -} - -inline int _MSL_CDECL feof (FILE * file) _MSL_CANT_THROW { - return file->state.eof; -} - -inline int _MSL_CDECL ferror (FILE * file) _MSL_CANT_THROW { - return file->state.error; -} - -#else - -_MSL_IMP_EXP_C int _MSL_CDECL getc(FILE *); -_MSL_IMP_EXP_C int _MSL_CDECL putc(int c, FILE *); - -#if !_MSL_THREADSAFE - #define getc(file) __getc(file) - #define putc(c, file) __putc(c, file) -#endif - -_MSL_IMP_EXP_C int _MSL_CDECL getchar(void); -_MSL_IMP_EXP_C int _MSL_CDECL putchar(int c); - - #define getchar() __std(getc)(stdin) - #define putchar(c) __std(putc)(c, stdout) - -_MSL_IMP_EXP_C int _MSL_CDECL feof(FILE *); -_MSL_IMP_EXP_C int _MSL_CDECL ferror(FILE *); - - #define feof(file) ((file)->state.eof) - #define ferror(file) ((file)->state.error) - -#endif - -_MSL_END_NAMESPACE_STD - -#pragma options align=reset - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cstdlib b/tools/cw/include/MSL_C/cstdlib deleted file mode 100644 index aeb4af5d78..0000000000 --- a/tools/cw/include/MSL_C/cstdlib +++ /dev/null @@ -1,233 +0,0 @@ -#ifndef _MSL_CSTDLIB -#define _MSL_CSTDLIB - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#elif defined(__PALMOS_TRAPS__) - #include -#else - -#include -#include -#include -#include -#include - -#if _MSL_WIDE_CHAR - #include -#endif - -#if _MSL_NEEDS_EXTRAS - #include -#endif - -#ifndef RC_INVOKED - -#ifndef _MSL_MB_CUR_MAX - #define _MSL_MB_CUR_MAX 3 -#endif - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -#define RAND_MAX 32767 - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ - #define RAND_MAX_S 32767 -#endif - -#define MB_CUR_MAX _MSL_MB_CUR_MAX - -#define EXIT_SUCCESS 0 -#define EXIT_FAILURE 1 - -#define _MAX_PATH 1024 - -#if _MSL_FLOATING_POINT -_MSL_IMP_EXP_C double _MSL_CDECL atof(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C double _MSL_CDECL strtod(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long double _MSL_CDECL strtold(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT) _MSL_CANT_THROW; -#if _MSL_C99 -_MSL_IMP_EXP_C float _MSL_CDECL strtof(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT) _MSL_CANT_THROW; -#endif -#endif - -_MSL_IMP_EXP_C int _MSL_CDECL atoi(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long _MSL_CDECL atol(const char *) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -#if _MSL_C99 -_MSL_IMP_EXP_C long long _MSL_CDECL atoll(const char *) _MSL_CANT_THROW; -#endif -#endif - -_MSL_IMP_EXP_C long _MSL_CDECL strtol(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned long _MSL_CDECL strtoul(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT, int) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -#if _MSL_C99 -_MSL_IMP_EXP_C long long _MSL_CDECL strtoll(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned long long _MSL_CDECL strtoull(const char * _MSL_RESTRICT, char * * _MSL_RESTRICT, int) _MSL_CANT_THROW; -#endif -#endif - -_MSL_IMP_EXP_C int _MSL_CDECL rand(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL srand(unsigned int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL calloc(size_t, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL free(void *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL malloc(size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL realloc(void *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL __msize(void *) _MSL_CANT_THROW; - -#if !(defined(_MSL_PRO4_MALLOC) || defined(_MSL_CLASSIC_MALLOC) || defined(_MSL_MALLOC_BACKUP)) - -#ifndef _MSL_ALLOCATE_SIZE - #define _MSL_ALLOCATE_SIZE __allocate_size -#endif - -#ifndef _MSL_ALLOCATE - #define _MSL_ALLOCATE __allocate -#endif - -#ifndef _MSL_ALLOCATE_RESIZE - #define _MSL_ALLOCATE_RESIZE __allocate_resize -#endif - -#ifndef _MSL_ALLOCATE_EXPAND - #define _MSL_ALLOCATE_EXPAND __allocate_expand -#endif - -_MSL_IMP_EXP_C size_t _MSL_CDECL _MSL_ALLOCATE_SIZE(void *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL _MSL_ALLOCATE(size_t, size_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL _MSL_ALLOCATE_RESIZE(void *, size_t, size_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL _MSL_ALLOCATE_EXPAND(void *, size_t, size_t, size_t *) _MSL_CANT_THROW; - -#endif - -#ifdef __VEC__ - -_MSL_IMP_EXP_C void * _MSL_CDECL vec_calloc(size_t, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL vec_free(void *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL vec_malloc(size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL vec_realloc(void *, size_t) _MSL_CANT_THROW; - - #if _MSL_USE_INLINE && _MSL_MALLOC_IS_ALTIVEC_ALIGNED -_MSL_INLINE void * _MSL_CDECL vec_calloc (size_t _nmemb, size_t _size) _MSL_CANT_THROW { - return calloc(_nmemb, _size); -} -_MSL_INLINE void _MSL_CDECL vec_free (void * _ptr) _MSL_CANT_THROW { - free(_ptr); -} -_MSL_INLINE void * _MSL_CDECL vec_malloc (size_t _size) _MSL_CANT_THROW { - return malloc(_size); -} -_MSL_INLINE void * _MSL_CDECL vec_realloc (void * _ptr, size_t _size) _MSL_CANT_THROW { - return realloc(_ptr, _size); -} - #endif -#endif - -_MSL_IMP_EXP_C void _MSL_CDECL abort(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL atexit(void(_MSL_CDECL * func)(void)) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL exit(int); -#if _MSL_C99 -_MSL_IMP_EXP_C void _MSL_CDECL _Exit(int) _MSL_CANT_THROW; -#endif - -_MSL_IMP_EXP_C char * _MSL_CDECL getenv(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL system(const char *) _MSL_CANT_THROW; - -typedef int (* _compare_function)(const void *, const void *); - -_MSL_IMP_EXP_C void * _MSL_CDECL bsearch(const void *, const void *, size_t, size_t, _compare_function); -_MSL_IMP_EXP_C void _MSL_CDECL qsort(void *, size_t, size_t, _compare_function); - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL getenv_s(size_t * _MSL_RESTRICT, char * _MSL_RESTRICT, rsize_t, const char * _MSL_RESTRICT) _MSL_CANT_THROW; - -typedef int (* _compare_function_s)(const void *, const void *, void *); - -_MSL_IMP_EXP_C void * _MSL_CDECL bsearch_s(const void *, const void *, rsize_t, rsize_t, _compare_function_s, void *); -_MSL_IMP_EXP_C void _MSL_CDECL qsort_s(void *, rsize_t, rsize_t, _compare_function_s, void *); - - #if _MSL_WIDE_CHAR -_MSL_IMP_EXP_C int _MSL_CDECL wctomb_s(int * _MSL_RESTRICT, char * _MSL_RESTRICT, rsize_t, wchar_t) _MSL_CANT_THROW; - #endif -#endif - -_MSL_IMP_EXP_C int _MSL_CDECL abs(int) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C long _MSL_CDECL labs(long) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -#if (_MSL_C99 || defined(__cplusplus)) -_MSL_IMP_EXP_C long long _MSL_CDECL llabs(long long) _MSL_CANT_THROW; -#endif -#endif - -#ifdef __POWERPC__ - - #ifndef __cplusplus - #if !__MOTO__ && !__MRC__ - #define abs(n) __abs(n) - #define labs(n) __labs(n) - #endif - #endif - -#endif - -_MSL_IMP_EXP_C div_t _MSL_CDECL div(int, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C ldiv_t _MSL_CDECL ldiv(long, long) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -#if (_MSL_C99 || defined(__cplusplus)) -_MSL_IMP_EXP_C lldiv_t _MSL_CDECL lldiv(long long, long long) _MSL_CANT_THROW; -#endif -#endif - -#ifdef __cplusplus -_MSL_END_EXTERN_C - -extern "C++" { -inline long _MSL_CDECL abs (long n) _MSL_CANT_THROW { - return labs(n); -} -inline ldiv_t _MSL_CDECL div (long numerator, long denominator) _MSL_CANT_THROW { - return ldiv(numerator, denominator); -} - - #if _MSL_LONGLONG -inline long long _MSL_CDECL abs (long long n) _MSL_CANT_THROW { - return llabs(n); -} -inline lldiv_t _MSL_CDECL div (long long numerator, long long denominator) _MSL_CANT_THROW { - return lldiv(numerator, denominator); -} - #endif -} - -_MSL_BEGIN_EXTERN_C -#endif - -#if _MSL_WIDE_CHAR -_MSL_IMP_EXP_C int _MSL_CDECL mblen(const char *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL mbtowc(wchar_t * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wctomb(char *, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL mbstowcs(wchar_t * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcstombs(char * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cstring b/tools/cw/include/MSL_C/cstring deleted file mode 100644 index fe3e36331c..0000000000 --- a/tools/cw/include/MSL_C/cstring +++ /dev/null @@ -1,119 +0,0 @@ -#ifndef _MSL_CSTRING -#define _MSL_CSTRING - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#elif defined(__PALMOS_TRAPS__) - #include -#else - -#include -#include -#include -#include - -#if _MSL_NEEDS_EXTRAS - #include -#endif - -#ifndef RC_INVOKED - -#include - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C void * _MSL_CDECL memset(void *, int, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL memcmp(const void *, const void *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL memcpy(void * _MSL_RESTRICT, const void * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL memmove(void *, const void *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL strlen(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strcpy(char * _MSL_RESTRICT, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strncpy(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strcat(char * _MSL_RESTRICT, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strncat(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL strcmp(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL strncmp(const char *, const char *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL strcoll(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL strxfrm(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -#if !defined(__cplusplus) || __embedded_cplusplus != 0 -_MSL_IMP_EXP_C void * _MSL_CDECL memchr(const void *, int, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strchr(const char *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strpbrk(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strrchr(const char *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strstr(const char *, const char *) _MSL_CANT_THROW; -#else -_MSL_IMP_EXP_C const void * _MSL_CDECL memchr(const void *, int, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const char * _MSL_CDECL strchr(const char *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const char * _MSL_CDECL strpbrk(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const char * _MSL_CDECL strrchr(const char *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const char * _MSL_CDECL strstr(const char *, const char *) _MSL_CANT_THROW; -#endif -_MSL_IMP_EXP_C size_t _MSL_CDECL strspn(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL strcspn(const char *, const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strtok(char * _MSL_RESTRICT, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strerror(int) _MSL_CANT_THROW; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL memcpy_s(void * _MSL_RESTRICT, rsize_t, const void * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL memmove_s(void *, rsize_t, const void *, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL strnlen_s(const char *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL strcpy_s(char * _MSL_RESTRICT, rsize_t, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL strncpy_s(char * _MSL_RESTRICT, rsize_t, const char * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL strcat_s(char * _MSL_RESTRICT, rsize_t, const char * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL strncat_s(char * _MSL_RESTRICT, rsize_t, const char * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL strerror_s(char *, rsize_t, errno_t) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C char * _MSL_CDECL strtok_s(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, char * * _MSL_RESTRICT) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -#if defined(__cplusplus) && __embedded_cplusplus == 0 - -extern "C++" { -inline -char * _MSL_CDECL strchr (char * s, int c) _MSL_CANT_THROW { - return const_cast(strchr(static_cast(s), c)); -} - -inline -char * _MSL_CDECL strpbrk (char * s1, const char * s2) _MSL_CANT_THROW { - return const_cast(strpbrk(static_cast(s1), s2)); -} - -inline -char * _MSL_CDECL strrchr (char * s, int c) _MSL_CANT_THROW { - return const_cast(strrchr(static_cast(s), c)); -} - -inline -char * _MSL_CDECL strstr (char * s1, const char * s2) _MSL_CANT_THROW { - return const_cast(strstr(static_cast(s1), s2)); -} - -inline -void * _MSL_CDECL memchr (void * s, int c, size_t n) _MSL_CANT_THROW { - return const_cast(memchr(static_cast(s), c, n)); -} -} - -#endif - -_MSL_END_NAMESPACE_STD - -#if (defined(__MC68K__) && __embedded__) - #include -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/ctime b/tools/cw/include/MSL_C/ctime deleted file mode 100644 index 8d488074c8..0000000000 --- a/tools/cw/include/MSL_C/ctime +++ /dev/null @@ -1,110 +0,0 @@ -#ifndef _MSL_CTIME -#define _MSL_CTIME - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#elif defined(__PALMOS_TRAPS__) - #include -#else - -#include -#include -#include -#include - -#ifndef RC_INVOKED - -#if defined(__m56800__) || defined(__m56800E__) - #include -#endif - -#pragma options align=native - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -#if _MSL_CLOCK_T_AVAILABLE - #ifndef _MSL_CLOCKS_PER_SEC - #define _MSL_CLOCKS_PER_SEC 60 - #endif - - #ifndef _MSL_CLOCK_T - #define _MSL_CLOCK_T unsigned long - #endif - - #define CLOCKS_PER_SEC _MSL_CLOCKS_PER_SEC - - #ifndef _MSL_CLOCK_T_DEFINED -typedef _MSL_CLOCK_T clock_t; - #define _MSL_CLOCK_T_DEFINED - #endif -#endif - -#if _MSL_TIME_T_AVAILABLE - #ifndef _MSL_TIME_T_DEFINED -typedef long time_t; - #define _MSL_TIME_T_DEFINED - - #define _TIME_T_DEFINED - #endif -#endif - -#if _MSL_TM_STRUCT_AVAILABLE -struct tm { - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; -#endif - -#if _MSL_OS_TIME_SUPPORT - -_MSL_IMP_EXP_C clock_t _MSL_CDECL clock(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C time_t _MSL_CDECL time(time_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct tm * _MSL_CDECL gmtime(const time_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C time_t _MSL_CDECL mktime(struct tm *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL asctime(const struct tm *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL ctime(const time_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct tm * _MSL_CDECL localtime(const time_t *) _MSL_CANT_THROW; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL asctime_s(char *, rsize_t, const struct tm *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL ctime_s(char *, rsize_t, const time_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct tm * _MSL_CDECL gmtime_s(const time_t * _MSL_RESTRICT, struct tm * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct tm * _MSL_CDECL localtime_s(const time_t * _MSL_RESTRICT, struct tm * _MSL_RESTRICT) _MSL_CANT_THROW; -#endif - -_MSL_IMP_EXP_C size_t _MSL_CDECL strftime(char * _MSL_RESTRICT, size_t, const char * _MSL_RESTRICT, const struct tm * _MSL_RESTRICT) _MSL_CANT_THROW; - -#endif - -#if _MSL_FLOATING_POINT && _MSL_TIME_T_AVAILABLE -_MSL_IMP_EXP_C double _MSL_CDECL difftime(time_t, time_t) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#pragma options align=reset - -#if _MSL_NEEDS_EXTRAS - #include -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/ctype.h b/tools/cw/include/MSL_C/ctype.h deleted file mode 100644 index da189711bc..0000000000 --- a/tools/cw/include/MSL_C/ctype.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _MSL_CTYPE_H -#define _MSL_CTYPE_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::isalnum; -using std::isalpha; -#if _MSL_C99 -using std::isblank; -#endif -using std::iscntrl; -using std::isdigit; -using std::isgraph; -using std::islower; -using std::isprint; -using std::ispunct; -using std::isspace; -using std::isupper; -using std::isxdigit; -using std::tolower; -using std::toupper; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/ctype_api.h b/tools/cw/include/MSL_C/ctype_api.h deleted file mode 100644 index 92c6276ee1..0000000000 --- a/tools/cw/include/MSL_C/ctype_api.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _MSL_CTYPE_API_H -#define _MSL_CTYPE_API_H - -_MSL_BEGIN_EXTERN_C - - #if !_MSL_C_LOCALE_ONLY - #define __msl_cmap_size 256 - #else - #define __msl_cmap_size 128 - #endif - - #if !_MSL_C_LOCALE_ONLY -extern _MSL_IMP_EXP_C const unsigned short __msl_ctype_map[__msl_cmap_size]; -extern _MSL_IMP_EXP_C const unsigned char __lower_map[__msl_cmap_size]; -extern _MSL_IMP_EXP_C const unsigned char __upper_map[__msl_cmap_size]; - #endif - -extern _MSL_IMP_EXP_C const unsigned short __ctype_mapC[__msl_cmap_size]; -extern _MSL_IMP_EXP_C const unsigned char __lower_mapC[__msl_cmap_size]; -extern _MSL_IMP_EXP_C const unsigned char __upper_mapC[__msl_cmap_size]; - -_MSL_END_EXTERN_C - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD -#if _MSL_USE_INLINE - -#if _MSL_C_LOCALE_ONLY - #define _MSL_CMAP_ACCESS __ctype_mapC - #define _MSL_CLOWER_ACCESS __lower_mapC - #define _MSL_CUPPER_ACCESS __upper_mapC -#else - #define _MSL_CMAP_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->ctype_map_ptr - #define _MSL_CLOWER_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->lower_map_ptr - #define _MSL_CUPPER_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->upper_map_ptr -#endif - -#endif -_MSL_END_NAMESPACE_STD - -#endif - -#define __msl_alpha 0x0001 -#define __msl_blank 0x0002 -#define __msl_cntrl 0x0004 -#define __msl_digit 0x0008 -#define __msl_graph 0x0010 -#define __msl_lower 0x0020 -#define __msl_print 0x0040 -#define __msl_punct 0x0080 -#define __msl_space 0x0100 -#define __msl_upper 0x0200 -#define __msl_xdigit 0x0400 - -#define __msl_alnum (__msl_alpha | __msl_digit) - -#endif diff --git a/tools/cw/include/MSL_C/cwchar b/tools/cw/include/MSL_C/cwchar deleted file mode 100644 index 2e6aa9f6cf..0000000000 --- a/tools/cw/include/MSL_C/cwchar +++ /dev/null @@ -1,72 +0,0 @@ -#ifndef _MSL_CWCHAR -#define _MSL_CWCHAR - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#if _MSL_WIDE_CHAR - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if _MSL_NEEDS_EXTRAS - #include -#endif - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #ifdef __cplusplus -_MSL_END_EXTERN_C -inline int _MSL_CDECL wctob (wint_t c) _MSL_CANT_THROW { - return ((c & 0xFF00) ? (int)EOF : (int)c); -} -inline wint_t _MSL_CDECL btowc (int c) _MSL_CANT_THROW { - return ((c & 0x8000) ? (wint_t)WEOF : (wint_t)c); -} -_MSL_BEGIN_EXTERN_C - #else -_MSL_IMP_EXP_C int _MSL_CDECL wctob(wint_t); -_MSL_IMP_EXP_C wint_t _MSL_CDECL btowc(int); - #endif - -_MSL_IMP_EXP_C size_t _MSL_CDECL mbrlen(const char * _MSL_RESTRICT, size_t, mbstate_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL mbsinit(const mbstate_t *) _MSL_CANT_THROW; - - #if _MSL_WIDE_CHAR -_MSL_IMP_EXP_C size_t _MSL_CDECL mbrtowc(wchar_t * _MSL_RESTRICT, const char * _MSL_RESTRICT, size_t, mbstate_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcrtomb(char * _MSL_RESTRICT, wchar_t, mbstate_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL mbsrtowcs(wchar_t * _MSL_RESTRICT, const char * * _MSL_RESTRICT, size_t, mbstate_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcsrtombs(char * _MSL_RESTRICT, const wchar_t * * _MSL_RESTRICT, size_t, mbstate_t * _MSL_RESTRICT) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/cwctype b/tools/cw/include/MSL_C/cwctype deleted file mode 100644 index 34270f7626..0000000000 --- a/tools/cw/include/MSL_C/cwctype +++ /dev/null @@ -1,90 +0,0 @@ -#ifndef _MSL_CWCTYPE -#define _MSL_CWCTYPE - -#include - -#if !_MSL_USING_MW_C_HEADERS - #include - - #if _MSL_PUT_THIRD_PARTY_C_IN_STD - #include - #endif -#else - -#if _MSL_WIDE_CHAR - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C wctype_t _MSL_CDECL wctype(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswctype(wint_t, wctype_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswalnum(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswalpha(wint_t) _MSL_CANT_THROW; -#if _MSL_C99 -_MSL_IMP_EXP_C int _MSL_CDECL iswblank(wint_t) _MSL_CANT_THROW; -#endif -_MSL_IMP_EXP_C int _MSL_CDECL iswcntrl(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswdigit(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswgraph(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswlower(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswprint(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswpunct(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswspace(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswupper(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL iswxdigit(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wint_t _MSL_CDECL towlower(wint_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wint_t _MSL_CDECL towupper(wint_t) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#if _MSL_USE_INLINE - -#if _MSL_C_LOCALE_ONLY || !_MSL_C99 - #define _MSL_CWMAP_ACCESS __wctype_mapC - #define _MSL_CWLOWER_ACCESS __wlower_mapC - #define _MSL_CWUPPER_ACCESS __wupper_mapC -#else - #define _MSL_CWMAP_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->wctype_map_ptr - #define _MSL_CWLOWER_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->wlower_map_ptr - #define _MSL_CWUPPER_ACCESS _MSL_LOCALDATA(_current_locale).ctype_cmpt_ptr->wupper_map_ptr -#endif - -_MSL_INLINE int _MSL_CDECL iswalnum(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_walnum);} -_MSL_INLINE int _MSL_CDECL iswalpha(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_walpha);} -#if _MSL_C99 -_MSL_INLINE int _MSL_CDECL iswblank(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wblank);} -#endif -_MSL_INLINE int _MSL_CDECL iswcntrl(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wcntrl);} -_MSL_INLINE int _MSL_CDECL iswdigit(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wdigit);} -_MSL_INLINE int _MSL_CDECL iswgraph(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wgraph);} -_MSL_INLINE int _MSL_CDECL iswlower(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wlower);} -_MSL_INLINE int _MSL_CDECL iswprint(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wprint);} -_MSL_INLINE int _MSL_CDECL iswpunct(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wpunct);} -_MSL_INLINE int _MSL_CDECL iswspace(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wspace);} -_MSL_INLINE int _MSL_CDECL iswupper(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wupper);} -_MSL_INLINE int _MSL_CDECL iswxdigit(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? 0 : (int)(_MSL_CWMAP_ACCESS[c] & __msl_wxdigit);} -_MSL_INLINE wint_t _MSL_CDECL towlower(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? c : (int)(_MSL_CWLOWER_ACCESS[c]);} -_MSL_INLINE wint_t _MSL_CDECL towupper(wint_t c) _MSL_CANT_THROW {return ((c < 0) || (c >= __msl_wcmap_size)) ? c : (int)(_MSL_CWUPPER_ACCESS[c]);} - -#endif - -_MSL_END_NAMESPACE_STD - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/div_t.h b/tools/cw/include/MSL_C/div_t.h deleted file mode 100644 index fb29e8e44b..0000000000 --- a/tools/cw/include/MSL_C/div_t.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _MSL_DIV_T_H -#define _MSL_DIV_T_H - -#pragma options align=native - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -typedef struct { - int quot; - int rem; -} div_t; - -typedef struct { - long quot; - long rem; -} ldiv_t; - - #if _MSL_C99 || defined(__cplusplus) - #if _MSL_LONGLONG -typedef struct { - long long quot; - long long rem; -} lldiv_t; - #endif - #endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/eof.h b/tools/cw/include/MSL_C/eof.h deleted file mode 100644 index 084d412951..0000000000 --- a/tools/cw/include/MSL_C/eof.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef EOF - #define EOF -1L -#endif diff --git a/tools/cw/include/MSL_C/errno.h b/tools/cw/include/MSL_C/errno.h deleted file mode 100644 index 00e6c63219..0000000000 --- a/tools/cw/include/MSL_C/errno.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MSL_ERRNO_H -#define _MSL_ERRNO_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/fenv.ARM.h b/tools/cw/include/MSL_C/fenv.ARM.h deleted file mode 100644 index a2e1c794dd..0000000000 --- a/tools/cw/include/MSL_C/fenv.ARM.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef _MSL_FENV_ARM_H -#define _MSL_FENV_ARM_H - -#ifndef _MSL_FENV_H -#error This header may only be included from -#endif - -_MSL_BEGIN_EXTERN_C - -extern unsigned __ieee_status(unsigned, unsigned); - -#define FE_IEEE_FLUSHZERO (0x01000000) -#define FE_IEEE_ROUND_TONEAREST (0x00000000) -#define FE_IEEE_ROUND_UPWARD (0x00400000) -#define FE_IEEE_ROUND_DOWNWARD (0x00800000) -#define FE_IEEE_ROUND_TOWARDZERO (0x00C00000) -#define FE_IEEE_ROUND_MASK (0x00C00000) -#define FE_IEEE_MASK_INVALID (0x00000100) -#define FE_IEEE_MASK_DIVBYZERO (0x00000200) -#define FE_IEEE_MASK_OVERFLOW (0x00000400) -#define FE_IEEE_MASK_UNDERFLOW (0x00000800) -#define FE_IEEE_MASK_INEXACT (0x00001000) -#define FE_IEEE_MASK_ALL_EXCEPT (0x00001F00) -#define FE_IEEE_INVALID (0x00000001) -#define FE_IEEE_DIVBYZERO (0x00000002) -#define FE_IEEE_OVERFLOW (0x00000004) -#define FE_IEEE_UNDERFLOW (0x00000008) -#define FE_IEEE_INEXACT (0x00000010) -#define FE_IEEE_ALL_EXCEPT (0x0000001F) - -#define FE_EX_RDIR ((unsigned)1 << 31) -#define FE_EX_EXCEPT_SHIFT (26) -#define FE_EX_EXCEPT_MASK (0x1F << FE_EX_EXCEPT_SHIFT) -#define FE_EX_INEXACT (0x10 << FE_EX_EXCEPT_SHIFT) -#define FE_EX_UNDERFLOW (0x08 << FE_EX_EXCEPT_SHIFT) -#define FE_EX_OVERFLOW (0x04 << FE_EX_EXCEPT_SHIFT) -#define FE_EX_DIVBYZERO (0x02 << FE_EX_EXCEPT_SHIFT) -#define FE_EX_INVALID (0x01 << FE_EX_EXCEPT_SHIFT) -#define FE_EX_FLUSHZERO_SHIFT (24) -#define FE_EX_FLUSHZERO (1 << FE_EX_FLUSHZERO_SHIFT) -#define FE_EX_ROUND_SHIFT (22) -#define FE_EX_ROUND_MASK (3 << FE_EX_ROUND_SHIFT) -#define FE_EX_INTYPE_SHIFT (7) -#define FE_EX_INTYPE_MASK (7 << FE_EX_INTYPE_SHIFT) -#define FE_EX_OUTTYPE_SHIFT (4) -#define FE_EX_OUTTYPE_MASK (7 << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_TYPE_SHIFT (4) -#define FE_EX_TYPE_MASK (7 << FE_EX_TYPE_SHIFT) -#define FE_EX_FN_SHIFT (0) -#define FE_EX_FN_MASK (15 << FE_EX_FN_SHIFT) - -#define FE_EX_ROUND_NEAREST (0 << FE_EX_ROUND_SHIFT) -#define FE_EX_ROUND_PLUSINF (1 << FE_EX_ROUND_SHIFT) -#define FE_EX_ROUND_MINUSINF (2 << FE_EX_ROUND_SHIFT) -#define FE_EX_ROUND_ZERO (3 << FE_EX_ROUND_SHIFT) - -#define FE_EX_BASETYPE_FLOAT (0) -#define FE_EX_BASETYPE_DOUBLE (1) -#define FE_EX_BASETYPE_INT (4) -#define FE_EX_BASETYPE_LONGLONG (5) -#define FE_EX_BASETYPE_UINT (6) -#define FE_EX_BASETYPE_ULONGLONG (7) - -#define FE_EX_TYPE_FLOAT (FE_EX_BASETYPE_FLOAT << FE_EX_TYPE_SHIFT) -#define FE_EX_TYPE_DOUBLE (FE_EX_BASETYPE_DOUBLE << FE_EX_TYPE_SHIFT) -#define FE_EX_TYPE_INT (FE_EX_BASETYPE_INT << FE_EX_TYPE_SHIFT) -#define FE_EX_TYPE_LONGLONG (FE_EX_BASETYPE_LONGLONG << FE_EX_TYPE_SHIFT) -#define FE_EX_TYPE_UINT (FE_EX_BASETYPE_UINT << FE_EX_TYPE_SHIFT) -#define FE_EX_TYPE_ULONGLONG (FE_EX_BASETYPE_ULONGLONG << FE_EX_TYPE_SHIFT) - -#define FE_EX_INTYPE_FLOAT (FE_EX_BASETYPE_FLOAT << FE_EX_INTYPE_SHIFT) -#define FE_EX_INTYPE_DOUBLE (FE_EX_BASETYPE_DOUBLE << FE_EX_INTYPE_SHIFT) -#define FE_EX_INTYPE_INT (FE_EX_BASETYPE_INT << FE_EX_INTYPE_SHIFT) -#define FE_EX_INTYPE_LONGLONG (FE_EX_BASETYPE_LONGLONG << FE_EX_INTYPE_SHIFT) -#define FE_EX_INTYPE_UINT (FE_EX_BASETYPE_UINT << FE_EX_INTYPE_SHIFT) -#define FE_EX_INTYPE_ULONGLONG (FE_EX_BASETYPE_ULONGLONG << FE_EX_INTYPE_SHIFT) - -#define FE_EX_OUTTYPE_FLOAT (FE_EX_BASETYPE_FLOAT << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_OUTTYPE_DOUBLE (FE_EX_BASETYPE_DOUBLE << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_OUTTYPE_INT (FE_EX_BASETYPE_INT << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_OUTTYPE_LONGLONG (FE_EX_BASETYPE_LONGLONG << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_OUTTYPE_UINT (FE_EX_BASETYPE_UINT << FE_EX_OUTTYPE_SHIFT) -#define FE_EX_OUTTYPE_ULONGLONG (FE_EX_BASETYPE_ULONGLONG << FE_EX_OUTTYPE_SHIFT) - -#define FE_EX_FN_ADD (1 << FE_EX_FN_SHIFT) -#define FE_EX_FN_SUB (2 << FE_EX_FN_SHIFT) -#define FE_EX_FN_MUL (3 << FE_EX_FN_SHIFT) -#define FE_EX_FN_DIV (4 << FE_EX_FN_SHIFT) -#define FE_EX_FN_REM (5 << FE_EX_FN_SHIFT) -#define FE_EX_FN_RND (6 << FE_EX_FN_SHIFT) -#define FE_EX_FN_SQRT (7 << FE_EX_FN_SHIFT) -#define FE_EX_FN_CVT (8 << FE_EX_FN_SHIFT) -#define FE_EX_FN_CMP (9 << FE_EX_FN_SHIFT) -#define FE_EX_FN_RAISE (15 << FE_EX_FN_SHIFT) - -#define FE_EX_CMPRET_UNORDERED (8) -#define FE_EX_CMPRET_LESS (4) -#define FE_EX_CMPRET_EQUAL (2) -#define FE_EX_CMPRET_GREATER (1) - -extern fenv_t * __rt_fp_env_addr(void); - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/fenv.h b/tools/cw/include/MSL_C/fenv.h deleted file mode 100644 index 6baa415946..0000000000 --- a/tools/cw/include/MSL_C/fenv.h +++ /dev/null @@ -1,199 +0,0 @@ -#ifndef _MSL_FENV_H -#define _MSL_FENV_H - -#ifndef __FENV__ -#define __FENV__ - -#include - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #else - #include - #endif -#else -#if _MSL_C99 -#ifdef __POWERPC__ - -typedef long int fenv_t; -typedef long int fexcept_t; - - #define FE_DIVBYZERO 0x04000000 - #define FE_INEXACT 0x02000000 - #define FE_INVALID 0x20000000 - #define FE_OVERFLOW 0x10000000 - #define FE_UNDERFLOW 0x08000000 - - #define FE_DOWNWARD 0x00000003 - #define FE_TONEAREST 0x00000000 - #define FE_TOWARDZERO 0x00000001 - #define FE_UPWARD 0x00000002 -#endif - -#ifdef __MIPS__ -typedef long int fenv_t; -typedef long int fexcept_t; - - #define FE_INEXACT 0x00001000 - #define FE_UNDERFLOW 0x00002000 - #define FE_OVERFLOW 0x00004000 - #define FE_DIVBYZERO 0x00008000 - #define FE_INVALID 0x00010000 - - #define FE_TONEAREST ((short)(-1)) - #define FE_UPWARD ((short)(-2)) - #define FE_DOWNWARD ((short)(-3)) - #define FE_TOWARDZERO ((short)(-4)) -#endif - -#if defined(__MC68K__) || defined(__COLDFIRE__) - #if __MC68881__ || __COLDFIRE_HW_FPU__ - -typedef long fexcept_t; -typedef struct { - long FPCR; - long FPSR; -} fenv_t; - - #define FE_INEXACT ((long)(8)) - #define FE_DIVBYZERO ((long)(16)) - #define FE_UNDERFLOW ((long)(32)) - #define FE_OVERFLOW ((long)(64)) - #define FE_INVALID ((long)(128)) - #else - -typedef short fexcept_t; -typedef short fenv_t; - - #define FE_INVALID ((short)(1)) - #define FE_UNDERFLOW ((short)(2)) - #define FE_OVERFLOW ((short)(4)) - #define FE_DIVBYZERO ((short)(8)) - #define FE_INEXACT ((short)(16)) - #endif - - #define FE_TONEAREST ((short)(0)) - #define FE_UPWARD ((short)(1)) - #define FE_DOWNWARD ((short)(2)) - #define FE_TOWARDZERO ((short)(3)) - - #define FE_LDBLPREC ((short)(0)) - #define FE_DBLPREC ((short)(1)) - #define FE_FLTPREC ((short)(2)) -#endif - -#ifdef __INTEL__ - -typedef short fexcept_t; -typedef long fenv_t; - - #define FE_INVALID 0x0001 - #define FE_DIVBYZERO 0x0004 - #define FE_OVERFLOW 0x0008 - #define FE_UNDERFLOW 0x0010 - #define FE_INEXACT 0x0020 - - #define FE_TONEAREST 0x00000000 - #define FE_TOWARDZERO 0x00000C00 - #define FE_UPWARD 0x00000800 - #define FE_DOWNWARD 0x00000400 - - #define FE_LDBLPREC 0x00000300 - #define FE_DBLPREC 0x00000200 - #define FE_FLTPREC 0x00000000 -#endif - -#ifdef __arm - -typedef unsigned int __ieee_edata_t; - -typedef union { - float f; - float s; - double d; - int i; - unsigned int ui; -#if !defined(__STRICT_ANSI__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) - long long l; - unsigned long long ul; -#endif - struct {int word1, word2;} str; -} __ieee_value_t; - -typedef __ieee_value_t (* __ieee_handler_t) (__ieee_value_t, __ieee_value_t, __ieee_edata_t); - -typedef struct { - unsigned statusword; - __ieee_handler_t invalid_handler; - __ieee_handler_t divbyzero_handler; - __ieee_handler_t overflow_handler; - __ieee_handler_t underflow_handler; - __ieee_handler_t inexact_handler; -} fenv_t, fexcept_t; - - #define FE_INVALID ((unsigned long)0x00000001) - #define FE_DIVBYZERO ((unsigned long)0x00000002) - #define FE_OVERFLOW ((unsigned long)0x00000004) - #define FE_UNDERFLOW ((unsigned long)0x00000008) - #define FE_INEXACT ((unsigned long)0x00000010) - - #define FE_TONEAREST ((unsigned long)0x00000000) - #define FE_TOWARDZERO ((unsigned long)0x00C00000) - #define FE_UPWARD ((unsigned long)0x00400000) - #define FE_DOWNWARD ((unsigned long)0x00800000) -#endif - -#ifdef __MIPS__ -typedef long int fenv_t; -typedef long int fexcept_t; - - #define FE_INEXACT 0x00001000 - #define FE_UNDERFLOW 0x00002000 - #define FE_OVERFLOW 0x00004000 - #define FE_DIVBYZERO 0x00008000 - #define FE_INVALID 0x00010000 -#endif - -#define FE_ALL_EXCEPT (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID) - -_MSL_BEGIN_EXTERN_C - -extern fenv_t _FE_DFL_ENV; -#define FE_DFL_ENV &_FE_DFL_ENV - -_MSL_IMP_EXP_C void _MSL_MATH_CDECL feclearexcept(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fegetexceptflag(fexcept_t *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fesetexceptflag(const fexcept_t *, int) _MSL_CANT_THROW; -#if (defined(__INTEL__) || defined(__arm)) - #define fegetexcept fegetexceptflag - #define fesetexcept fesetexceptflag -#else -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fegetexcept(fexcept_t *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fesetexcept(const fexcept_t *, int) _MSL_CANT_THROW; -#endif -_MSL_IMP_EXP_C void _MSL_MATH_CDECL feraiseexcept(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_MATH_CDECL fetestexcept(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_MATH_CDECL fegetround(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_MATH_CDECL fesetround(int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fegetenv(fenv_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_MATH_CDECL feholdexcept(fenv_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL fesetenv(const fenv_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_MATH_CDECL feupdateenv(const fenv_t *) _MSL_CANT_THROW; -#if (defined(__MC68K__) || defined(__INTEL__)) -_MSL_IMP_EXP_C int _MSL_MATH_CDECL fegetprec(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_MATH_CDECL fesetprec(int) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -#if defined(__INTEL__) - #include -#elif defined(__arm) - #include -#endif - -#endif -#endif -#endif -#endif diff --git a/tools/cw/include/MSL_C/file_io.h b/tools/cw/include/MSL_C/file_io.h deleted file mode 100644 index 163867f3b3..0000000000 --- a/tools/cw/include/MSL_C/file_io.h +++ /dev/null @@ -1,48 +0,0 @@ -#ifndef _MSL_FILE_IO_H -#define _MSL_FILE_IO_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -#if _MSL_OS_DISK_FILE_SUPPORT -extern _MSL_IMP_EXP_C __std(__file_modes) __temp_file_mode; - -int _MSL_CDECL __open_file(const char * name, __std(__file_modes) mode, __std(__file_handle) * handle) _MSL_CANT_THROW; -int _MSL_CDECL __open_temp_file(__std(__file_handle) * handle) _MSL_CANT_THROW; - -int __read_file(__std(__file_handle) handle, unsigned char * buffer, __std(size_t) * count, __std(__ref_con) ref_con) _MSL_CANT_THROW; -int __write_file(__std(__file_handle) handle, unsigned char * buffer, __std(size_t) * count, __std(__ref_con) ref_con) _MSL_CANT_THROW; -int __position_file(__std(__file_handle) handle, __std(fpos_t) * position, int mode, __std(__ref_con) ref_con) _MSL_CANT_THROW; -int __close_file(__std(__file_handle) handle) _MSL_CANT_THROW; - -void _MSL_CDECL __temp_file_name(char * name_str, void *) _MSL_CANT_THROW; -int _MSL_CDECL __delete_file(const char * name) _MSL_CANT_THROW; -int _MSL_CDECL __rename_file(const char * old_name, const char * new_name) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C __std(FILE) * _MSL_CDECL __reopen(__std(FILE) * file) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL __get_file_modes(const char * mode, __std(__file_modes) * modes) _MSL_CANT_THROW; -#endif - -#if _MSL_WFILEIO_AVAILABLE -int _MSL_CDECL __wopen_file(const wchar_t * name, __std(__file_modes) mode, __std(__file_handle) * handle) _MSL_CANT_THROW; -void _MSL_CDECL __wtemp_file_name(wchar_t * name_str, void *) _MSL_CANT_THROW; -int _MSL_CDECL __wdelete_file(const wchar_t * name) _MSL_CANT_THROW; -int _MSL_CDECL __wrename_file(const wchar_t * old_name, const wchar_t * new_name) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL __wget_file_modes(const wchar_t * mode, __std(__file_modes) * modes) _MSL_CANT_THROW; -#endif - -char * _MSL_CDECL __msl_itoa(int, char *, int) _MSL_CANT_THROW; -char * _MSL_CDECL __msl_strrev(char *) _MSL_CANT_THROW; -int _MSL_CDECL __msl_strnicmp(const char *, const char *, int) _MSL_CANT_THROW; - -#if _MSL_OS_DISK_FILE_SUPPORT -char * _MSL_CDECL __msl_getcwd(char *, int) _MSL_CANT_THROW; -#endif - -char * _MSL_CDECL __msl_strdup(const char *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/file_struc.h b/tools/cw/include/MSL_C/file_struc.h deleted file mode 100644 index 50a8fbd0e2..0000000000 --- a/tools/cw/include/MSL_C/file_struc.h +++ /dev/null @@ -1,181 +0,0 @@ -#ifndef _MSL_FILE_STRUC_H -#define _MSL_FILE_STRUC_H - -#include - -#if _MSL_WIDE_CHAR - #include -#endif - -#ifndef RC_INVOKED - -#pragma options align=native -#pragma warn_padding off - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -enum __file_kinds { - __closed_file, - __disk_file, - __console_file, - __unavailable_file -}; - -enum __open_modes { - __must_exist, - __create_if_necessary, - __create_or_truncate -}; - -#if _MSL_WIDE_CHAR -enum __file_orientation { - __unoriented, - __char_oriented, - __wide_oriented -}; -#endif - -enum __io_modes { - __read = 1, - __write = 2, - __read_write = 3, - __append = 4 -}; - -typedef struct { - unsigned int open_mode : 2; - unsigned int io_mode : 3; - unsigned int buffer_mode : 2; - unsigned int file_kind : 3; - - #if _MSL_WIDE_CHAR - unsigned int file_orientation : 2; - #endif - - unsigned int binary_io : 1; -} __file_modes; - -enum __io_states { - __neutral, - __writing, - __reading, - __rereading -}; - -typedef struct { - unsigned int io_state : 3; - unsigned int free_buffer : 1; - unsigned char eof; - unsigned char error; -} __file_state; - -typedef unsigned long __file_handle; - -typedef unsigned long fpos_t; - -typedef struct _FILE FILE; - -enum __io_results { - __no_io_error, - __io_error, - __io_EOF -}; - -typedef void * __ref_con; -typedef void (* __idle_proc) (void); -typedef int (* __pos_proc) (__file_handle file, fpos_t * position, int mode, __ref_con ref_con); -typedef int (* __io_proc) (__file_handle file, unsigned char * buff, size_t * count, __ref_con ref_con); -typedef int (* __close_proc) (__file_handle file); - -#define __ungetc_buffer_size 2 - -struct _FILE { - __file_handle handle; - __file_modes mode; - __file_state state; - - #if _MSL_OS_DISK_FILE_SUPPORT - unsigned char is_dynamically_allocated; - #endif - - unsigned char char_buffer; - unsigned char char_buffer_overflow; - unsigned char ungetc_buffer[__ungetc_buffer_size]; - - #if _MSL_WIDE_CHAR - wchar_t ungetwc_buffer[__ungetc_buffer_size]; - #endif - - unsigned long position; - unsigned char * buffer; - unsigned long buffer_size; - unsigned char * buffer_ptr; - unsigned long buffer_len; - unsigned long buffer_alignment; - unsigned long saved_buffer_len; - unsigned long buffer_pos; - __pos_proc position_proc; - __io_proc read_proc; - __io_proc write_proc; - __close_proc close_proc; - __ref_con ref_con; - - #if _MSL_OS_DISK_FILE_SUPPORT - struct _FILE * next_file_struct; - #endif -}; - -#define _IONBF 0 -#define _IOLBF 1 -#define _IOFBF 2 - -#ifndef _MSL_BUFSIZ - #define _MSL_BUFSIZ 4096 -#endif - -#define BUFSIZ _MSL_BUFSIZ - -#if !_MSL_OS_DISK_FILE_SUPPORT - #if !_MSL_CONSOLE_SUPPORT - #define FOPEN_MAX 0 - #else - #define FOPEN_MAX 3 - #endif - #define _STATIC_FILES 3 -#else - #define FOPEN_MAX 35 - #define _STATIC_FILES 4 -#endif - -#define _MSL_FILENAME_MAX 256 - -#define FILENAME_MAX _MSL_FILENAME_MAX - -#define L_tmpnam _MSL_FILENAME_MAX -#define TMP_MAX 32767 - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ - #define L_tmpnam_s _MSL_FILENAME_MAX - #define TMP_MAX_S 32767 -#endif - -#define SEEK_SET 0 -#define SEEK_CUR 1 -#define SEEK_END 2 - -#define stdin (&__std(__files[0])) -#define stdout (&__std(__files[1])) -#define stderr (&__std(__files[2])) - -extern _MSL_IMP_EXP_C FILE __files[]; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#pragma warn_padding reset -#pragma options align=reset - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/float.ARM.h b/tools/cw/include/MSL_C/float.ARM.h deleted file mode 100644 index 520a1e65ca..0000000000 --- a/tools/cw/include/MSL_C/float.ARM.h +++ /dev/null @@ -1,108 +0,0 @@ -#ifndef _MSL_FLOAT_ARM_H -#define _MSL_FLOAT_ARM_H - -#ifndef _MSL_CFLOAT -#error This header may only be included from -#endif - -_MSL_BEGIN_EXTERN_C - -extern float _fadd(float, float); -extern float _fsub(float, float); -extern float _frsb(float, float); -extern float _fmul(float, float); -extern float _fdiv(float, float); -extern float _frdiv(float, float); -extern float _frem(float, float); -extern float _frnd(float); -extern float _fsqrt(float); - -extern double _dadd(double, double); -extern double _dsub(double, double); -extern double _drsb(double, double); -extern double _dmul(double, double); -extern double _ddiv(double, double); -extern double _drdiv(double, double); -extern double _drem(double, double); -extern double _drnd(double); -extern double _dsqrt(double); - -extern int _feq(float, float); -extern int _fneq(float, float); -extern int _fgeq(float, float); -extern int _fgr(float, float); -extern int _fleq(float, float); -extern int _fls(float, float); -extern int _deq(double, double); -extern int _dneq(double, double); -extern int _dgeq(double, double); -extern int _dgr(double, double); -extern int _dleq(double, double); -extern int _dls(double, double); - -extern double _f2d(float); -extern float _d2f(double); - -extern float _fflt(int); -extern float _ffltu(unsigned int); -extern double _dflt(int); -extern double _dfltu(unsigned int); -#if !defined(__STDC__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) -extern float _ll_sto_f(long long); -extern float _ll_uto_f(unsigned long long); -extern double _ll_sto_d(long long); -extern double _ll_uto_d(unsigned long long); -#endif - -extern int _ffix(float); -extern unsigned int _ffixu(float); -extern int _dfix(double); -extern unsigned int _dfixu(double); -#if !defined(__STDC__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) -extern long long _ll_sfrom_f(float); -extern unsigned long long _ll_ufrom_f(float); -extern long long _ll_sfrom_d(double); -extern unsigned long long _ll_ufrom_d(double); -#endif - -extern int _ffix_r(float); -extern unsigned int _ffixu_r(float); -extern int _dfix_r(double); -extern unsigned int _dfixu_r(double); -#if !defined(__STDC__) || (defined(__STDC_VERSION__) && 199901L <= __STDC_VERSION__) -extern long long _ll_sfrom_f_r(float); -extern unsigned long long _ll_ufrom_f_r(float); -extern long long _ll_sfrom_d_r(double); -extern unsigned long long _ll_ufrom_d_r(double); -#endif - -extern void _fp_init(void); - -extern unsigned * __rt_fp_status_addr(void); - -extern unsigned _controlfp(unsigned, unsigned); -extern unsigned _clearfp(void); -extern unsigned _statusfp(void); - -#define _MCW_EM 0x001F -#define _EM_INVALID 0x0001 -#define _EM_ZERODIVIDE 0x0002 -#define _EM_OVERFLOW 0x0004 -#define _EM_UNDERFLOW 0x0008 -#define _EM_INEXACT 0x0010 - -#define _MCW_RC 0xC000 -#define _RC_CHOP 0xC000 -#define _RC_UP 0x4000 -#define _RC_DOWN 0x8000 -#define _RC_NEAR 0x0000 - -#define _FPE_INVALID 0x04000000 -#define _FPE_ZERODIVIDE 0x08000000 -#define _FPE_OVERFLOW 0x10000000 -#define _FPE_UNDERFLOW 0x20000000 -#define _FPE_INEXACT 0x40000000 - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/float.h b/tools/cw/include/MSL_C/float.h deleted file mode 100644 index d1d5b15b75..0000000000 --- a/tools/cw/include/MSL_C/float.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MSL_FLOAT_H -#define _MSL_FLOAT_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/inttypes.h b/tools/cw/include/MSL_C/inttypes.h deleted file mode 100644 index 76ca5171c7..0000000000 --- a/tools/cw/include/MSL_C/inttypes.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _MSL_INTTYPES_H -#define _MSL_INTTYPES_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include -#include - -#if _MSL_C99 - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::imaxdiv_t; -using std::imaxabs; -using std::imaxdiv; -using std::strtoimax; -using std::strtoumax; - #if _MSL_WIDE_CHAR -using std::wcstoimax; -using std::wcstoumax; - #endif -#endif - -#endif -#endif -#endif diff --git a/tools/cw/include/MSL_C/iso646.h b/tools/cw/include/MSL_C/iso646.h deleted file mode 100644 index cd97868e43..0000000000 --- a/tools/cw/include/MSL_C/iso646.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _MSL_ISO646_H -#define _MSL_ISO646_H - -#include - -#if _MSL_C99 - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #endif -#else - -#include - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/lconv.h b/tools/cw/include/MSL_C/lconv.h deleted file mode 100644 index 4e3aee5422..0000000000 --- a/tools/cw/include/MSL_C/lconv.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _MSL_LCONV_H -#define _MSL_LCONV_H - -#include - -#pragma options align=native - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -extern struct lconv __lconv; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/limits.h b/tools/cw/include/MSL_C/limits.h deleted file mode 100644 index 09657fda23..0000000000 --- a/tools/cw/include/MSL_C/limits.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MSL_LIMITS_H -#define _MSL_LIMITS_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/limits_api.h b/tools/cw/include/MSL_C/limits_api.h deleted file mode 100644 index b23320d2a5..0000000000 --- a/tools/cw/include/MSL_C/limits_api.h +++ /dev/null @@ -1,121 +0,0 @@ -#ifndef _MSL_LIMITS_API_H -#define _MSL_LIMITS_API_H - -#ifndef _MSL_CHAR_BIT - #define _MSL_CHAR_BIT 8 -#endif - -#ifndef _MSL_SIZEOF_SHRT - #define _MSL_SIZEOF_SHRT 2 -#endif - -#ifndef _MSL_SIZEOF_INT - #define _MSL_SIZEOF_INT 4 -#endif - -#ifndef _MSL_SIZEOF_LONG - #define _MSL_SIZEOF_LONG 4 -#endif - -#ifndef _MSL_MB_LEN_MAX - #define _MSL_MB_LEN_MAX 3 -#endif - -#if _MSL_LONGLONG - #ifndef _MSL_SIZEOF_LONG_LONG - #define _MSL_SIZEOF_LONG_LONG 8 - #endif -#endif - -#ifndef _MSL_UNSIGNED_CHAR - #ifdef __MWERKS__ - #if __option(unsigned_char) - #define _MSL_UNSIGNED_CHAR 1 - #else - #define _MSL_UNSIGNED_CHAR 0 - #endif - #else - #define _MSL_UNSIGNED_CHAR 0 - #endif -#endif - -#if _MSL_CHAR_BIT == 8 - #define _MSL_SCHAR_MAX 0x7f - #define _MSL_UCHAR_MAX 0xff -#elif _MSL_CHAR_BIT == 16 - #define _MSL_SCHAR_MAX 0x7fff - #define _MSL_UCHAR_MAX 0xffff -#elif _MSL_CHAR_BIT == 24 - #define _MSL_SCHAR_MAX 0x7fffff - #define _MSL_UCHAR_MAX 0xffffff -#else - #error unsupported size for _MSL_CHAR_BIT -#endif - -#define _MSL_SCHAR_MIN (~_MSL_SCHAR_MAX) - -#if _MSL_UNSIGNED_CHAR - #define _MSL_CHAR_MIN 0 - #define _MSL_CHAR_MAX _MSL_UCHAR_MAX -#else - #define _MSL_CHAR_MIN _MSL_SCHAR_MIN - #define _MSL_CHAR_MAX _MSL_SCHAR_MAX -#endif - -#if _MSL_SIZEOF_SHRT * _MSL_CHAR_BIT == 16 - #define _MSL_SHRT_MAX 0x7fff - #define _MSL_USHRT_MAX 0xffff -#elif _MSL_SIZEOF_SHRT * _MSL_CHAR_BIT == 24 - #define _MSL_SHRT_MAX 0x7fffff - #define _MSL_USHRT_MAX 0xffffff -#else - #error unsupported size for sizeof short -#endif - -#define _MSL_SHRT_MIN (~_MSL_SHRT_MAX) - -#if _MSL_SIZEOF_INT * _MSL_CHAR_BIT == 16 - #define _MSL_INT_MAX 0x7fff - #define _MSL_UINT_MAX 0xffffU -#elif _MSL_SIZEOF_INT * _MSL_CHAR_BIT == 24 - #define _MSL_INT_MAX 0x7fffff - #define _MSL_UINT_MAX 0xffffffU -#elif _MSL_SIZEOF_INT * _MSL_CHAR_BIT == 32 - #define _MSL_INT_MAX 0x7fffffff - #define _MSL_UINT_MAX 0xffffffffU -#else - #error unsupported size for sizeof int -#endif - -#define _MSL_INT_MIN (~_MSL_INT_MAX) - -#if _MSL_SIZEOF_LONG * _MSL_CHAR_BIT == 24 - #define _MSL_LONG_MAX 0x7fffffL - #define _MSL_ULONG_MAX 0xffffffUL -#elif _MSL_SIZEOF_LONG * _MSL_CHAR_BIT == 32 - #define _MSL_LONG_MAX 0x7fffffffL - #define _MSL_ULONG_MAX 0xffffffffUL -#else - #error unsupported size for sizeof long -#endif - -#define _MSL_LONG_MIN (~_MSL_LONG_MAX) - -#if _MSL_LONGLONG && _MSL_C99 - #if _MSL_SIZEOF_LONG_LONG * _MSL_CHAR_BIT == 24 - #define _MSL_LLONG_MAX 0x7fffffLL - #define _MSL_ULLONG_MAX 0xffffffULL - #elif _MSL_SIZEOF_LONG_LONG * _MSL_CHAR_BIT == 32 - #define _MSL_LLONG_MAX 0x7fffffffLL - #define _MSL_ULLONG_MAX 0xffffffffULL - #elif _MSL_SIZEOF_LONG_LONG * _MSL_CHAR_BIT == 64 - #define _MSL_LLONG_MAX 0x7fffffffffffffffLL - #define _MSL_ULLONG_MAX 0xffffffffffffffffULL - #else - #error unsupported size for sizeof long long - #endif - - #define _MSL_LLONG_MIN (~_MSL_LLONG_MAX) -#endif - -#endif diff --git a/tools/cw/include/MSL_C/locale.h b/tools/cw/include/MSL_C/locale.h deleted file mode 100644 index 3f855369e0..0000000000 --- a/tools/cw/include/MSL_C/locale.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _MSL_LOCALE_H -#define _MSL_LOCALE_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::lconv; -using std::localeconv; -using std::setlocale; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/locale_api.h b/tools/cw/include/MSL_C/locale_api.h deleted file mode 100644 index 30ff2ef99b..0000000000 --- a/tools/cw/include/MSL_C/locale_api.h +++ /dev/null @@ -1,188 +0,0 @@ -#ifndef _MSL_LOCALE_API_H -#define _MSL_LOCALE_API_H - -#include -#include -#include - -#define _MSL_LOCALE_NONE 0 -#define _MSL_LOCALE_C 1 -#define _MSL_LOCALE_CUTF8 2 - -#ifndef _MSL_DEFAULT_LOCALE - #define _MSL_DEFAULT_LOCALE _MSL_LOCALE_C -#endif - -#define _LOCALE_NAME_LEN 48 -#define _COMPONENT_NAME_LEN 8 -#define _LOCALE_CMPT_COUNT 5 - -#pragma options align=native -#pragma warn_padding off - -#if _MSL_WIDE_CHAR -typedef int (* __decode_mbyte) (wchar_t *, const char *, __std (size_t)); -typedef int (* __encode_mbyte) (char *, wchar_t); -#endif - -#if !_MSL_C_LOCALE_ONLY - -struct _loc_mon_cmpt_vals { - char * mon_decimal_point; - char * mon_thousands_sep; - char * mon_grouping; - char * positive_sign; - char * negative_sign; - char * currency_symbol; - char frac_digits; - char p_cs_precedes; - char n_cs_precedes; - char p_sep_by_space; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char * int_curr_symbol; - char int_frac_digits; - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -}; - -struct _loc_mon_cmpt { - char CmptName[_COMPONENT_NAME_LEN]; - char * mon_decimal_point; - char * mon_thousands_sep; - char * mon_grouping; - char * positive_sign; - char * negative_sign; - char * currency_symbol; - char frac_digits; - char p_cs_precedes; - char n_cs_precedes; - char p_sep_by_space; - char n_sep_by_space; - char p_sign_posn; - char n_sign_posn; - char * int_curr_symbol; - char int_frac_digits; - char int_p_cs_precedes; - char int_n_cs_precedes; - char int_p_sep_by_space; - char int_n_sep_by_space; - char int_p_sign_posn; - char int_n_sign_posn; -}; - -struct _loc_coll_cmpt { - char CmptName[_COMPONENT_NAME_LEN]; - int char_start_value; - int char_coll_tab_size; - short char_spec_accents; - unsigned short * char_coll_table_ptr; - unsigned short * wchar_coll_seq_ptr; -}; -#else - -struct _loc_coll_cmpt { - int char_start_value; - int char_coll_tab_size; - short char_spec_accents; - unsigned short * char_coll_table_ptr; -}; - -#endif - -#if !_MSL_C_LOCALE_ONLY -struct _loc_ctype_cmpt { -#if !_MSL_C_LOCALE_ONLY - char CmptName[_COMPONENT_NAME_LEN]; - const unsigned short * ctype_map_ptr; - const unsigned char * upper_map_ptr; - const unsigned char * lower_map_ptr; -#if _MSL_WIDE_CHAR -#if _MSL_C99 - const unsigned short * wctype_map_ptr; - const wchar_t * wupper_map_ptr; - const wchar_t * wlower_map_ptr; -#endif - __decode_mbyte decode_mb; - __encode_mbyte encode_wc; -#endif -#endif -}; - -#elif _MSL_WIDE_CHAR && _MSL_C_LOCALE_ONLY - -struct _loc_ctype_cmpt { - __decode_mbyte decode_mb; - __encode_mbyte encode_wc; -}; - -#endif - -#if !_MSL_C_LOCALE_ONLY - -struct _loc_num_cmpt_vals { - char * decimal_point; - char * thousands_sep; - char * grouping; -}; - -struct _loc_num_cmpt { - char CmptName[_COMPONENT_NAME_LEN]; - char * decimal_point; - char * thousands_sep; - char * grouping; -}; - -#endif - -struct _loc_time_cmpt { -#if !_MSL_C_LOCALE_ONLY - char CmptName[_COMPONENT_NAME_LEN]; -#endif - char * am_pm; - char * DateTime_Format; - char * Twelve_hr_format; - char * Date_Format; - char * Time_Format; - char * Day_Names; - - char * MonthNames; - char * TimeZone; -}; - -#if _MSL_C_LOCALE_ONLY -struct __locale { - struct _loc_time_cmpt * time_cmpt_ptr; - struct _loc_coll_cmpt * coll_cmpt_ptr; - - #if _MSL_WIDE_CHAR - struct _loc_ctype_cmpt * ctype_cmpt_ptr; - #endif -}; -#else -struct __locale { - struct __locale * next_locale; - char locale_name[_LOCALE_NAME_LEN]; - struct _loc_coll_cmpt * coll_cmpt_ptr; - struct _loc_ctype_cmpt * ctype_cmpt_ptr; - struct _loc_mon_cmpt * mon_cmpt_ptr; - struct _loc_num_cmpt * num_cmpt_ptr; - struct _loc_time_cmpt * time_cmpt_ptr; -}; -#endif - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C extern struct __locale _current_locale; - -_MSL_END_EXTERN_C - -#pragma warn_padding reset -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/math.ARM.h b/tools/cw/include/MSL_C/math.ARM.h deleted file mode 100644 index 3ada5cbcb8..0000000000 --- a/tools/cw/include/MSL_C/math.ARM.h +++ /dev/null @@ -1,357 +0,0 @@ -#ifndef _MSL_MATH_ARM_H -#define _MSL_MATH_ARM_H - -#ifndef _MSL_CMATH -#error This header may only be included from -#endif - -#define __SET_ERRNO__ -#ifdef __SET_ERRNO__ - #include -#endif - -_MSL_BEGIN_NAMESPACE_STD -typedef float float_t; -typedef double double_t; -_MSL_END_NAMESPACE_STD - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C double _MSL_MATH_CDECL gamma(double); - -#if _MSL_C99 -extern int _ffix_r(float); -extern int _dfix_r(double); - -#if _MSL_LONGLONG -extern long long _ll_sfrom_d_r(double); -extern long long _ll_sfrom_f_r(float); -#endif - -extern float _frem(float, float); -extern float _frnd(float); - -extern double _drem(double, double); - -#endif - -#if _MSL_C99 || _MSL_USES_SUN_MATH_LIB -extern double _drnd(double); -#endif - -#if _MSL_C99 || _MSL_C_HAS_CPP_EXTENSIONS -extern double _dsqrt(double); -extern float _fsqrt(float); -#endif - -_MSL_END_EXTERN_C - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -#if _MSL_USE_INLINE - -_MSL_INLINE double _MSL_MATH_CDECL sqrt (double d) { - return _dsqrt(d); -} - -#if _MSL_C99 -_MSL_INLINE long _MSL_CDECL lrint (double d) { - return _dfix_r(d); -} -#endif - -#if _MSL_C99 || _MSL_C_HAS_CPP_EXTENSIONS -_MSL_INLINE float _MSL_MATH_CDECL acosf (float x) { - return (float)(acos)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL acosl (long double x) { - return (long double)(acos)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL asinf (float x) { - return (float)(asin)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL asinl (long double x) { - return (long double)(asin)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL atanf (float x) { - return (float)(atan)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL atanl (long double x) { - return (long double)(atan)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL atan2f (float y, float x) { - return (float)(atan2)((double)(y), (double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL atan2l (long double y, long double x) { - return (long double)(atan2)((double)(y), (double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL ceilf (float x) { - return (float)(ceil)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL ceill (long double x) { - return (long double)(ceil)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL cosf (float x) { - return (float)(cos)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL cosl (long double x) { - return (long double)(cos)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL coshf (float x) { - return (float)(cosh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL coshl (long double x) { - return (long double)(cosh)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL expf (float x) { - return (float)(exp)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL expl (long double x) { - return (long double)(exp)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL fabsf (float x) { - return (float)(fabs)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL fabsl (long double x) { - return (long double)(fabs)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL floorf (float x) { - return (float)(floor)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL floorl (long double x) { - return (long double)(floor)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL fmodf (float x, float y) { - return (float)(fmod)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL fmodl (long double x, long double y) { - return (long double)(fmod)((double)(x), (double)(y)); -} -_MSL_INLINE float _MSL_MATH_CDECL frexpf (float x, int * y) { - return (float)(frexp)((double)(x), (y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL frexpl (long double x, int * y) { - return (long double)(frexp)((double)(x), (y)); -} -_MSL_INLINE float _MSL_MATH_CDECL ldexpf (float x, int y) { - return (float)(ldexp)((double)(x), (y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL ldexpl (long double x, int y) { - return (long double)(ldexp)((double)(x), (y)); -} -_MSL_INLINE float _MSL_MATH_CDECL logf (float x) { - return (float)(log)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL logl (long double x) { - return (long double)(log)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL log10f (float x) { - return (float)(log10)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL log10l (long double x) { - return (long double)(log10)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL modff (float x, float * iptr) { - double iptrd; - float result = (float)modf((double)x, &iptrd); - *iptr = (float)iptrd; - return result; -} -_MSL_INLINE long double _MSL_MATH_CDECL modfl (long double x, long double * iptr) { - double iptrd; - long double result = (long double)modf((double)x, &iptrd); - *iptr = (long double)iptrd; - return result; -} -_MSL_INLINE float _MSL_MATH_CDECL powf (float x, float y) { - return (float)(pow)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL powl (long double x, long double y) { - return (long double)(pow)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL sinl (long double x) { - return (long double)(sin)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL sinf (float x) { - return (float)(sin)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL sinhf (float x) { - return (float)(sinh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL sinhl (long double x) { - return (long double)(sinh)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL sqrtf (float x) { - return _fsqrt(x); -} -_MSL_INLINE long double _MSL_MATH_CDECL sqrtl (long double x) { - return (long double)(sqrt)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL tanf (float x) { - return (float)(tan)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL tanl (long double x) { - return (long double)(tan)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL tanhf (float x) { - return (float)(tanh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL tanhl (long double x) { - return (long double)(tanh)((double)(x)); -} -#endif - -#if _MSL_C99 -_MSL_INLINE float _MSL_MATH_CDECL acoshf (float x) { - return (float)(acosh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL acoshl (long double x) { - return (long double)(acosh)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL asinhf (float x) { - return (float)(asinh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL asinhl (long double x) { - return (long double)(asinh)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL atanhf (float x) { - return (float)(atanh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL atanhl (long double x) { - return (long double)(atanh)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL cbrtl (long double x) { - return (long double)(cbrt)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL copysignf (float x, float y) { - return (float)(copysign)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL copysignl (long double x, long double y) { - return (long double)(copysign)((double)(x), (double)(y)); -} -_MSL_INLINE float _MSL_MATH_CDECL expm1f (float x) { - return (float)(expm1)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL expm1l (long double x) { - return (long double)(expm1)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL fdimf (float x, float y) { - return (float)(fdim)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL fdiml (long double x, long double y) { - return (long double)(fdim)((double)(x), (double)(y)); -} -_MSL_INLINE float _MSL_MATH_CDECL fmaxf (float x, float y) { - return (float)(fmax)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL fmaxl (long double x, long double y) { - return (long double)(fmax)((double)(x), (double)(y)); -} -_MSL_INLINE float _MSL_MATH_CDECL fminf (float x, float y) { - return (float)(fmin)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL fminl (long double x, long double y) { - return (long double)(fmin)((double)(x), (double)(y)); -} -_MSL_INLINE float _MSL_MATH_CDECL hypotf (float x, float y) { - return (float)(hypot)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL hypotl (long double x, long double y) { - return (long double)(hypot)((double)(x), (double)(y)); -} -#if _MSL_USES_SUN_MATH_LIB -_MSL_INLINE int _MSL_MATH_CDECL ilogbf (float x) { - return (ilogb)((double)(x)); -} -_MSL_INLINE int _MSL_MATH_CDECL ilogbl (long double x) { - return (ilogb)((double)(x)); -} -#endif -#if _MSL_LONGLONG -_MSL_INLINE long long int _MSL_MATH_CDECL llrint (double d) { - return _ll_sfrom_d_r(d); -} -_MSL_INLINE long long _MSL_MATH_CDECL llrintf (float x) { - return _ll_sfrom_f_r(x); -} -_MSL_INLINE long long _MSL_MATH_CDECL llrintl (long double x) { - return _ll_sfrom_d_r(x); -} -#if !_MSL_USES_SUN_MATH_LIB -_MSL_INLINE long long _MSL_MATH_CDECL llroundf (float x) { - return (llround)((double)(x)); -} -_MSL_INLINE long long _MSL_MATH_CDECL llroundl (long double x) { - return (llround)((double)(x)); -} -#endif -#endif -_MSL_INLINE long _MSL_CDECL lrintf (float f) { - return _ffix_r(f); -} -_MSL_INLINE float _MSL_MATH_CDECL log1pf (float x) { - return (float)(log1p)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL log1pl (long double x) { - return (long double)(log1p)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL log2f (float x) { - return (float)(log2)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL log2l (long double x) { - return (long double)(log2)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL logbf (float x) { - return (float)(logb)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL logbl (long double x) { - return (long double)(logb)((double)(x)); -} -_MSL_INLINE long double _MSL_MATH_CDECL nextafterl (long double x, long double y) { - return (long double)(nextafter)((double)(x), (double)(y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL nexttowardl (long double x, long double y) { - return (long double)(nexttoward)((double)(x), (y)); -} -_MSL_INLINE double _MSL_MATH_CDECL remainder (double d, double z) { - return _drem(d, z); -} -_MSL_INLINE float _MSL_MATH_CDECL remainderf (float x, float y) { - return _frem(x, y); -} -_MSL_INLINE long double _MSL_MATH_CDECL remainderl (long double x, long double y) { - return (long double)(remainder)((double)(x), (double)(y)); -} -_MSL_INLINE double _MSL_MATH_CDECL rint (double d) { - return _drnd(d); -} -_MSL_INLINE float _MSL_MATH_CDECL rintf (float x) { - return _frnd(x); -} -_MSL_INLINE long double _MSL_MATH_CDECL rintl (long double x) { - return (long double)(_drnd)((double)(x)); -} -_MSL_INLINE float _MSL_MATH_CDECL scalblnf (float x, long int y) { - return (float)(scalbln)((double)(x), (y)); -} -_MSL_INLINE long double _MSL_MATH_CDECL scalblnl (long double x, long int y) { - return (long double)(scalbln)((double)(x), (y)); -} -_MSL_INLINE float _MSL_MATH_CDECL scalbnf (float x, int y) { - return (float)(scalbn)((double)(x), (y)); -} -#if !_MSL_USES_SUN_MATH_LIB -_MSL_INLINE long double _MSL_MATH_CDECL scalbnl (long double x, int y) { - return (long double)(scalbn)((double)(x), (y)); -} -#endif - -#endif - -#endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/math.h b/tools/cw/include/MSL_C/math.h deleted file mode 100644 index f09302eab1..0000000000 --- a/tools/cw/include/MSL_C/math.h +++ /dev/null @@ -1,202 +0,0 @@ -#ifndef _MSL_MATH_H -#define _MSL_MATH_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) && defined(_MSL_CMATH_DEFINED_MATH_ITEMS) -using std::acos; -using std::asin; -using std::atan; -using std::atan2; -using std::ceil; -using std::cos; -using std::cosh; -using std::exp; -using std::fabs; -using std::floor; -using std::fmod; -using std::frexp; -using std::ldexp; -using std::log; -using std::log10; -using std::modf; -using std::pow; -using std::sin; -using std::sinh; -using std::sqrt; -using std::tan; -using std::tanh; - -#if _MSL_C99 || _MSL_C_HAS_CPP_EXTENSIONS -using std::acosf; -using std::acosl; -using std::asinf; -using std::asinl; -using std::atanf; -using std::atanl; -using std::atan2f; -using std::atan2l; -using std::ceilf; -using std::ceill; -using std::cosf; -using std::cosl; -using std::coshf; -using std::coshl; -using std::expf; -using std::expl; -using std::fabsf; -using std::fabsl; -using std::floorf; -using std::floorl; -using std::fmodf; -using std::fmodl; -using std::frexpf; -using std::frexpl; -using std::ldexpf; -using std::ldexpl; -using std::logf; -using std::logl; -using std::log10f; -using std::log10l; -using std::modff; -using std::modfl; -using std::powf; -using std::powl; -using std::sinf; -using std::sinl; -using std::sinhf; -using std::sinhl; -using std::sqrtf; -using std::sqrtl; -using std::tanf; -using std::tanl; -using std::tanhf; -using std::tanhl; -#endif - -#if _MSL_C99 || _MSL_USES_SUN_MATH_LIB -using std::copysign; -using std::expm1; -using std::rint; -using std::scalbn; -#endif - -#if _MSL_C99 -using std::acosh; -using std::acoshf; -using std::acoshl; -using std::asinh; -using std::asinhf; -using std::asinhl; -using std::atanh; -using std::atanhf; -using std::atanhl; -using std::cbrt; -using std::cbrtf; -using std::cbrtl; -using std::copysignf; -using std::copysignl; -using std::erf; -using std::erff; -using std::erfl; -using std::erfc; -using std::erfcf; -using std::erfcl; -using std::exp2; -using std::exp2f; -using std::exp2l; -using std::expm1f; -using std::expm1l; -using std::fdim; -using std::fdimf; -using std::fdiml; -using std::fma; -using std::fmaf; -using std::fmal; -using std::fmax; -using std::fmaxf; -using std::fmaxl; -using std::fmin; -using std::fminf; -using std::fminl; -using std::hypot; -using std::hypotf; -using std::hypotl; -using std::ilogb; -using std::ilogbf; -using std::ilogbl; -using std::lgamma; -using std::lgammaf; -using std::lgammal; - #if _MSL_LONGLONG -using std::llrint; -using std::llrintf; -using std::llrintl; -using std::llround; -using std::llroundf; -using std::llroundl; - #endif -using std::log1p; -using std::log1pf; -using std::log1pl; -using std::log2; -using std::log2f; -using std::log2l; -using std::logb; -using std::logbf; -using std::logbl; -using std::lrint; -using std::lrintf; -using std::lrintl; -using std::lround; -using std::lroundf; -using std::lroundl; -using std::nan; -using std::nanf; -using std::nanl; -using std::nearbyint; -using std::nearbyintf; -using std::nearbyintl; -using std::nextafter; -using std::nextafterf; -using std::nextafterl; -using std::nexttoward; -using std::nexttowardf; -using std::nexttowardl; -using std::remainder; -using std::remainderf; -using std::remainderl; -using std::remquo; -using std::remquof; -using std::remquol; -using std::rintf; -using std::rintl; -using std::round; -using std::roundf; -using std::roundl; -using std::scalbln; -using std::scalblnf; -using std::scalblnl; -using std::scalbnf; -using std::scalbnl; -using std::tgamma; -using std::tgammaf; -using std::tgammal; -using std::trunc; -using std::truncf; -using std::truncl; -using std::abs; -using std::float_t; -using std::double_t; -#endif - -#endif - -#endif -#endif diff --git a/tools/cw/include/MSL_C/math_api.h b/tools/cw/include/MSL_C/math_api.h deleted file mode 100644 index 2c797208c4..0000000000 --- a/tools/cw/include/MSL_C/math_api.h +++ /dev/null @@ -1,262 +0,0 @@ -#ifndef _MSL_MATH_API_H -#define _MSL_MATH_API_H - -#include - -#if _MSL_LITTLE_ENDIAN - #define __HI(x) (sizeof(x) == 8 ? *(1 + (_INT32 *)&x) : (*(_INT32 *)&x)) - #define __LO(x) (*(_INT32 *)&x) - #define __UHI(x) (sizeof(x) == 8 ? *(1 + (_UINT32 *)&x) : (*(_UINT32 *)&x)) - #define __ULO(x) (*(_UINT32 *)&x) -#else - #define __LO(x) (sizeof(x) == 8 ? *(1 + (_INT32 *)&x) : (*(_INT32 *)&x)) - #define __HI(x) (*(_INT32 *)&x) - #define __ULO(x) (sizeof(x) == 8 ? *(1 + (_UINT32 *)&x) : (*(_UINT32 *)&x)) - #define __UHI(x) (*(_UINT32 *)&x) -#endif - -_MSL_BEGIN_EXTERN_C - -#if _MSL_FLOATING_POINT - #if _MSL_C99 - #if __has_intrinsic(__builtin_fma) -extern double __builtin_fma(double, double, double) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin_fmaf) -extern float __builtin_fmaf(float, float, float) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - -double _MSL_MATH_CDECL __ieee754_lgamma_r(double, _INT32 *); - - #endif -#endif - - #if __has_intrinsic(__builtin___count_bits32) -extern unsigned int __builtin___count_bits32(_UINT32) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #else -unsigned int _MSL_MATH_CDECL __msl_generic_count_bits32(_UINT32) _MSL_CANT_THROW; - #endif - - #if __has_intrinsic(__builtin___count_leading_zero32) -extern unsigned int __builtin___count_leading_zero32(_UINT32) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #else -unsigned int _MSL_MATH_CDECL __msl_generic_count_leading_zero32(_UINT32) _MSL_CANT_THROW; - #endif - - #if __has_intrinsic(__builtin___count_trailing_zero32) -extern unsigned int __builtin___count_trailing_zero32(_UINT32) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___count_leading_one32) -extern unsigned int __builtin___count_leading_one32(_UINT32) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___count_trailing_one32) -extern unsigned int __builtin___count_trailing_one32(_UINT32) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___rotate_left32) -extern _UINT32 __builtin___rotate_left32(_UINT32, int) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___rotate_right32) -extern _UINT32 __builtin___rotate_right32(_UINT32, int) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - -#if _MSL_LONGLONG - - #if __has_intrinsic(__builtin___count_bits64) -extern unsigned int __builtin___count_bits64(_UINT64) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #else -unsigned int _MSL_MATH_CDECL __msl_generic_count_bits64(_UINT64) _MSL_CANT_THROW; - #endif - - #if __has_intrinsic(__builtin___count_leading_zero64) -extern unsigned int __builtin___count_leading_zero64(_UINT64) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #else -unsigned int _MSL_MATH_CDECL __msl_generic_count_leading_zero64(_UINT64) _MSL_CANT_THROW; - #endif - - #if __has_intrinsic(__builtin___count_trailing_zero64) -extern unsigned int __builtin___count_trailing_zero64(_UINT64) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #else -unsigned int _MSL_MATH_CDECL __msl_generic_count_trailing_zero64(_UINT64) _MSL_CANT_THROW; - #endif - - #if __has_intrinsic(__builtin___count_leading_one64) -extern unsigned int __builtin___count_leading_one64(_UINT64) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___count_trailing_one64) -extern unsigned int __builtin___count_trailing_one64(_UINT64) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___rotate_left64) -extern _UINT64 __builtin___rotate_left64(_UINT64, int) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - - #if __has_intrinsic(__builtin___rotate_right64) -extern _UINT64 __builtin___rotate_right64(_UINT64, int) _MSL_CANT_THROW _MSL_ATTRIBUTE_CONST; - #endif - -#endif - -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_bits32(_UINT32) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_leading_zero32(_UINT32) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_trailing_zero32(_UINT32) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_leading_one32(_UINT32) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_trailing_one32(_UINT32) _MSL_CANT_THROW; -_MSL_IMP_EXP_C _UINT32 _MSL_MATH_CDECL __msl_rotate_left32(_UINT32, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C _UINT32 _MSL_MATH_CDECL __msl_rotate_right32(_UINT32, int) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_bits64(_UINT64) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_leading_zero64(_UINT64) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_trailing_zero64(_UINT64) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_leading_one64(_UINT64) _MSL_CANT_THROW; -_MSL_IMP_EXP_C unsigned int _MSL_MATH_CDECL __msl_count_trailing_one64(_UINT64) _MSL_CANT_THROW; -_MSL_IMP_EXP_C _UINT64 _MSL_MATH_CDECL __msl_rotate_left64(_UINT64, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C _UINT64 _MSL_MATH_CDECL __msl_rotate_right64(_UINT64, int) _MSL_CANT_THROW; -#endif - -#if _MSL_USE_INLINE - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_bits32(_UINT32 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_bits32) - return __builtin___count_bits32(x); - #else - return __msl_generic_count_bits32(x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_leading_zero32(_UINT32 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_leading_zero32) - return __builtin___count_leading_zero32(x); - #else - return __msl_generic_count_leading_zero32(x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_trailing_zero32(_UINT32 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_trailing_zero32) - return __builtin___count_trailing_zero32(x); - #else - return __msl_count_bits32((x & - x) - 1); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_leading_one32(_UINT32 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_leading_one32) - return __builtin___count_leading_one32(x); - #else - return __msl_count_leading_zero32(~x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_trailing_one32(_UINT32 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_trailing_one32) - return __builtin___count_trailing_one32(x); - #else - return __msl_count_trailing_zero32(~x); - #endif -} - -_MSL_INLINE _UINT32 _MSL_MATH_CDECL __msl_rotate_left32(_UINT32 x, int n) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___rotate_left32) - return __builtin___rotate_left32(x, n); - #else - n &= 0x1F; - return (x << n) | (x >> (32 - n)); - #endif -} - -_MSL_INLINE _UINT32 _MSL_MATH_CDECL __msl_rotate_right32(_UINT32 x, int n) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___rotate_right32) - return __builtin___rotate_right32(x, n); - #else - n &= 0x1F; - return (x << (32 - n)) | (x >> n); - #endif -} - -#if _MSL_LONGLONG - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_bits64(_UINT64 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_bits64) - return __builtin___count_bits64(x); - #else - return __msl_generic_count_bits64(x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_leading_zero64(_UINT64 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_leading_zero64) - return __builtin___count_leading_zero64(x); - #else - return __msl_generic_count_leading_zero64(x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_trailing_zero64(_UINT64 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_trailing_zero64) - return __builtin___count_trailing_zero64(x); - #else - return __msl_count_bits64((x & - x) - 1); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_leading_one64(_UINT64 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_leading_one64) - return __builtin___count_leading_one64(x); - #else - return __msl_count_leading_zero64(~x); - #endif -} - -_MSL_INLINE unsigned int _MSL_MATH_CDECL __msl_count_trailing_one64(_UINT64 x) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___count_trailing_one64) - return __builtin___count_trailing_one64(x); - #else - return __msl_count_trailing_zero64(~x); - #endif -} - -_MSL_INLINE _UINT64 _MSL_MATH_CDECL __msl_rotate_left64(_UINT64 x, int n) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___rotate_left64) - return __builtin___rotate_left64(x, n); - #else - n &= 0x3F; - return (x << n) | (x >> (64 - n)); - #endif -} - -_MSL_INLINE _UINT64 _MSL_MATH_CDECL __msl_rotate_right64(_UINT64 x, int n) _MSL_CANT_THROW -{ - #if __has_intrinsic(__builtin___rotate_right64) - return __builtin___rotate_right64(x, n); - #else - n &= 0x3F; - return (x << (64 - n)) | (x >> n); - #endif -} - -#endif -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/math_config.h b/tools/cw/include/MSL_C/math_config.h deleted file mode 100644 index 660bcd3a14..0000000000 --- a/tools/cw/include/MSL_C/math_config.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _MSL_MATH_CONFIG_H -#define _MSL_MATH_CONFIG_H - -#include - -#if defined(__MIPS__) - #include -#elif defined(__m56800__) - #include -#elif defined(__m56800E__) - #include -#elif defined(__arm) - #include -#elif defined(__POWERPC__) - #include -#elif defined(__INTEL__) - #if defined(__MWERKS__) && __option(k63d) - #include - #else - #include - #endif -#elif defined(__COLDFIRE__) - #include -#elif defined(_ENTERPRISE_C_) - # include -#endif - -#endif diff --git a/tools/cw/include/MSL_C/math_integral.h b/tools/cw/include/MSL_C/math_integral.h deleted file mode 100644 index 600a7cb112..0000000000 --- a/tools/cw/include/MSL_C/math_integral.h +++ /dev/null @@ -1,530 +0,0 @@ -#ifndef _MSL_MATH_INTEGRAL_H -#define _MSL_MATH_INTEGRAL_H - -#include - -#if _MSL_FLOATING_POINT \ - && !defined(_MSL_NO_MATH_LIB) \ - && defined(__cplusplus) \ - && __embedded_cplusplus == 0 \ - && defined(__ANSI_OVERLOAD__) \ - && defined(_MSL_INTEGRAL_MATH) \ - && !(__dest_os == __mac_os && defined(__FP__)) \ - && !defined(__m56800E__) - -_MSL_BEGIN_NAMESPACE_STD - -#if defined(__MWERKS__) && ! __option (bool) && !defined(_MSL_NO_BOOL) - #ifndef bool - #ifdef _MSL_BOOL_TYPE - #define bool _MSL_BOOL_TYPE - #else - #define bool unsigned char - #endif - #define __MSL_MATH_BOOL - #endif - #ifndef false - #define false 0 - #define __MSL_MATH_FALSE - #endif - #ifndef true - #define true 1 - #define __MSL_MATH_TRUE - #endif -#endif - -template struct __msl_is_integral {static const bool value = false;}; - -#if __option(bool) -template <> struct __msl_is_integral {static const bool value = true;}; -#endif -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -#if __option(wchar_type) -template <> struct __msl_is_integral {static const bool value = true;}; -#endif -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -#if _MSL_LONGLONG -template <> struct __msl_is_integral {static const bool value = true;}; -template <> struct __msl_is_integral {static const bool value = true;}; -#endif - -template struct __msl_is_floating {static const bool value = false;}; -template <> struct __msl_is_floating {static const bool value = true;}; -template <> struct __msl_is_floating {static const bool value = true;}; -template <> struct __msl_is_floating {static const bool value = true;}; - -template struct __msl_is_arithmetic -{static const bool value = __msl_is_integral<_T>::value || - __msl_is_floating<_T>::value;}; - -template struct __msl_enable_if {}; -template struct __msl_enable_if {typedef _T type;}; - -template struct __msl_if {typedef _If type;}; -template struct __msl_if {typedef _Then type;}; - -template -class __msl_promote -{ -private: -typedef typename __msl_promote<_A1>::type type1; -typedef typename __msl_promote<_A2>::type type2; -typedef typename __msl_promote<_A3>::type type3; -public: -typedef __typeof__(type1 () + type2 () + type3 ()) type; -}; - -template -class __msl_promote<_A1, void, void> -{ -public: -typedef typename __msl_if<__msl_is_arithmetic<_A1>::value, - typename __msl_if<__msl_is_integral<_A1>::value, double, _A1>::type, - char ->::type type; -}; - -template -class __msl_promote<_A1, _A2, void> -{ -private: -typedef typename __msl_promote<_A1>::type type1; -typedef typename __msl_promote<_A2>::type type2; -public: -typedef __typeof__(type1 () + type2 ()) type; -}; - -template -struct __msl_is_same { - static const bool value = false; -}; - -template -struct __msl_is_same<_A1, _A1> { - static const bool value = true; -}; - -#ifdef __MSL_MATH_BOOL - #undef bool - #undef __MSL_MATH_BOOL -#endif - -#ifdef __MSL_MATH_FALSE - #undef false - #undef __MSL_MATH_FALSE -#endif - -#ifdef __MSL_MATH_TRUE - #undef true - #undef __MSL_MATH_TRUE -#endif - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL acos(_A1 x) {return acos((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL acosh(_A1 x) {return acosh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL asin(_A1 x) {return asin((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL asinh(_A1 x) {return asinh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL atan(_A1 x) {return atan((double)x);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL atan2(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return atan2((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL atanh(_A1 x) {return atanh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL cbrt(_A1 x) {return cbrt((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL ceil(_A1 x) {return ceil((double)x);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL copysign(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return copysign((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL cos(_A1 x) {return cos((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL cosh(_A1 x) {return cosh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL erf(_A1 x) {return erf((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL erfc(_A1 x) {return erfc((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL exp(_A1 x) {return exp((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL exp2(_A1 x) {return exp2((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL expm1(_A1 x) {return expm1((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL fabs(_A1 x) {return fabs((double)x);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL fdim(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return fdim((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL floor(_A1 x) {return floor((double)x);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value && __msl_is_arithmetic<_A3>::value, - typename __msl_promote<_A1, _A2, _A3>::type ->::type -_MSL_MATH_CDECL fma(_A1 x, _A2 y, _A3 z) -{ - typedef typename __msl_promote<_A1, _A2, _A3>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value - && __msl_is_same<_A3, r_type>::value)]; - (void)test; - return fma((r_type)x, (r_type)y, (r_type)z); -} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL fmax(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return fmax((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL fmin(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return fmin((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL fmod(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return fmod((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL frexp(_A1 x, int * y) {return frexp((double)x, y);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL hypot(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return hypot((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, int>::type -_MSL_MATH_CDECL ilogb(_A1 x) {return ilogb((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL ldexp(_A1 x, int y) {return ldexp((double)x, y);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL lgamma(_A1 x) {return lgamma((double)x);} - -#if _MSL_LONGLONG - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, long long>::type -_MSL_MATH_CDECL llrint(_A1 x) {return llrint((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, long long>::type -_MSL_MATH_CDECL llround(_A1 x) {return llround((double)x);} - -#endif - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL log(_A1 x) {return log((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL log10(_A1 x) {return log10((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL log1p(_A1 x) {return log1p((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL log2(_A1 x) {return log2((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL logb(_A1 x) {return logb((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, long>::type -_MSL_MATH_CDECL lrint(_A1 x) {return lrint((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, long>::type -_MSL_MATH_CDECL lround(_A1 x) {return lround((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL modf(_A1 x, double * y) {return modf((double)x, y);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL nearbyint(_A1 x) {return nearbyint((double)x);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL nextafter(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return nextafter((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL nexttoward(_A1 x, long double y) {return nexttoward((double)x, y);} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL pow(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return pow((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL remainder(_A1 x, _A2 y) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return remainder((r_type)x, (r_type)y); -} - -template -inline -typename __msl_enable_if< - __msl_is_arithmetic<_A1>::value && __msl_is_arithmetic<_A2>::value, - typename __msl_promote<_A1, _A2>::type ->::type -_MSL_MATH_CDECL remquo(_A1 x, _A2 y, int * z) -{ - typedef typename __msl_promote<_A1, _A2>::type r_type; - char test[!(__msl_is_same<_A1, r_type>::value && __msl_is_same<_A2, r_type>::value)]; - (void)test; - return remquo((r_type)x, (r_type)y, z); -} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL rint(_A1 x) {return rint((double)x);} - -#if !_MSL_USES_SUN_MATH_LIB - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL round(_A1 x) {return round((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL scalbln(_A1 x, long y) {return scalbln((double)x, y);} - -#endif - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL scalbn(_A1 x, int y) {return scalbn((double)x, y);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL sin(_A1 x) {return sin((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL sinh(_A1 x) {return sinh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL sqrt(_A1 x) {return sqrt((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL tan(_A1 x) {return tan((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL tanh(_A1 x) {return tanh((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL tgamma(_A1 x) {return tgamma((double)x);} - -template -inline -typename __msl_enable_if<__msl_is_integral<_A1>::value, double>::type -_MSL_MATH_CDECL trunc(_A1 x) {return trunc((double)x);} - -_MSL_END_NAMESPACE_STD - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/mbstring.h b/tools/cw/include/MSL_C/mbstring.h deleted file mode 100644 index b2ea9d0876..0000000000 --- a/tools/cw/include/MSL_C/mbstring.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _MSL_MBSTRING -#define _MSL_MBSTRING - -#include -#include -#include - -_MSL_IMP_EXP_C int __utf8_to_unicode(wchar_t *, const char *, __std(size_t)) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int __unicode_to_UTF8(char * _MSL_RESTRICT, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int __mbtowc_noconv(wchar_t *, const char *, __std(size_t)) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int __wctomb_noconv(char *, wchar_t wchar) _MSL_CANT_THROW; - -#endif diff --git a/tools/cw/include/MSL_C/mem_funcs.h b/tools/cw/include/MSL_C/mem_funcs.h deleted file mode 100644 index b6f3355954..0000000000 --- a/tools/cw/include/MSL_C/mem_funcs.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef _MSL_MEM_FUNCS -#define _MSL_MEM_FUNCS - -#include - -#ifndef _MSL_LONG_COPY_MIN - #define _MSL_LONG_COPY_MIN 32 -#endif - -#define __min_bytes_for_long_copy _MSL_LONG_COPY_MIN - -_MSL_BEGIN_EXTERN_C - -void _MSL_CDECL __copy_mem(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __move_mem(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __copy_longs_aligned(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __copy_longs_rev_aligned(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __copy_longs_unaligned(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __copy_longs_rev_unaligned(void * dst, const void * src, unsigned long n) _MSL_CANT_THROW; -void _MSL_CDECL __fill_mem(void * dst, int val, unsigned long n) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/misc_io.h b/tools/cw/include/MSL_C/misc_io.h deleted file mode 100644 index d2ac3df94c..0000000000 --- a/tools/cw/include/MSL_C/misc_io.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifndef _MSL_MISC_IO_H -#define _MSL_MISC_IO_H - -#include - -#if _MSL_OS_DISK_FILE_SUPPORT - -_MSL_BEGIN_EXTERN_C - -void _MSL_CDECL __stdio_atexit(void) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/mslGlobals.h b/tools/cw/include/MSL_C/mslGlobals.h deleted file mode 100644 index 6237e0b854..0000000000 --- a/tools/cw/include/MSL_C/mslGlobals.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef _MSLGLOBALS_H -#define _MSLGLOBALS_H - -#if defined(__MC68K__) || defined(__COLDFIRE__) - #if defined(__PALMOS_TRAPS__) - #include - #elif defined(__embedded__) - #include - #else - - #error mslGlobals.h could not include prefix file - #endif -#elif (defined(__POWERPC__) && !defined(__PPC_EABI__)) && __MACH__ - #include -#elif (defined(__POWERPC__) && !defined(__PPC_EABI__)) - #include -#elif defined(__PPCGEKKO__) - #include -#elif defined(__PPC_EABI__) - #include -#elif defined(__INTEL__) - #if defined(__linux__) - #include - #elif !defined(UNDER_CE) - #include - #else - - #error mslGlobals.h could not include prefix file - #endif -#elif (defined(__MIPS__) && !defined(UNDER_CE)) - #if defined(__MIPS_PSX2__) - #include - #else - #include - #endif -#elif defined(__m56800E__) || defined(__m56800__) - #include -#elif defined(__MCORE__) - #include -#elif defined(__SH__) - #include -#elif defined(__arm) - #include -#elif defined(_ENTERPRISE_C_) - #include -#else - - #ifndef RC_INVOKED - #error mslGlobals.h could not include prefix file - #endif -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_c_version.h b/tools/cw/include/MSL_C/msl_c_version.h deleted file mode 100644 index 1c54149ca1..0000000000 --- a/tools/cw/include/MSL_C/msl_c_version.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _MSL_C_VERSION_H -#define _MSL_C_VERSION_H - -#define __MSL__ 0x00011000 - -#define __MSL_BUILD__ 06 - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_ctype.h b/tools/cw/include/MSL_C/msl_cpp_std_ctype.h deleted file mode 100644 index d1c2ed2f4a..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_ctype.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _MSL_CPP_STD_CTYPE_H -#define _MSL_CPP_STD_CTYPE_H - -#ifdef __cplusplus - -namespace std { -#if _MSL_OS_X_VERSION > 1 -using ::isalnum; -using ::isalpha; -#if _MSL_C99 -using ::isblank; -#endif -using ::iscntrl; -using ::isdigit; -using ::isgraph; -using ::islower; -using ::isprint; -using ::ispunct; -using ::isspace; -using ::isupper; -using ::isxdigit; -#endif -using ::tolower; -using ::toupper; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_inttypes.h b/tools/cw/include/MSL_C/msl_cpp_std_inttypes.h deleted file mode 100644 index f22f168496..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_inttypes.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _MSL_CPP_STD_INTTYPES_H -#define _MSL_CPP_STD_INTTYPES_H - -#if _MSL_C99 - -#ifdef __cplusplus - -#if _MSL_OS_X_VERSION > 2 - -namespace std { - using ::imaxdiv_t; - using ::imaxabs; - using ::imaxdiv; - using ::strtoimax; - using ::strtoumax; - #if _MSL_WIDE_CHAR - using ::wcstoimax; - using ::wcstoumax; - #endif -} - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_locale.h b/tools/cw/include/MSL_C/msl_cpp_std_locale.h deleted file mode 100644 index cc92926ffd..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_locale.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef _MSL_CPP_STD_LOCALE_H -#define _MSL_CPP_STD_LOCALE_H - -#ifdef __cplusplus - -namespace std { -using ::lconv; -using ::localeconv; -using ::setlocale; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_math.h b/tools/cw/include/MSL_C/msl_cpp_std_math.h deleted file mode 100644 index a69df5463b..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_math.h +++ /dev/null @@ -1,197 +0,0 @@ -#ifndef _MSL_CPP_STD_MATH_H -#define _MSL_CPP_STD_MATH_H - -#if defined(__cplusplus) && defined(_MSL_CMATH_DEFINED_MATH_ITEMS) - -namespace std { -using ::acos; -using ::asin; -using ::atan; -using ::atan2; -using ::ceil; -using ::cos; -using ::cosh; -using ::exp; -using ::fabs; -using ::floor; -using ::fmod; -using ::frexp; -using ::ldexp; -using ::log; -using ::log10; -using ::modf; -using ::pow; -using ::sin; -using ::sinh; -using ::sqrt; -using ::tan; -using ::tanh; - -#if _MSL_C99 || _MSL_C_HAS_CPP_EXTENSIONS -using ::acosf; -using ::acosl; -using ::asinf; -using ::asinl; -using ::atanf; -using ::atanl; -using ::atan2f; -using ::atan2l; -using ::ceilf; -using ::ceill; -using ::cosf; -using ::cosl; -using ::coshf; -using ::coshl; -using ::expf; -using ::expl; -using ::fabsf; -using ::fabsl; -using ::floorf; -using ::floorl; -using ::fmodf; -using ::fmodl; -using ::frexpf; -using ::frexpl; -using ::ldexpf; -using ::ldexpl; -using ::logf; -using ::logl; -using ::log10f; -using ::log10l; -using ::modff; -using ::modfl; -using ::powf; -using ::powl; -using ::sinf; -using ::sinl; -using ::sinhf; -using ::sinhl; -using ::sqrtf; -using ::sqrtl; -using ::tanf; -using ::tanl; -using ::tanhf; -using ::tanhl; -#endif - -#if _MSL_C99 || _MSL_USES_SUN_MATH_LIB -using ::copysign; -using ::expm1; -using ::rint; -using ::scalbn; -#endif - -#if _MSL_C99 -using ::acosh; -using ::acoshf; -using ::acoshl; -using ::asinh; -using ::asinhf; -using ::asinhl; -using ::atanh; -using ::atanhf; -using ::atanhl; -using ::cbrt; -using ::cbrtf; -using ::cbrtl; -using ::copysignf; -using ::copysignl; -using ::erf; -using ::erff; -using ::erfl; -using ::erfc; -using ::erfcf; -using ::erfcl; -using ::exp2; -using ::exp2f; -using ::exp2l; -using ::expm1f; -using ::expm1l; -using ::fdim; -using ::fdimf; -using ::fdiml; -using ::fma; -using ::fmaf; -using ::fmal; -using ::fmax; -using ::fmaxf; -using ::fmaxl; -using ::fmin; -using ::fminf; -using ::fminl; -using ::hypot; -using ::hypotf; -using ::hypotl; -using ::ilogb; -using ::ilogbf; -using ::ilogbl; -using ::lgamma; -using ::lgammaf; -using ::lgammal; -#if _MSL_LONGLONG -using ::llrint; -using ::llrintf; -using ::llrintl; -using ::llround; -using ::llroundf; -using ::llroundl; -#endif -using ::log1p; -using ::log1pf; -using ::log1pl; -using ::log2; -using ::log2f; -using ::log2l; -using ::logb; -using ::logbf; -using ::logbl; -using ::lrint; -using ::lrintf; -using ::lrintl; -using ::lround; -using ::lroundf; -using ::lroundl; -using ::nan; -using ::nanf; -using ::nanl; -using ::nearbyint; -using ::nearbyintf; -using ::nearbyintl; -using ::nextafter; -using ::nextafterf; -using ::nextafterl; -using ::nexttoward; -using ::nexttowardf; -using ::nexttowardl; -using ::remainder; -using ::remainderf; -using ::remainderl; -using ::remquo; -using ::remquof; -using ::remquol; -using ::rintf; -using ::rintl; -using ::round; -using ::roundf; -using ::roundl; -using ::scalbln; -using ::scalblnf; -using ::scalblnl; -using ::scalbnf; -using ::scalbnl; -using ::tgamma; -using ::tgammaf; -using ::tgammal; -using ::trunc; -using ::truncf; -using ::truncl; -using ::abs; -using ::float_t; -using ::double_t; - -#endif -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_setjmp.h b/tools/cw/include/MSL_C/msl_cpp_std_setjmp.h deleted file mode 100644 index b2cdf69a10..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_setjmp.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _MSL_CPP_STD_SETJMP_H -#define _MSL_CPP_STD_SETJMP_H - -#ifdef __cplusplus - -namespace std { -using ::jmp_buf; -using ::longjmp; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_signal.h b/tools/cw/include/MSL_C/msl_cpp_std_signal.h deleted file mode 100644 index a56c6c885f..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_signal.h +++ /dev/null @@ -1,15 +0,0 @@ - -#ifndef _MSL_CPP_STD_SIGNAL_H -#define _MSL_CPP_STD_SIGNAL_H - -#ifdef __cplusplus - -namespace std { -using ::sig_atomic_t; -using ::raise; -using ::signal; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_stdarg.h b/tools/cw/include/MSL_C/msl_cpp_std_stdarg.h deleted file mode 100644 index 6c8b66b33b..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_stdarg.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _MSL_CPP_STD_STDARG_H -#define _MSL_CPP_STD_STDARG_H - -#ifdef __cplusplus - -namespace std { -using ::va_list; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_stddef.h b/tools/cw/include/MSL_C/msl_cpp_std_stddef.h deleted file mode 100644 index 95df10ed6f..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_stddef.h +++ /dev/null @@ -1,14 +0,0 @@ - -#ifndef _MSL_CPP_STD_STDDEF_H -#define _MSL_CPP_STD_STDDEF_H - -#ifdef __cplusplus - -namespace std { -using ::ptrdiff_t; -using ::size_t; -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_stdint.h b/tools/cw/include/MSL_C/msl_cpp_std_stdint.h deleted file mode 100644 index 6f36d4c286..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_stdint.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _MSL_CPP_STD_STDINT_H -#define _MSL_CPP_STD_STDINT_H - -#if _MSL_C99 - -#ifdef __cplusplus - -namespace std { -using ::int8_t; -using ::int16_t; -using ::int32_t; -using ::uint8_t; -using ::uint16_t; -using ::uint32_t; -using ::int_least8_t; -using ::int_least16_t; -using ::int_least32_t; -using ::uint_least8_t; -using ::uint_least16_t; -using ::uint_least32_t; -using ::int_fast8_t; -using ::int_fast16_t; -using ::int_fast32_t; -using ::uint_fast8_t; -using ::uint_fast16_t; -using ::uint_fast32_t; -#if _MSL_LONGLONG -using ::int64_t; -using ::uint64_t; -using ::int_least64_t; -using ::uint_least64_t; -using ::int_fast64_t; -using ::uint_fast64_t; -#endif -using ::intptr_t; -using ::uintptr_t; -using ::intmax_t; -using ::uintmax_t; -} - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_stdio.h b/tools/cw/include/MSL_C/msl_cpp_std_stdio.h deleted file mode 100644 index 0413747ef6..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_stdio.h +++ /dev/null @@ -1,86 +0,0 @@ -#ifndef _MSL_CPP_STD_STDIO_H -#define _MSL_CPP_STD_STDIO_H - -#ifdef __cplusplus - -namespace std { -using ::FILE; -using ::fpos_t; -using ::size_t; -using ::clearerr; -using ::fclose; -using ::feof; -using ::ferror; -using ::fflush; -using ::fgetc; -using ::fgetpos; -using ::fgets; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::fopen; -using ::fprintf; -#endif -using ::fputc; -using ::fputs; -using ::fread; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::freopen; -#endif -using ::fscanf; -using ::fseek; -using ::fsetpos; -using ::ftell; -using ::fwrite; -using ::getc; -using ::getchar; -using ::gets; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::perror; -#endif -using ::printf; -using ::putc; -using ::putchar; -using ::puts; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::remove; -using ::rename; -#endif -using ::rewind; -using ::scanf; -using ::setbuf; -using ::setvbuf; -using ::sprintf; -using ::snprintf; -using ::sscanf; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::tmpfile; -using ::tmpnam; -#endif -using ::ungetc; -using ::vfprintf; -using ::vprintf; -using ::vsprintf; -using ::vfscanf; -using ::vscanf; -using ::vsscanf; -using ::vsnprintf; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using ::errno_t; -using ::rsize_t; -using ::fscanf_s; -using ::scanf_s; -using ::sscanf_s; -using ::vfscanf_s; -using ::vsscanf_s; -using ::gets_s; -#if _MSL_OS_DISK_FILE_SUPPORT -using ::fopen_s; -using ::freopen_s; -using ::tmpfile_s; -using ::tmpnam_s; -#endif -#endif -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_stdlib.h b/tools/cw/include/MSL_C/msl_cpp_std_stdlib.h deleted file mode 100644 index 045a72e52d..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_stdlib.h +++ /dev/null @@ -1,99 +0,0 @@ -#ifndef _MSL_CPP_STD_STDLIB_H -#define _MSL_CPP_STD_STDLIB_H - -#ifdef __cplusplus - -namespace std { -using ::size_t; -using ::abort; -using ::atexit; -using ::exit; -#if _MSL_C99 -#if _MSL_OS_X_VERSION > 3 -using ::_Exit; -#endif -#endif -using ::getenv; -using ::system; -using ::malloc; -using ::calloc; -using ::realloc; -using ::free; -using ::atol; -#if _MSL_LONGLONG -#if _MSL_C99 -#if _MSL_OS_X_VERSION > 2 -using ::atoll; -#endif -#endif -#endif -#ifndef _MSL_NO_MATH_LIB -using ::atof; -using ::strtod; -#if _MSL_OS_X_VERSION > 2 -using ::strtold; -#if _MSL_C99 -using ::strtof; -#endif -#endif -#endif -using ::atoi; -using ::strtol; -using ::strtoul; -#if _MSL_LONGLONG -#if _MSL_C99 -#if _MSL_OS_X_VERSION > 1 -using ::strtoll; -using ::strtoull; -#endif -#endif -#endif -#if _MSL_WIDE_CHAR -using ::mblen; -using ::mbstowcs; -using ::mbtowc; -using ::wctomb; -using ::wcstombs; -#endif -using ::bsearch; -using ::qsort; -using ::div_t; -using ::ldiv_t; -using ::abs; -using ::div; -using ::labs; -#if _MSL_LONGLONG -#if _MSL_C99 -#if _MSL_OS_X_VERSION > 2 -using ::llabs; -using ::lldiv_t; -using ::lldiv; -#endif -#endif -#endif -using ::ldiv; -using ::srand; -using ::rand; -#if 0 -#if __VEC__ -using ::vec_calloc; -using ::vec_free; -using ::vec_malloc; -using ::vec_realloc; -#endif -#endif -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using ::errno_t; -using ::rsize_t; -using ::getenv_s; -using ::bsearch_s; -using ::qsort_s; -#if _MSL_WIDE_CHAR -using ::wctomb_s; -#endif -#endif -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_string.h b/tools/cw/include/MSL_C/msl_cpp_std_string.h deleted file mode 100644 index de56724abe..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_string.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _MSL_CPP_STD_STRING_H -#define _MSL_CPP_STD_STRING_H - -#ifdef __cplusplus - -namespace std { -using ::size_t; -using ::memchr; -using ::memcmp; -using ::memcpy; -using ::memmove; -using ::memset; -using ::strcat; -using ::strchr; -using ::strcmp; -using ::strcoll; -using ::strcpy; -using ::strcspn; -using ::strerror; -using ::strlen; -using ::strncat; -using ::strncmp; -using ::strncpy; -using ::strpbrk; -using ::strrchr; -using ::strspn; -using ::strstr; -using ::strtok; -using ::strxfrm; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using ::errno_t; -using ::rsize_t; -using ::memcpy_s; -using ::memmove_s; -using ::strnlen_s; -using ::strcpy_s; -using ::strncpy_s; -using ::strcat_s; -using ::strncat_s; -using ::strerror_s; -using ::strtok_s; -#endif -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_time.h b/tools/cw/include/MSL_C/msl_cpp_std_time.h deleted file mode 100644 index e5074b75a3..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_time.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _MSL_CPP_STD_TIME_H -#define _MSL_CPP_STD_TIME_H - -#ifdef __cplusplus - -namespace std { -using ::size_t; - -#if _MSL_CLOCK_T_AVAILABLE -using ::clock_t; -#endif - -#if _MSL_TIME_T_AVAILABLE -using ::time_t; -#endif - -#if _MSL_FLOATING_POINT -using ::difftime; -#endif - -#if _MSL_OS_TIME_SUPPORT -using ::tm; -using ::clock; -using ::gmtime; -using ::time; -using ::asctime; -using ::ctime; -using ::localtime; -using ::mktime; -using ::strftime; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using ::errno_t; -using ::rsize_t; -using ::asctime_s; -using ::ctime_s; -using ::gmtime_s; -using ::localtime_s; -#endif - -#endif -} - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_wchar.h b/tools/cw/include/MSL_C/msl_cpp_std_wchar.h deleted file mode 100644 index a08db7a2a6..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_wchar.h +++ /dev/null @@ -1,101 +0,0 @@ -#ifndef _MSL_CPP_STD_WCHAR_H -#define _MSL_CPP_STD_WCHAR_H - -#ifdef __cplusplus - -#if _MSL_OS_X_VERSION > 2 - -namespace std { -#if _MSL_WIDE_CHAR -using ::mbstate_t; -using ::wint_t; -using ::size_t; -using ::btowc; -using ::fgetwc; -using ::fgetws; -using ::fputwc; -using ::fputws; -using ::fwide; -using ::fwprintf; -using ::fwscanf; -using ::getwc; -using ::getwchar; -using ::mbrlen; -using ::mbrtowc; -using ::mbsinit; -using ::mbsrtowcs; -using ::putwc; -using ::putwchar; -using ::swprintf; -using ::swscanf; -using ::ungetwc; -using ::vfwprintf; -using ::vswprintf; -using ::vwprintf; -using ::wcrtomb; -using ::wcscat; -using ::wcschr; -using ::wcscmp; -using ::wcscoll; -using ::wcscpy; -using ::wcscspn; -#if _MSL_OS_TIME_SUPPORT -using ::wcsftime; -#endif -using ::wcslen; -using ::wcsncat; -using ::wcsncmp; -using ::wcsncpy; -using ::wcspbrk; -using ::wcsrchr; -using ::wcsrtombs; -using ::wcsspn; -using ::wcsstr; -using ::wcstod; -#if _MSL_C99 -using ::wcstof; -using ::wcstold; -#endif -using ::wcstok; -using ::wcstol; -#if _MSL_C99 -#if _MSL_LONGLONG -using ::wcstoll; -using ::wcstoull; -#endif -#endif -using ::wcstoul; -using ::wcsxfrm; -using ::wctob; -using ::wmemchr; -using ::wmemcmp; -using ::wmemcpy; -using ::wmemmove; -using ::wmemset; -using ::wprintf; -using ::wscanf; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using ::errno_t; -using ::rsize_t; -using ::wmemcpy_s; -using ::wmemmove_s; -using ::fwscanf_s; -using ::wscanf_s; -using ::swscanf_s; -using ::vswscanf_s; -using ::vfwscanf_s; -using ::vwscanf_s; -using ::wcsnlen_s; -using ::wcscpy_s; -using ::wcsncpy_s; -using ::wcscat_s; -using ::wcsncat_s; -#endif -#endif -} - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_cpp_std_wctype.h b/tools/cw/include/MSL_C/msl_cpp_std_wctype.h deleted file mode 100644 index 85aeac5809..0000000000 --- a/tools/cw/include/MSL_C/msl_cpp_std_wctype.h +++ /dev/null @@ -1,40 +0,0 @@ -#ifndef _MSL_CPP_STD_WCTYPE_H -#define _MSL_CPP_STD_WCTYPE_H - -#ifdef __cplusplus - -#if _MSL_OS_X_VERSION > 2 - -namespace std { -#if _MSL_WIDE_CHAR -using ::wctrans_t; -using ::wctype_t; -using ::wint_t; -using ::iswalnum; -using ::iswalpha; -#if _MSL_C99 -using ::iswblank; -#endif -using ::iswcntrl; -using ::iswctype; -using ::iswdigit; -using ::iswgraph; -using ::iswlower; -using ::iswprint; -using ::iswpunct; -using ::iswspace; -using ::iswupper; -using ::iswxdigit; -using ::towctrans; -using ::towlower; -using ::towupper; -using ::wctrans; -using ::wctype; -#endif -} - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_rsize_t.h b/tools/cw/include/MSL_C/msl_rsize_t.h deleted file mode 100644 index e9c2a0646d..0000000000 --- a/tools/cw/include/MSL_C/msl_rsize_t.h +++ /dev/null @@ -1,25 +0,0 @@ -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ - -#ifndef _MSL_RSIZE_T_H -#define _MSL_RSIZE_T_H - -#include - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #ifndef _MSL_RSIZE_T_TYPE - #define _MSL_RSIZE_T_TYPE size_t - #endif - - #ifndef _MSL_RSIZE_T_DEFINED - #define _MSL_RSIZE_T_DEFINED -typedef _MSL_RSIZE_T_TYPE rsize_t; - #endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_secure.h b/tools/cw/include/MSL_C/msl_secure.h deleted file mode 100644 index 109ea80f8f..0000000000 --- a/tools/cw/include/MSL_C/msl_secure.h +++ /dev/null @@ -1,12 +0,0 @@ -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ - - #ifndef __STDC_SECURE_LIB__ - #define __STDC_SECURE_LIB__ 200411L - #endif - - #ifndef _MSL_ERRNO_T - #define _MSL_ERRNO_T -typedef int errno_t; - #endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_secure_error.h b/tools/cw/include/MSL_C/msl_secure_error.h deleted file mode 100644 index 46ae33febf..0000000000 --- a/tools/cw/include/MSL_C/msl_secure_error.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MSL_SECURE_ERROR_H -#define _MSL_SECURE_ERROR_H - -#include - -_MSL_BEGIN_EXTERN_C - -typedef void (* __msl_secure_user_fn_ptr)(void); - -void _MSL_CDECL __msl_undefined_behavior_s(void) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C void _MSL_CDECL __msl_set_secure_undefined(__msl_secure_user_fn_ptr) _MSL_CANT_THROW; -_MSL_IMP_EXP_C __msl_secure_user_fn_ptr _MSL_CDECL __msl_get_secure_undefined(void) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/msl_t.h b/tools/cw/include/MSL_C/msl_t.h deleted file mode 100644 index 31e109f71a..0000000000 --- a/tools/cw/include/MSL_C/msl_t.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _MSL_T_H -#define _MSL_T_H - -#ifdef _INT32 - #undef _INT32 -#endif - -#ifdef _UINT32 - #undef _UINT32 -#endif - -#ifndef _MSL_INT32_TYPE - #define _MSL_INT32_TYPE int -#endif - -typedef _MSL_INT32_TYPE _INT32; -typedef unsigned _MSL_INT32_TYPE _UINT32; - -#if _MSL_LONGLONG - #ifdef _INT64 - #undef _INT64 - #endif - - #ifdef _UINT64 - #undef _UINT64 - #endif - - #ifndef _MSL_INT64_TYPE - #define _MSL_INT64_TYPE long long - #endif - -typedef _MSL_INT64_TYPE _INT64; -typedef unsigned _MSL_INT64_TYPE _UINT64; -#endif - -#endif diff --git a/tools/cw/include/MSL_C/msl_thread_local_data.h b/tools/cw/include/MSL_C/msl_thread_local_data.h deleted file mode 100644 index 3dddab60a4..0000000000 --- a/tools/cw/include/MSL_C/msl_thread_local_data.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _MSL_THREAD_LOCAL_DATA_H -#define _MSL_THREAD_LOCAL_DATA_H - -#include - -#if _MSL_THREADSAFE && _MSL_LOCALDATA_AVAILABLE - #if _MSL_PTHREADS - #include - #endif -#endif - -#endif diff --git a/tools/cw/include/MSL_C/nitro.mch b/tools/cw/include/MSL_C/nitro.mch deleted file mode 100644 index de48eb22a0..0000000000 Binary files a/tools/cw/include/MSL_C/nitro.mch and /dev/null differ diff --git a/tools/cw/include/MSL_C/null.h b/tools/cw/include/MSL_C/null.h deleted file mode 100644 index 71b1255a9c..0000000000 --- a/tools/cw/include/MSL_C/null.h +++ /dev/null @@ -1,3 +0,0 @@ -#ifndef NULL - #define NULL 0L -#endif diff --git a/tools/cw/include/MSL_C/os_enum.h b/tools/cw/include/MSL_C/os_enum.h deleted file mode 100644 index 81a05b6d94..0000000000 --- a/tools/cw/include/MSL_C/os_enum.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _MSL_OS_ENUM_H -#define _MSL_OS_ENUM_H - -#define __undef_os 0 -#define __mac_os 1 -#define __win32_os 3 -#define __wince_os 5 -#define __ppc_eabi 6 -#define __nec_eabi_bare 7 -#define __nec_eabi_os 8 -#define __mips_bare 9 -#define __m56800_os 10 -#define __n64_os 11 -#define __mcore_bare 12 -#define __emb_68k 13 -#define __m56300_os 14 -#define __sh_bare 15 -#define __m56800E_os 16 -#define __mac_os_x 17 -#define __dolphin_os 18 -#define __palm_os 19 -#define __arm_bare 20 -#define __starcore_bare 21 - -#endif diff --git a/tools/cw/include/MSL_C/pool_alloc.h b/tools/cw/include/MSL_C/pool_alloc.h deleted file mode 100644 index 0d74504d76..0000000000 --- a/tools/cw/include/MSL_C/pool_alloc.h +++ /dev/null @@ -1,137 +0,0 @@ -#include - -#if !(defined(_MSL_CLASSIC_MALLOC) || defined(_MSL_PRO4_MALLOC)) - - #ifndef _MSL_POOL_ALLOC_H - #define _MSL_POOL_ALLOC_H - - #include - #include - - #pragma options align=native - - #define __heap_version 2 - -_MSL_BEGIN_EXTERN_C - -void * _MSL_CDECL __sys_alloc(__std(size_t)); -void _MSL_CDECL __sys_free(void *); - -__std(size_t) _MSL_CDECL __sys_pointer_size(void * ptr); - -typedef struct __mem_pool { - void * reserved[14]; -} __mem_pool; - -_MSL_IMP_EXP_C void _MSL_CDECL __init_pool_obj(__mem_pool * pool_obj) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL __pool_alloc(__mem_pool * pool_obj, __std(size_t) size) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL __pool_free(__mem_pool * pool_obj, void * ptr) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL __pool_realloc(__mem_pool * pool_obj, void * ptr, __std(size_t) size) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void * _MSL_CDECL __pool_alloc_clear(__mem_pool * pool_obj, __std(size_t) size) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL __pool_free_all(__mem_pool * pool) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL __malloc_free_all(void) _MSL_CANT_THROW; - - #if !_MSL_OS_ALLOC_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL init_alloc(void *, __std(size_t) heap_size) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - - #pragma options align=reset - - #endif - -#else - - #ifndef _MSL_POOL_ALLOC_H - #define _MSL_POOL_ALLOC_H - - #include - - #pragma options align=native - -typedef signed long tag_word; - -typedef struct block_header { - tag_word tag; - struct block_header * prev; - struct block_header * next; -} block_header; - -typedef struct list_header { - block_header * rover; - block_header header; -} list_header; - -typedef struct heap_header { - struct heap_header * prev; - struct heap_header * next; -} heap_header; - - #ifdef __MIPS__ -typedef unsigned int mem_size; - #else -typedef unsigned long mem_size; - #endif - -struct mem_pool_obj; -typedef void * (* sys_alloc_ptr)(mem_size, struct mem_pool_obj *); -typedef void (* sys_free_ptr)(void *, struct mem_pool_obj *); - -typedef struct pool_options { - sys_alloc_ptr sys_alloc_func; - sys_free_ptr sys_free_func; - mem_size min_heap_size; - #ifndef __ALTIVEC__ - int always_search_first; - #else - char always_search_first; - char block_alignment; - char reserved1; - char reserved2; - #endif -} pool_options; - -typedef struct mem_pool_obj { - list_header free_list; - #if _MSL_OS_ALLOC_SUPPORT - pool_options options; - heap_header * heap_list; - void * userData; - #endif -} mem_pool_obj; - - #define __heap_version 1 - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C extern mem_pool_obj __malloc_pool; - - #ifdef __ALTIVEC__ -void _MSL_CDECL __init_align_pool_obj(mem_pool_obj * pool_obj, char align) _MSL_CANT_THROW; - #endif - -void _MSL_CDECL __init_pool_obj(mem_pool_obj * pool_obj) _MSL_CANT_THROW; -int _MSL_CDECL __pool_preallocate(mem_pool_obj * pool_obj, mem_size) _MSL_CANT_THROW; -void _MSL_CDECL __pool_preassign(mem_pool_obj * pool_obj, void *, mem_size) _MSL_CANT_THROW; -void * _MSL_CDECL __pool_alloc(mem_pool_obj * pool_obj, mem_size) _MSL_CANT_THROW; -void * _MSL_CDECL __pool_alloc_clear(mem_pool_obj * pool_obj, mem_size) _MSL_CANT_THROW; -void * _MSL_CDECL __pool_realloc(mem_pool_obj * pool_obj, void *, mem_size) _MSL_CANT_THROW; -void _MSL_CDECL __pool_free(mem_pool_obj * pool_obj, void *) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C void _MSL_CDECL __pool_free_all(mem_pool_obj * pool_obj) _MSL_CANT_THROW; - -void * _MSL_CDECL __sys_alloc(mem_size, mem_pool_obj *) _MSL_CANT_THROW; -void _MSL_CDECL __sys_free(void *, mem_pool_obj *) _MSL_CANT_THROW; - - #if !_MSL_OS_ALLOC_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL init_alloc(void *, mem_size) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - - #pragma options align=reset - - #endif - -#endif diff --git a/tools/cw/include/MSL_C/setjmp.ARM.h b/tools/cw/include/MSL_C/setjmp.ARM.h deleted file mode 100644 index d7188c476b..0000000000 --- a/tools/cw/include/MSL_C/setjmp.ARM.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _MSL_SETJMP_ARM_H -#define _MSL_SETJMP_ARM_H - -#define _MSL_SETJMP_LONGJMP_DEFINED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -typedef unsigned long jmp_buf[16]; - -_MSL_IMP_EXP_C void longjmp(jmp_buf env, int val); - #define setjmp(jmp_buf) __std(__setjmp(jmp_buf)) -_MSL_IMP_EXP_C int __setjmp(jmp_buf env); - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/setjmp.h b/tools/cw/include/MSL_C/setjmp.h deleted file mode 100644 index a17992b4cc..0000000000 --- a/tools/cw/include/MSL_C/setjmp.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _MSL_SETJMP_H -#define _MSL_SETJMP_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::jmp_buf; -using std::longjmp; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/signal.h b/tools/cw/include/MSL_C/signal.h deleted file mode 100644 index 0ee4acc26f..0000000000 --- a/tools/cw/include/MSL_C/signal.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _MSL_SIGNAL_H -#define _MSL_SIGNAL_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::sig_atomic_t; -using std::raise; -using std::signal; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/size_t.h b/tools/cw/include/MSL_C/size_t.h deleted file mode 100644 index a4bf9b7303..0000000000 --- a/tools/cw/include/MSL_C/size_t.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _MSL_SIZE_T_H -#define _MSL_SIZE_T_H - -#include - -#ifndef RC_INVOKED - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #ifndef _MSL_SIZE_T_TYPE - #define _MSL_SIZE_T_TYPE __typeof__(sizeof(0)) - #endif - - #ifndef _MSL_SIZE_T_DEFINED - #define _MSL_SIZE_T_DEFINED -typedef _MSL_SIZE_T_TYPE size_t; - #endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stdarg.ARM.h b/tools/cw/include/MSL_C/stdarg.ARM.h deleted file mode 100644 index dec6707fbd..0000000000 --- a/tools/cw/include/MSL_C/stdarg.ARM.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _MSL_STDARG_ARM_H -#define _MSL_STDARG_ARM_H - -_MSL_BEGIN_EXTERN_C - - #define __fourbytealign(n) ((((unsigned long)(n)) + 3U) & ~3U) - #define __va_start(parm) ((__std(va_list)) ((char *)((unsigned long)(&parm) & ~3U) + __fourbytealign(sizeof(parm)))) - - #define va_start(ap, parm) ((ap) = __va_start(parm)) - #define va_arg(ap, type) (*(type *)((ap += __fourbytealign(sizeof(type))) - __fourbytealign(sizeof(type)))) - #define va_end(ap) ((void)0) -#if _MSL_C99 - #define va_copy(dest, src) dest = src -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/stdarg.h b/tools/cw/include/MSL_C/stdarg.h deleted file mode 100644 index 357c8899f8..0000000000 --- a/tools/cw/include/MSL_C/stdarg.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _MSL_STDARG_H -#define _MSL_STDARG_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::va_list; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stdbool.h b/tools/cw/include/MSL_C/stdbool.h deleted file mode 100644 index 64825003b8..0000000000 --- a/tools/cw/include/MSL_C/stdbool.h +++ /dev/null @@ -1,56 +0,0 @@ -#ifndef _MSL_STDBOOL_H -#define _MSL_STDBOOL_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#ifndef __cplusplus - -#if !_MSL_C99 - #warning "MSL support for C99 is not enabled" -#else - #ifdef __MWERKS__ - #if !__option(c99) - #pragma c99 on - - #pragma ANSI_strict off - #warning "Compiler support for C99 has been turned on" - #pragma ANSI_strict reset - #endif - #endif - - #define bool _Bool - #define true 1 - #define false 0 - #define __bool_true_false_are_defined 1 -#endif - -#else - -#ifdef __MWERKS__ - #if !__option(bool) - - #ifndef bool - #ifndef _MSL_BOOL_TYPE - #define _MSL_BOOL_TYPE unsigned char - #endif - -typedef _MSL_BOOL_TYPE bool; - #endif - #ifndef true - #define false static_cast(0) - #define true static_cast(1) - #define __bool_true_false_are_defined 1 - #endif - - #endif -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stddef.h b/tools/cw/include/MSL_C/stddef.h deleted file mode 100644 index c6ec52c246..0000000000 --- a/tools/cw/include/MSL_C/stddef.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _MSL_STDDEF_H -#define _MSL_STDDEF_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::ptrdiff_t; -using std::size_t; -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stdint.h b/tools/cw/include/MSL_C/stdint.h deleted file mode 100644 index 558e61c0d3..0000000000 --- a/tools/cw/include/MSL_C/stdint.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _MSL_STDINT_H -#define _MSL_STDINT_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if _MSL_C99 -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::int8_t; -using std::int16_t; -using std::int32_t; -using std::uint8_t; -using std::uint16_t; -using std::uint32_t; -using std::int_least8_t; -using std::int_least16_t; -using std::int_least32_t; -using std::uint_least8_t; -using std::uint_least16_t; -using std::uint_least32_t; -using std::int_fast8_t; -using std::int_fast16_t; -using std::int_fast32_t; -using std::uint_fast8_t; -using std::uint_fast16_t; -using std::uint_fast32_t; -#if _MSL_LONGLONG -using std::int64_t; -using std::uint64_t; -using std::int_least64_t; -using std::uint_least64_t; -using std::int_fast64_t; -using std::uint_fast64_t; -#endif -using std::intptr_t; -using std::uintptr_t; -using std::intmax_t; -using std::uintmax_t; -#endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stdio.h b/tools/cw/include/MSL_C/stdio.h deleted file mode 100644 index 0fd9ffebeb..0000000000 --- a/tools/cw/include/MSL_C/stdio.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef _MSL_STDIO_H -#define _MSL_STDIO_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::FILE; -using std::fpos_t; -using std::size_t; -using std::clearerr; -using std::fclose; -using std::feof; -using std::ferror; -using std::fflush; -using std::fgetc; -using std::fgetpos; -using std::fgets; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::fopen; -using std::fprintf; -#endif -using std::fputc; -using std::fputs; -using std::fread; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::freopen; -#endif -using std::fscanf; -using std::fseek; -using std::fsetpos; -using std::ftell; -using std::fwrite; -using std::getc; -using std::getchar; -using std::gets; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::perror; -#endif -using std::printf; -using std::putc; -using std::putchar; -using std::puts; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::remove; -using std::rename; -#endif -using std::rewind; -using std::scanf; -using std::setbuf; -using std::setvbuf; -using std::sprintf; -using std::snprintf; -using std::sscanf; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::tmpfile; -using std::tmpnam; -#endif -using std::ungetc; -using std::vfprintf; -using std::vprintf; -using std::vsprintf; -using std::vfscanf; -using std::vscanf; -using std::vsscanf; -using std::vsnprintf; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using std::errno_t; -using std::rsize_t; -using std::fscanf_s; -using std::scanf_s; -using std::sscanf_s; -using std::vfscanf_s; -using std::vsscanf_s; -using std::gets_s; -#if _MSL_OS_DISK_FILE_SUPPORT -using std::fopen_s; -using std::freopen_s; -using std::tmpfile_s; -using std::tmpnam_s; -#endif -#endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/stdio.posix.h b/tools/cw/include/MSL_C/stdio.posix.h deleted file mode 100644 index a9108aecf4..0000000000 --- a/tools/cw/include/MSL_C/stdio.posix.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _MSL_STDIO_POSIX_H -#define _MSL_STDIO_POSIX_H - -#include -#include -#include -#include -#include -#include - -_MSL_BEGIN_EXTERN_C - -#if _MSL_OS_DISK_FILE_SUPPORT - -_MSL_IMP_EXP_C int _MSL_CDECL fileno(__std(FILE) *) _MSL_CANT_THROW; - -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/stdio_api.h b/tools/cw/include/MSL_C/stdio_api.h deleted file mode 100644 index 078be9b50c..0000000000 --- a/tools/cw/include/MSL_C/stdio_api.h +++ /dev/null @@ -1,116 +0,0 @@ -#ifndef _MSL_STDIO_API_H -#define _MSL_STDIO_API_H - -#include -#include -#include -#include - -#if _MSL_WIDE_CHAR - #include -#endif - -#include - -#pragma options align=native - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C size_t _MSL_CDECL __fread(void *, size_t, size_t, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL __fwrite(const void *, size_t, size_t, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C fpos_t _MSL_CDECL _ftell(FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL _fseek(FILE *, fpos_t, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL __get_char(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL __put_char(int, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL __fwide(FILE *, int) _MSL_CANT_THROW; - -int _MSL_CDECL __ungetc(int, FILE *) _MSL_CANT_THROW; - -#if _MSL_WIDE_CHAR -wchar_t _MSL_CDECL __getwc(FILE *) _MSL_CANT_THROW; -wchar_t _MSL_CDECL __fgetwc(FILE *) _MSL_CANT_THROW; -wchar_t _MSL_CDECL __getwchar(void) _MSL_CANT_THROW; -wchar_t _MSL_CDECL __ungetwc(wchar_t, FILE *) _MSL_CANT_THROW; -#endif - -#if _MSL_WIDE_CHAR - #define __getc(_file) \ - ((__fwide(_file, -1) >= 0) ? EOF : (_file)->buffer_len-- ? (int)*(_file)->buffer_ptr++ : __std(__get_char)(_file)) - #define __putc(_c, _file) \ - ((__fwide(_file, -1) >= 0) ? EOF : (_file)->buffer_len-- ? (int)(*(_file)->buffer_ptr++ = (unsigned char)(_c)) : __std(__put_char)(_c, _file)) -#else - #define __getc(_file) \ - ((_file)->buffer_len-- ? (int)*(_file)->buffer_ptr++ : __std(__get_char)(_file)) - #define __putc(_c, _file) \ - ((_file)->buffer_len-- ? (int)(*(_file)->buffer_ptr++ = (unsigned char)(_c)) : __std(__put_char)(_c, _file)) -#endif - -typedef struct { - char * CharStr; - size_t MaxCharCount; - size_t CharsWritten; -} __OutStrCtrl; - -typedef struct { - char * NextChar; - int NullCharDetected; -} __InStrCtrl; - -void * _MSL_CDECL __FileWrite(void *, const char *, size_t) _MSL_CANT_THROW; -void * _MSL_CDECL __StringWrite(void *, const char *, size_t) _MSL_CANT_THROW; -int _MSL_CDECL __FileRead(void *, int, int) _MSL_CANT_THROW; -int _MSL_CDECL __StringRead(void *, int, int) _MSL_CANT_THROW; - -enum __ReadProcActions { - __GetAChar, - __UngetAChar, - __TestForError -}; - -#if _MSL_WIDE_CHAR -typedef struct { - wchar_t * wCharStr; - size_t MaxCharCount; - size_t CharsWritten; -} __wOutStrCtrl; - -typedef struct { - wchar_t * wNextChar; - int wNullCharDetected; -} __wInStrCtrl; - -enum __WReadProcActions { - __GetAwChar, - __UngetAwChar, - __TestForwcsError -}; - -void * _MSL_CDECL __wFileWrite(void *, const wchar_t *, size_t) _MSL_CANT_THROW; -void * _MSL_CDECL __wStringWrite(void *, const wchar_t *, size_t) _MSL_CANT_THROW; - -#if _MSL_C99 -wint_t __wFileRead(void *, wint_t, int) _MSL_CANT_THROW; -#endif -wint_t __wStringRead(void *, wint_t, int) _MSL_CANT_THROW; -#endif - -#if _MSL_OS_DISK_FILE_SUPPORT -_MSL_IMP_EXP_C FILE * _MSL_CDECL __handle_open(__file_handle handle, const char * mode) _MSL_CANT_THROW; -FILE * _MSL_CDECL __handle_reopen(__file_handle handle, const char * mode, FILE *) _MSL_CANT_THROW; -#endif - -void _MSL_CDECL __set_ref_con(FILE *, __ref_con ref_con) _MSL_CANT_THROW; -void _MSL_CDECL __set_idle_proc(FILE *, __idle_proc idle_proc) _MSL_CANT_THROW; - -#if _MSL_WFILEIO_AVAILABLE -_MSL_IMP_EXP_C FILE * _MSL_CDECL __whandle_open(__file_handle handle, const wchar_t * mode) _MSL_CANT_THROW; -FILE * _MSL_CDECL __whandle_reopen(__file_handle handle, const wchar_t * mode, FILE *) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/stdlib.h b/tools/cw/include/MSL_C/stdlib.h deleted file mode 100644 index 7cbef4d071..0000000000 --- a/tools/cw/include/MSL_C/stdlib.h +++ /dev/null @@ -1,93 +0,0 @@ -#ifndef _MSL_STDLIB_H -#define _MSL_STDLIB_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -using std::size_t; -using std::abort; -using std::atexit; -using std::exit; -#if _MSL_C99 -using std::_Exit; -#endif -using std::getenv; -using std::system; -using std::malloc; -using std::calloc; -using std::realloc; -using std::free; -using std::atol; -#if _MSL_LONGLONG -#if _MSL_C99 -using std::atoll; -#endif -#endif -#ifndef _MSL_NO_MATH_LIB -using std::atof; -using std::strtod; -using std::strtold; -#if _MSL_C99 -using std::strtof; -#endif -#endif -using std::atoi; -using std::strtol; -using std::strtoul; -#if _MSL_LONGLONG -#if _MSL_C99 -using std::strtoll; -using std::strtoull; -#endif -#endif -#if _MSL_WIDE_CHAR -using std::mblen; -using std::mbstowcs; -using std::mbtowc; -using std::wctomb; -using std::wcstombs; -#endif -using std::bsearch; -using std::qsort; -using std::div_t; -using std::ldiv_t; -using std::abs; -using std::div; -using std::labs; -#if _MSL_LONGLONG -#if _MSL_C99 -using std::llabs; -using std::lldiv_t; -using std::lldiv; -#endif -#endif -using std::ldiv; -using std::srand; -using std::rand; -#if __VEC__ -using std::vec_calloc; -using std::vec_free; -using std::vec_malloc; -using std::vec_realloc; -#endif -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using std::errno_t; -using std::rsize_t; -using std::getenv_s; -using std::bsearch_s; -using std::qsort_s; -#if _MSL_WIDE_CHAR -using std::wctomb_s; -#endif -#endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/string.h b/tools/cw/include/MSL_C/string.h deleted file mode 100644 index 7c4f67398d..0000000000 --- a/tools/cw/include/MSL_C/string.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef MSL_STRING_H_ -#define MSL_STRING_H_ - -#include -#include -#include - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -void * memset(void * data, int value, size_t size); -void * memmove(void * dest, const void * src, size_t size); -void * memcpy(void * dest, const void * src, size_t size); -void * memchr(const void * arr, int value, size_t size); -int memcmp(const void * a, const void * b, size_t size); -char * strcpy(char * dest, const char * src); -size_t strlen(const char * str); -char * strncpy(char * dest, const char * src, size_t n); -int strcmp(const char * a, const char * b); -char * strcat(char * dest, const char * src); -char * strncat(char * dest, const char * src, size_t n); -size_t strspn(const char * a, const char * b); -char * strtok(char * str, const char * sep); -char * strstr(const char * haystack, const char * needle); -char * strchr(const char *, int); - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_C/string_api.h b/tools/cw/include/MSL_C/string_api.h deleted file mode 100644 index 2f697a7be9..0000000000 --- a/tools/cw/include/MSL_C/string_api.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef _MSL_STRING_API_H -#define _MSL_STRING_API_H - -#define __max_errstr 40 - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -char * _MSL_CDECL __strerror(int, char *) _MSL_CANT_THROW; -void * _MSL_CDECL __memrchr(const void *, int, size_t) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/strtold.h b/tools/cw/include/MSL_C/strtold.h deleted file mode 100644 index 591c323a4c..0000000000 --- a/tools/cw/include/MSL_C/strtold.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MSL_STRTOLD_H -#define _MSL_STRTOLD_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -extern long double _MSL_CDECL __strtold(int max_width, - int(_MSL_CDECL * ReadProc)(void *, int, int), - void * ReadProcArg, - int * chars_scanned, - int * overflow) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/strtoul.h b/tools/cw/include/MSL_C/strtoul.h deleted file mode 100644 index e80a2e8617..0000000000 --- a/tools/cw/include/MSL_C/strtoul.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef _MSL_STRTOUL_H -#define _MSL_STRTOUL_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -extern unsigned long _MSL_CDECL __strtoul(int base, - int max_width, - int(_MSL_CDECL * ReadProc)(void *, int, int), - void * ReadProcArg, - int * chars_scanned, - int * negative, - int * overflow) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -extern unsigned long long _MSL_CDECL __strtoull(int base, int max_width, int(_MSL_CDECL * ReadProc)(void *, int, int), void * ReadProcArg, int * chars_scanned, int * negative, int * overflow) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/tgmath.h b/tools/cw/include/MSL_C/tgmath.h deleted file mode 100644 index b8f36117c4..0000000000 --- a/tools/cw/include/MSL_C/tgmath.h +++ /dev/null @@ -1,800 +0,0 @@ -#ifndef _MSL_TGMATH_H -#define _MSL_TGMATH_H - -#include - -#if _MSL_C99 - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #endif -#else - -#include - -#ifndef __cplusplus - #pragma cplusplus on - -double __promote(int); -double __promote(unsigned int); -double __promote(long); -double __promote(unsigned long); -double __promote(long long); -double __promote(unsigned long long); -float __promote(float); -double __promote(double); -long double __promote(long double); - -inline float __msl_acos (float x) { - return acosf(x); -} -inline double __msl_acos (double x) { - return acos(x); -} -inline long double __msl_acos (long double x) { - return acosl(x); -} - - #undef acos - #define acos(x) __msl_acos((__typeof__(__promote(x)))(x)) - -inline float __msl_acosh (float x) { - return acoshf(x); -} -inline double __msl_acosh (double x) { - return acosh(x); -} -inline long double __msl_acosh (long double x) { - return acoshl(x); -} - - #undef acosh - #define acosh(x) __msl_acosh((__typeof__(__promote(x)))(x)) - -inline float __msl_asin (float x) { - return asinf(x); -} -inline double __msl_asin (double x) { - return asin(x); -} -inline long double __msl_asin (long double x) { - return asinl(x); -} - - #undef asin - #define asin(x) __msl_asin((__typeof__(__promote(x)))(x)) - -inline float __msl_asinh (float x) { - return asinhf(x); -} -inline double __msl_asinh (double x) { - return asinh(x); -} -inline long double __msl_asinh (long double x) { - return asinhl(x); -} - - #undef asinh - #define asinh(x) __msl_asinh((__typeof__(__promote(x)))(x)) - -inline float __msl_atan (float x) { - return atanf(x); -} -inline double __msl_atan (double x) { - return atan(x); -} -inline long double __msl_atan (long double x) { - return atanl(x); -} - - #undef atan - #define atan(x) __msl_atan((__typeof__(__promote(x)))(x)) - -inline float __msl_atan2 (float x, float y) { - return atan2f(x, y); -} -inline double __msl_atan2 (double x, double y) { - return atan2(x, y); -} -inline long double __msl_atan2 (long double x, long double y) { - return atan2l(x, y); -} - - #undef atan2 - #define atan2(x, y) __msl_atan2( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_atanh (float x) { - return atanhf(x); -} -inline double __msl_atanh (double x) { - return atanh(x); -} -inline long double __msl_atanh (long double x) { - return atanhl(x); -} - - #undef atanh - #define atanh(x) __msl_atanh((__typeof__(__promote(x)))(x)) - -inline float __msl_cbrt (float x) { - return cbrtf(x); -} -inline double __msl_cbrt (double x) { - return cbrt(x); -} -inline long double __msl_cbrt (long double x) { - return cbrtl(x); -} - - #undef cbrt - #define cbrt(x) __msl_cbrt((__typeof__(__promote(x)))(x)) - -inline float __msl_ceil (float x) { - return ceilf(x); -} -inline double __msl_ceil (double x) { - return ceil(x); -} -inline long double __msl_ceil (long double x) { - return ceill(x); -} - - #undef ceil - #define ceil(x) __msl_ceil((__typeof__(__promote(x)))(x)) - -inline float __msl_copysign (float x, float y) { - return copysignf(x, y); -} -inline double __msl_copysign (double x, double y) { - return copysign(x, y); -} -inline long double __msl_copysign (long double x, long double y) { - return copysignl(x, y); -} - - #undef copysign - #define copysign(x, y) __msl_copysign( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_cos (float x) { - return cosf(x); -} -inline double __msl_cos (double x) { - return cos(x); -} -inline long double __msl_cos (long double x) { - return cosl(x); -} - - #undef cos - #define cos(x) __msl_cos((__typeof__(__promote(x)))(x)) - -inline float __msl_cosh (float x) { - return coshf(x); -} -inline double __msl_cosh (double x) { - return cosh(x); -} -inline long double __msl_cosh (long double x) { - return coshl(x); -} - - #undef cosh - #define cosh(x) __msl_cosh((__typeof__(__promote(x)))(x)) - - #if !__INTEL__ -inline float __msl_erf (float x) { - return erff(x); -} -inline double __msl_erf (double x) { - return erf(x); -} -inline long double __msl_erf (long double x) { - return erfl(x); -} - - #undef erf - #define erf(x) __msl_erf((__typeof__(__promote(x)))(x)) - #endif - - #if !__INTEL__ -inline float __msl_erfc (float x) { - return erfcf(x); -} -inline double __msl_erfc (double x) { - return erfc(x); -} -inline long double __msl_erfc (long double x) { - return erfcl(x); -} - - #undef erfc - #define erfc(x) __msl_erfc((__typeof__(__promote(x)))(x)) - #endif - -inline float __msl_exp (float x) { - return expf(x); -} -inline double __msl_exp (double x) { - return exp(x); -} -inline long double __msl_exp (long double x) { - return expl(x); -} - - #undef exp - #define exp(x) __msl_exp((__typeof__(__promote(x)))(x)) - -inline float __msl_exp2 (float x) { - return exp2f(x); -} -inline double __msl_exp2 (double x) { - return exp2(x); -} -inline long double __msl_exp2 (long double x) { - return exp2l(x); -} - - #undef exp2 - #define exp2(x) __msl_exp2((__typeof__(__promote(x)))(x)) - -inline float __msl_expm1 (float x) { - return expm1f(x); -} -inline double __msl_expm1 (double x) { - return expm1(x); -} -inline long double __msl_expm1 (long double x) { - return expm1l(x); -} - - #undef expm1 - #define expm1(x) __msl_expm1((__typeof__(__promote(x)))(x)) - -inline float __msl_fabs (float x) { - return fabsf(x); -} -inline double __msl_fabs (double x) { - return fabs(x); -} -inline long double __msl_fabs (long double x) { - return fabsl(x); -} - - #undef fabs - #define fabs(x) __msl_fabs((__typeof__(__promote(x)))(x)) - -inline float __msl_fdim (float x, float y) { - return fdimf(x, y); -} -inline double __msl_fdim (double x, double y) { - return fdim(x, y); -} -inline long double __msl_fdim (long double x, long double y) { - return fdiml(x, y); -} - - #undef fdim - #define fdim(x, y) __msl_fdim( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_floor (float x) { - return floorf(x); -} -inline double __msl_floor (double x) { - return floor(x); -} -inline long double __msl_floor (long double x) { - return floorl(x); -} - - #undef floor - #define floor(x) __msl_floor((__typeof__(__promote(x)))(x)) - -inline float __msl_fma (float x, float y, float z) { - return fmaf(x, y, z); -} -inline double __msl_fma (double x, double y, double z) { - return fma(x, y, z); -} -inline long double __msl_fma (long double x, long double y, long double z) { - return fmal(x, y, z); -} - - #undef fma - #define fma(x, y, z) __msl_fma( \ - (__typeof__(__promote(x) + __promote(y) + __promote(z)))(x), \ - (__typeof__(__promote(x) + __promote(y) + __promote(z)))(y), \ - (__typeof__(__promote(x) + __promote(y) + __promote(z)))(z) \ -) - -inline float __msl_fmax (float x, float y) { - return fmaxf(x, y); -} -inline double __msl_fmax (double x, double y) { - return fmax(x, y); -} -inline long double __msl_fmax (long double x, long double y) { - return fmaxl(x, y); -} - - #undef fmax - #define fmax(x, y) __msl_fmax( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_fmin (float x, float y) { - return fminf(x, y); -} -inline double __msl_fmin (double x, double y) { - return fmin(x, y); -} -inline long double __msl_fmin (long double x, long double y) { - return fminl(x, y); -} - - #undef fmin - #define fmin(x, y) __msl_fmin( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_fmod (float x, float y) { - return fmodf(x, y); -} -inline double __msl_fmod (double x, double y) { - return fmod(x, y); -} -inline long double __msl_fmod (long double x, long double y) { - return fmodl(x, y); -} - - #undef fmod - #define fmod(x, y) __msl_fmod( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_frexp (float x, int * y) { - return frexpf(x, y); -} -inline double __msl_frexp (double x, int * y) { - return frexp(x, y); -} -inline long double __msl_frexp (long double x, int * y) { - return frexpl(x, y); -} - - #undef frexp - #define frexp(x, y) __msl_frexp((__typeof__(__promote(x)))(x), (y)) - -inline float __msl_hypot (float x, float y) { - return hypotf(x, y); -} -inline double __msl_hypot (double x, double y) { - return hypot(x, y); -} -inline long double __msl_hypot (long double x, long double y) { - return hypotl(x, y); -} - - #undef hypot - #define hypot(x, y) __msl_hypot( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline int __msl_ilogb (float x) { - return ilogbf(x); -} -inline int __msl_ilogb (double x) { - return ilogb(x); -} -inline int __msl_ilogb (long double x) { - return ilogbl(x); -} - - #undef ilogb - #define ilogb(x) __msl_ilogb((__typeof__(__promote(x)))(x)) - -inline float __msl_ldexp (float x, int y) { - return ldexpf(x, y); -} -inline double __msl_ldexp (double x, int y) { - return ldexp(x, y); -} -inline long double __msl_ldexp (long double x, int y) { - return ldexpl(x, y); -} - - #undef ldexp - #define ldexp(x, y) __msl_ldexp((__typeof__(__promote(x)))(x), (y)) - - #if !__INTEL__ -inline float __msl_lgamma (float x) { - return lgammaf(x); -} -inline double __msl_lgamma (double x) { - return lgamma(x); -} -inline long double __msl_lgamma (long double x) { - return lgammal(x); -} - - #undef lgamma - #define lgamma(x) __msl_lgamma((__typeof__(__promote(x)))(x)) - #endif - - #if _MSL_LONGLONG -inline long long __msl_llrint (float x) { - return llrintf(x); -} -inline long long __msl_llrint (double x) { - return llrint(x); -} -inline long long __msl_llrint (long double x) { - return llrintl(x); -} - - #undef llrint - #define llrint(x) __msl_llrint((__typeof__(__promote(x)))(x)) - #endif - - #if _MSL_LONGLONG -inline long long __msl_llround (float x) { - return llroundf(x); -} -inline long long __msl_llround (double x) { - return llround(x); -} -inline long long __msl_llround (long double x) { - return llroundl(x); -} - - #undef llround - #define llround(x) __msl_llround((__typeof__(__promote(x)))(x)) - #endif - -inline float __msl_log (float x) { - return logf(x); -} -inline double __msl_log (double x) { - return log(x); -} -inline long double __msl_log (long double x) { - return logl(x); -} - - #undef log - #define log(x) __msl_log((__typeof__(__promote(x)))(x)) - -inline float __msl_log10 (float x) { - return log10f(x); -} -inline double __msl_log10 (double x) { - return log10(x); -} -inline long double __msl_log10 (long double x) { - return log10l(x); -} - - #undef log10 - #define log10(x) __msl_log10((__typeof__(__promote(x)))(x)) - -inline float __msl_log1p (float x) { - return log1pf(x); -} -inline double __msl_log1p (double x) { - return log1p(x); -} -inline long double __msl_log1p (long double x) { - return log1pl(x); -} - - #undef log1p - #define log1p(x) __msl_log1p((__typeof__(__promote(x)))(x)) - -inline float __msl_log2 (float x) { - return log2f(x); -} -inline double __msl_log2 (double x) { - return log2(x); -} -inline long double __msl_log2 (long double x) { - return log2l(x); -} - - #undef log2 - #define log2(x) __msl_log2((__typeof__(__promote(x)))(x)) - -inline float __msl_logb (float x) { - return logbf(x); -} -inline double __msl_logb (double x) { - return logb(x); -} -inline long double __msl_logb (long double x) { - return logbl(x); -} - - #undef logb - #define logb(x) __msl_logb((__typeof__(__promote(x)))(x)) - -inline long __msl_lrint (float x) { - return lrintf(x); -} -inline long __msl_lrint (double x) { - return lrint(x); -} -inline long __msl_lrint (long double x) { - return lrintl(x); -} - - #undef lrint - #define lrint(x) __msl_lrint((__typeof__(__promote(x)))(x)) - -inline long __msl_lround (float x) { - return lroundf(x); -} -inline long __msl_lround (double x) { - return lround(x); -} -inline long __msl_lround (long double x) { - return lroundl(x); -} - - #undef lround - #define lround(x) __msl_lround((__typeof__(__promote(x)))(x)) - -inline float __msl_nearbyint (float x) { - return nearbyintf(x); -} -inline double __msl_nearbyint (double x) { - return nearbyint(x); -} -inline long double __msl_nearbyint (long double x) { - return nearbyintl(x); -} - - #undef nearbyint - #define nearbyint(x) __msl_nearbyint((__typeof__(__promote(x)))(x)) - -inline float __msl_nextafter (float x, float y) { - return nextafterf(x, y); -} -inline double __msl_nextafter (double x, double y) { - return nextafter(x, y); -} -inline long double __msl_nextafter (long double x, long double y) { - return nextafterl(x, y); -} - - #undef nextafter - #define nextafter(x, y) __msl_nextafter( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_nexttoward (float x, long double y) { - return nexttowardf(x, y); -} -inline double __msl_nexttoward (double x, long double y) { - return nexttoward(x, y); -} -inline long double __msl_nexttoward (long double x, long double y) { - return nexttowardl(x, y); -} - - #undef nexttoward - #define nexttoward(x, y) __msl_nexttoward((__typeof__(__promote(x)))(x), (y)) - -inline float __msl_pow (float x, float y) { - return powf(x, y); -} -inline double __msl_pow (double x, double y) { - return pow(x, y); -} -inline long double __msl_pow (long double x, long double y) { - return powl(x, y); -} - - #undef pow - #define pow(x, y) __msl_pow( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) - -inline float __msl_remainder (float x, float y) { - return remainderf(x, y); -} -inline double __msl_remainder (double x, double y) { - return remainder(x, y); -} -inline long double __msl_remainder (long double x, long double y) { - return remainderl(x, y); -} - - #undef remainder - #define remainder(x, y) __msl_remainder( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y) \ -) -#if !_MSL_USES_SUN_MATH_LIB -inline float __msl_remquo (float x, float y, int * z) { - return remquof(x, y, z); -} -inline double __msl_remquo (double x, double y, int * z) { - return remquo(x, y, z); -} -inline long double __msl_remquo (long double x, long double y, int * z) { - return remquol(x, y, z); -} - - #undef remquo - #define remquo(x, y, z) __msl_remquo( \ - (__typeof__(__promote(x) + __promote(y)))(x), \ - (__typeof__(__promote(x) + __promote(y)))(y), (z) \ -) -#endif - -inline float __msl_rint (float x) { - return rintf(x); -} -inline double __msl_rint (double x) { - return rint(x); -} -inline long double __msl_rint (long double x) { - return rintl(x); -} - - #undef rint - #define rint(x) __msl_rint((__typeof__(__promote(x)))(x)) - -inline float __msl_round (float x) { - return roundf(x); -} -inline double __msl_round (double x) { - return round(x); -} -inline long double __msl_round (long double x) { - return roundl(x); -} - - #undef round - #define round(x) __msl_round((__typeof__(__promote(x)))(x)) - -inline float __msl_scalbln (float x, long int y) { - return scalblnf(x, y); -} -inline double __msl_scalbln (double x, long int y) { - return scalbln(x, y); -} -inline long double __msl_scalbln (long double x, long int y) { - return scalblnl(x, y); -} - - #undef scalbln - #define scalbln(x, y) __msl_scalbln((__typeof__(__promote(x)))(x), (y)) - -inline float __msl_scalbn (float x, int y) { - return scalbnf(x, y); -} -inline double __msl_scalbn (double x, int y) { - return scalbn(x, y); -} -inline long double __msl_scalbn (long double x, int y) { - return scalbnl(x, y); -} - - #undef scalbn - #define scalbn(x, y) __msl_scalbn((__typeof__(__promote(x)))(x), (y)) - -inline float __msl_sin (float x) { - return sinf(x); -} -inline double __msl_sin (double x) { - return sin(x); -} -inline long double __msl_sin (long double x) { - return sinl(x); -} - - #undef sin - #define sin(x) __msl_sin((__typeof__(__promote(x)))(x)) - -inline float __msl_sinh (float x) { - return sinhf(x); -} -inline double __msl_sinh (double x) { - return sinh(x); -} -inline long double __msl_sinh (long double x) { - return sinhl(x); -} - - #undef sinh - #define sinh(x) __msl_sinh((__typeof__(__promote(x)))(x)) - -inline float __msl_sqrt (float x) { - return sqrtf(x); -} -inline double __msl_sqrt (double x) { - return sqrt(x); -} -inline long double __msl_sqrt (long double x) { - return sqrtl(x); -} - - #undef sqrt - #define sqrt(x) __msl_sqrt((__typeof__(__promote(x)))(x)) - -inline float __msl_tan (float x) { - return tanf(x); -} -inline double __msl_tan (double x) { - return tan(x); -} -inline long double __msl_tan (long double x) { - return tanl(x); -} - - #undef tan - #define tan(x) __msl_tan((__typeof__(__promote(x)))(x)) - -inline float __msl_tanh (float x) { - return tanhf(x); -} -inline double __msl_tanh (double x) { - return tanh(x); -} -inline long double __msl_tanh (long double x) { - return tanhl(x); -} - - #undef tanh - #define tanh(x) __msl_tanh((__typeof__(__promote(x)))(x)) - -inline float __msl_tgamma (float x) { - return tgammaf(x); -} -inline double __msl_tgamma (double x) { - return tgamma(x); -} -inline long double __msl_tgamma (long double x) { - return tgammal(x); -} - - #undef tgamma - #define tgamma(x) __msl_tgamma((__typeof__(__promote(x)))(x)) - -inline float __msl_trunc (float x) { - return truncf(x); -} -inline double __msl_trunc (double x) { - return trunc(x); -} -inline long double __msl_trunc (long double x) { - return truncl(x); -} - - #undef trunc - #define trunc(x) __msl_trunc((__typeof__(__promote(x)))(x)) - - #pragma cplusplus reset - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/thread_local_data_pthreads.h b/tools/cw/include/MSL_C/thread_local_data_pthreads.h deleted file mode 100644 index 6136128201..0000000000 --- a/tools/cw/include/MSL_C/thread_local_data_pthreads.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef _MSL_THREAD_LOCAL_DATA_PTHREADS_H -#define _MSL_THREAD_LOCAL_DATA_PTHREADS_H - -#include -#include -#include -#include -#include -#include - -#pragma options align=native - -_MSL_BEGIN_EXTERN_C - -typedef struct _ThreadLocalData { - struct _ThreadLocalData * next; - int _errno; - unsigned long int random_next; - unsigned char * strtok_n; - unsigned char * strtok_s; - #if _MSL_OS_TIME_SUPPORT - struct __std(tm) gmtime_tm; - struct __std(tm) localtime_tm; - #endif - char asctime_result[26]; - char temp_name[L_tmpnam]; - char * locale_name; - struct __locale _current_locale; - #if !_MSL_C_LOCALE_ONLY - struct __std(lconv) __lconv; - #endif - -#if _MSL_WFILEIO_AVAILABLE - wchar_t wtemp_name[L_tmpnam]; -#endif -} _ThreadLocalData; - -_MSL_IMP_EXP_C int _MSL_CDECL __msl_InitializeMainThreadData(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void _MSL_CDECL __msl_DisposeAllThreadData(void) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C _ThreadLocalData * _MSL_CDECL __msl_GetThreadLocalData(void) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#pragma options align=reset - -#endif diff --git a/tools/cw/include/MSL_C/time.h b/tools/cw/include/MSL_C/time.h deleted file mode 100644 index 9ac901f8bc..0000000000 --- a/tools/cw/include/MSL_C/time.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef _MSL_TIME_H -#define _MSL_TIME_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) - -using std::size_t; - -#if _MSL_CLOCK_T_AVAILABLE -using std::clock_t; -#endif - -#if _MSL_TIME_T_AVAILABLE -using std::time_t; -#endif - -#if _MSL_FLOATING_POINT && _MSL_TIME_T_AVAILABLE -using std::difftime; -#endif - -#if _MSL_OS_TIME_SUPPORT -using std::tm; -using std::clock; -using std::gmtime; -using std::time; -using std::asctime; -using std::ctime; -using std::localtime; -using std::mktime; -using std::strftime; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using std::errno_t; -using std::rsize_t; -using std::asctime_s; -using std::ctime_s; -using std::gmtime_s; -using std::localtime_s; -#endif - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/time_api.h b/tools/cw/include/MSL_C/time_api.h deleted file mode 100644 index 524701c0da..0000000000 --- a/tools/cw/include/MSL_C/time_api.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _MSL_TIME_API_H -#define _MSL_TIME_API_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -#if _MSL_OS_TIME_SUPPORT - -extern const short __msl_month_to_days[2][13]; - -clock_t __get_clock(void) _MSL_CANT_THROW; -time_t __get_time(void) _MSL_CANT_THROW; -int __isdst(void) _MSL_CANT_THROW; -int __MSL_ISO8601Week(const struct tm *, int *) _MSL_CANT_THROW; -time_t __MSL_ISO8601NewYear(int) _MSL_CANT_THROW; -int __msl_leap_year(int) _MSL_CANT_THROW; -void __msl_asciitime(struct tm, char *) _MSL_CANT_THROW; -int __to_gm_time(time_t *) _MSL_CANT_THROW; -#if !_MSL_TIME_T_IS_LOCALTIME -int __to_local_time(time_t *) _MSL_CANT_THROW; -#endif -void __msl_clear_tm(struct tm *) _MSL_CANT_THROW; -int __msl_week_num(const struct tm *, int) _MSL_CANT_THROW; -void __msl_time2tm(time_t, struct tm *) _MSL_CANT_THROW; -char * __MSL_extract_name(char *, int) _MSL_CANT_THROW; - -#endif - -_MSL_END_EXTERN_C - -#endif diff --git a/tools/cw/include/MSL_C/va_list.h b/tools/cw/include/MSL_C/va_list.h deleted file mode 100644 index e99053d320..0000000000 --- a/tools/cw/include/MSL_C/va_list.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _MSL_VA_LIST_H -#define _MSL_VA_LIST_H - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - - #ifndef _MSL_VA_LIST_TYPE - #define _MSL_VA_LIST_TYPE char * - #endif - - #ifndef _MSL_VA_LIST_DEFINED -typedef _MSL_VA_LIST_TYPE va_list; - #define _MSL_VA_LIST_DEFINED - #endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wchar.h b/tools/cw/include/MSL_C/wchar.h deleted file mode 100644 index a2dbd2bee4..0000000000 --- a/tools/cw/include/MSL_C/wchar.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef _MSL_WCHAR_H -#define _MSL_WCHAR_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #endif -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -#if _MSL_WIDE_CHAR -using std::mbstate_t; -using std::wint_t; -using std::size_t; -using std::btowc; -using std::fgetwc; -using std::fgetws; -using std::fputwc; -using std::fputws; -using std::fwide; -using std::fwprintf; -using std::fwscanf; -using std::getwc; -using std::getwchar; -using std::mbrlen; -using std::mbrtowc; -using std::mbsinit; -using std::mbsrtowcs; -using std::putwc; -using std::putwchar; -using std::swprintf; -using std::swscanf; -using std::ungetwc; -using std::vfwprintf; -using std::vswprintf; -using std::vwprintf; -using std::wcrtomb; -using std::wcscat; -using std::wcschr; -using std::wcscmp; -using std::wcscoll; -using std::wcscpy; -using std::wcscspn; -#if _MSL_OS_TIME_SUPPORT -using std::wcsftime; -#endif -using std::wcslen; -using std::wcsncat; -using std::wcsncmp; -using std::wcsncpy; -using std::wcspbrk; -using std::wcsrchr; -using std::wcsrtombs; -using std::wcsspn; -using std::wcsstr; -using std::wcstod; -#if _MSL_C99 -using std::wcstof; -using std::wcstold; -#endif -using std::wcstok; -using std::wcstol; -#if _MSL_C99 -#if _MSL_LONGLONG -using std::wcstoll; -using std::wcstoull; -#endif -#endif -using std::wcstoul; -using std::wcsxfrm; -using std::wctob; -using std::wmemchr; -using std::wmemcmp; -using std::wmemcpy; -using std::wmemmove; -using std::wmemset; -using std::wprintf; -using std::wscanf; -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -using std::errno_t; -using std::rsize_t; -using std::wmemcpy_s; -using std::wmemmove_s; -using std::fwscanf_s; -using std::wscanf_s; -using std::swscanf_s; -using std::vswscanf_s; -using std::vfwscanf_s; -using std::vwscanf_s; -using std::wcsnlen_s; -using std::wcscpy_s; -using std::wcsncpy_s; -using std::wcscat_s; -using std::wcsncat_s; -#endif -#endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/wchar_io.h b/tools/cw/include/MSL_C/wchar_io.h deleted file mode 100644 index 16bd8b0f5b..0000000000 --- a/tools/cw/include/MSL_C/wchar_io.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _MSL_WCHAR_IO_H -#define _MSL_WCHAR_IO_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -wchar_t _MSL_CDECL __put_wchar(wchar_t, FILE *) _MSL_CANT_THROW; -wchar_t _MSL_CDECL __get_wchar(FILE *) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C wchar_t _MSL_CDECL(getwchar)(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL ungetwc(wchar_t, FILE *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wchar_t.h b/tools/cw/include/MSL_C/wchar_t.h deleted file mode 100644 index ab1b9dff21..0000000000 --- a/tools/cw/include/MSL_C/wchar_t.h +++ /dev/null @@ -1,69 +0,0 @@ -#ifndef _MSL_WCHAR_T_H -#define _MSL_WCHAR_T_H - -#include - -#ifndef _MSL_WCHAR_T_TYPE - #define _MSL_WCHAR_T_TYPE unsigned short -#endif - -#ifndef _MSL_WCHAR_MIN - #define _MSL_WCHAR_MIN 0 -#endif - -#ifndef _MSL_WCHAR_MAX - #define _MSL_WCHAR_MAX 0xffffU -#endif - -#ifdef __MWERKS__ - #if (!defined(__cplusplus) || !__option(wchar_type)) - #ifdef __cplusplus -extern "C" { - #endif - -typedef _MSL_WCHAR_T_TYPE wchar_t; - - #ifdef __cplusplus -} - #endif - #endif -#elif __GNUC__ - #ifdef __cplusplus -extern "C" { - #endif - -typedef _MSL_WCHAR_T_TYPE wchar_t; - - #ifdef __cplusplus -} - #endif -#endif - -#ifdef __cplusplus - #ifdef _MSL_USING_NAMESPACE -namespace std { - #endif -extern "C" { -#endif - -#ifndef WCHAR_MIN - #define WCHAR_MIN _MSL_WCHAR_MIN -#endif - -#ifndef WCHAR_MAX - #define WCHAR_MAX _MSL_WCHAR_MAX -#endif - -typedef wchar_t wint_t; -typedef wchar_t wctype_t; -typedef int mbstate_t; -typedef wchar_t Wint_t; - -#ifdef __cplusplus -} - #ifdef _MSL_USING_NAMESPACE -} - #endif -#endif - -#endif diff --git a/tools/cw/include/MSL_C/wcstold.h b/tools/cw/include/MSL_C/wcstold.h deleted file mode 100644 index ef021bfd15..0000000000 --- a/tools/cw/include/MSL_C/wcstold.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _MSL_WCSTOLD_H -#define _MSL_WCSTOLD_H - -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_EXTERN_C - -extern long double _MSL_CDECL __wcstold(int max_width, __std(wint_t) (*ReadProc)(void *, __std(wint_t), int), void * ReadProcArg, int * chars_scanned, int * overflow) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C double _MSL_CDECL wcstod(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C float _MSL_CDECL wcstof(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long double _MSL_CDECL wcstold(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wcstoul.h b/tools/cw/include/MSL_C/wcstoul.h deleted file mode 100644 index cd532020db..0000000000 --- a/tools/cw/include/MSL_C/wcstoul.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _MSL_WCSTOUL_H -#define _MSL_WCSTOUL_H - -#include - -#if _MSL_WIDE_CHAR - -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL watoi(const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long _MSL_CDECL watol(const wchar_t *) _MSL_CANT_THROW; - -extern unsigned long _MSL_CDECL __wcstoul(int base, int max_width, __std(wint_t) (*ReadProc)(void *, __std(wint_t), int), void * ReadProcArg, int * chars_scanned, int * negative, int * overflow) _MSL_CANT_THROW; - -#if _MSL_LONGLONG -extern unsigned long long _MSL_CDECL __wcstoull(int base, int max_width, __std(wint_t) (*ReadProc)(void *, __std(wint_t), int), void * ReadProcArg, int * chars_scanned, int * negative, int * overflow) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C unsigned long _MSL_CDECL wcstoul(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT, int) _MSL_CANT_THROW; - #if _MSL_C99 - #if _MSL_LONGLONG -_MSL_IMP_EXP_C unsigned long long _MSL_CDECL wcstoull(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C long long _MSL_CDECL wcstoll(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT, int) _MSL_CANT_THROW; - #endif - #endif -_MSL_IMP_EXP_C long _MSL_CDECL wcstol(const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT, int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif -#endif diff --git a/tools/cw/include/MSL_C/wctrans.h b/tools/cw/include/MSL_C/wctrans.h deleted file mode 100644 index 8acd5ee766..0000000000 --- a/tools/cw/include/MSL_C/wctrans.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _MSL_WCTRANS_H -#define _MSL_WCTRANS_H - -#include - -#if _MSL_WIDE_CHAR - -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wctype.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -typedef wchar_t wctrans_t; - -_MSL_IMP_EXP_C wint_t _MSL_CDECL towctrans(wint_t, wctrans_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wctrans_t _MSL_CDECL wctrans(const char *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/wctype.h b/tools/cw/include/MSL_C/wctype.h deleted file mode 100644 index ca85491dc9..0000000000 --- a/tools/cw/include/MSL_C/wctype.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _MSL_WCTYPE_H -#define _MSL_WCTYPE_H - -#include - -#if !_MSL_USING_MW_C_HEADERS - #if !__MACH__ - #error You must have the non-MSL C header file access path before the MSL access path - #endif -#else - -#include - -#if defined(__cplusplus) && defined(_MSL_USING_NAMESPACE) -#if _MSL_WIDE_CHAR -using std::wctrans_t; -using std::wctype_t; -using std::wint_t; -using std::iswalnum; -using std::iswalpha; - #if _MSL_C99 -using std::iswblank; - #endif -using std::iswcntrl; -using std::iswctype; -using std::iswdigit; -using std::iswgraph; -using std::iswlower; -using std::iswprint; -using std::iswpunct; -using std::iswspace; -using std::iswupper; -using std::iswxdigit; -using std::towctrans; -using std::towlower; -using std::towupper; -using std::wctrans; -using std::wctype; -#endif -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/wctype_api.h b/tools/cw/include/MSL_C/wctype_api.h deleted file mode 100644 index 68e4ea7bd9..0000000000 --- a/tools/cw/include/MSL_C/wctype_api.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef _MSL_WCTYPE_API_H -#define _MSL_WCTYPE_API_H - -#include - -#if _MSL_WIDE_CHAR - - #include - #include - #include - #include - -_MSL_BEGIN_EXTERN_C - - #if !_MSL_C_LOCALE_ONLY - #define __msl_wcmap_size 256 - #else - #define __msl_wcmap_size 128 - #endif - - #if !_MSL_C_LOCALE_ONLY -extern _MSL_IMP_EXP_C const unsigned short __msl_wctype_map[__msl_wcmap_size]; -extern _MSL_IMP_EXP_C const wchar_t __wlower_map[__msl_wcmap_size]; -extern _MSL_IMP_EXP_C const wchar_t __wupper_map[__msl_wcmap_size]; - #endif - -extern _MSL_IMP_EXP_C const unsigned short __wctype_mapC[__msl_wcmap_size]; -extern _MSL_IMP_EXP_C const wchar_t __wlower_mapC[__msl_wcmap_size]; -extern _MSL_IMP_EXP_C const wchar_t __wupper_mapC[__msl_wcmap_size]; - -_MSL_END_EXTERN_C - - #define __msl_walpha 0x0001 - #define __msl_wblank 0x0002 - #define __msl_wcntrl 0x0004 - #define __msl_wdigit 0x0008 - #define __msl_wgraph 0x0010 - #define __msl_wlower 0x0020 - #define __msl_wprint 0x0040 - #define __msl_wpunct 0x0080 - #define __msl_wspace 0x0100 - #define __msl_wupper 0x0200 - #define __msl_wxdigit 0x0400 - - #define __msl_walnum (__msl_walpha | __msl_wdigit) - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/weof.h b/tools/cw/include/MSL_C/weof.h deleted file mode 100644 index 7f241b5af0..0000000000 --- a/tools/cw/include/MSL_C/weof.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _MSL_WEOF_H -#define _MSL_WEOF_H - -#if !_MSL_USING_MW_C_HEADERS - #error You must have the non-MSL C header file access path before the MSL access path -#else - -#if _MSL_WIDE_CHAR - -#ifndef RC_INVOKED - - #include - - #ifndef _MSL_WEOF - #define _MSL_WEOF ((__std(wint_t))(-1)) - #endif - - #ifndef WEOF - #define WEOF _MSL_WEOF - #endif - -#endif - -#endif - -#endif - -#endif diff --git a/tools/cw/include/MSL_C/wmem.h b/tools/cw/include/MSL_C/wmem.h deleted file mode 100644 index bdbe82ec75..0000000000 --- a/tools/cw/include/MSL_C/wmem.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _MSL_WMEM_H -#define _MSL_WMEM_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL(wmemcpy)(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL(wmemmove)(wchar_t *, const wchar_t *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL(wmemset)(wchar_t *, wchar_t, size_t) _MSL_CANT_THROW; -#if !defined(__cplusplus) || __embedded_cplusplus != 0 -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL(wmemchr)(const wchar_t *, wchar_t, size_t) _MSL_CANT_THROW; -#else -_MSL_IMP_EXP_C const wchar_t * _MSL_CDECL(wmemchr)(const wchar_t *, wchar_t, size_t) _MSL_CANT_THROW; -#endif -_MSL_IMP_EXP_C int _MSL_CDECL(wmemcmp)(const wchar_t *, const wchar_t *, size_t) _MSL_CANT_THROW; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C errno_t _MSL_CDECL(wmemcpy_s)(wchar_t * _MSL_RESTRICT, rsize_t, const wchar_t * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL(wmemmove_s)(wchar_t *, rsize_t, const wchar_t *, rsize_t) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - - #if defined(__cplusplus) && __embedded_cplusplus == 0 - -inline -wchar_t * _MSL_CDECL wmemchr (wchar_t * s, wchar_t c, size_t n) _MSL_CANT_THROW { - return const_cast(wmemchr(static_cast(s), c, n)); -} - - #endif - -_MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wprintf.h b/tools/cw/include/MSL_C/wprintf.h deleted file mode 100644 index 3124b4fd66..0000000000 --- a/tools/cw/include/MSL_C/wprintf.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _MSL_WPRINTF_H -#define _MSL_WPRINTF_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL fwprintf(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wprintf(const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL swprintf(wchar_t * _MSL_RESTRICT, size_t, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfwprintf(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vswprintf(wchar_t * _MSL_RESTRICT, size_t, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vwprintf(const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wscanf.h b/tools/cw/include/MSL_C/wscanf.h deleted file mode 100644 index 1c9077e7f7..0000000000 --- a/tools/cw/include/MSL_C/wscanf.h +++ /dev/null @@ -1,36 +0,0 @@ -#ifndef _MSL_WSCANF_H -#define _MSL_WSCANF_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL fwscanf(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wscanf(const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL swscanf(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vswscanf(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfwscanf(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vwscanf(const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C int _MSL_CDECL fwscanf_s(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wscanf_s(const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL swscanf_s(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vswscanf_s(const wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vfwscanf_s(FILE * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL vwscanf_s(const wchar_t * _MSL_RESTRICT, va_list) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wstdio.h b/tools/cw/include/MSL_C/wstdio.h deleted file mode 100644 index f6115b1bdc..0000000000 --- a/tools/cw/include/MSL_C/wstdio.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _MSL_WSTDIO_H -#define _MSL_WSTDIO_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C wchar_t _MSL_CDECL putwc(wchar_t, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL fputwc(wchar_t, FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL getwc(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL fgetwc(FILE *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fputws(const wchar_t * _MSL_RESTRICT, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL fgetws(wchar_t * _MSL_RESTRICT, int, FILE * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL putwchar(wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t _MSL_CDECL getwchar(void) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fwide(FILE *, int) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - _MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wstring.h b/tools/cw/include/MSL_C/wstring.h deleted file mode 100644 index 2337772593..0000000000 --- a/tools/cw/include/MSL_C/wstring.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef _MSL_WSTRING_H -#define _MSL_WSTRING_H - -#include -#include -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C size_t _MSL_CDECL(wcslen)(const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL(wcscpy)(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsncpy(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcscat(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsncat(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wcscmp(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wcsncmp(const wchar_t *, const wchar_t *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL wcscoll(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcsxfrm(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcsspn(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C size_t _MSL_CDECL wcscspn(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcstok(wchar_t * _MSL_RESTRICT, const wchar_t * _MSL_RESTRICT, wchar_t * * _MSL_RESTRICT) _MSL_CANT_THROW; -#if !defined(__cplusplus) || __embedded_cplusplus != 0 -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcschr(const wchar_t *, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcspbrk(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsrchr(const wchar_t *, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsstr(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -#else -_MSL_IMP_EXP_C const wchar_t * _MSL_CDECL wcschr(const wchar_t *, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const wchar_t * _MSL_CDECL wcspbrk(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const wchar_t * _MSL_CDECL wcsrchr(const wchar_t *, wchar_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C const wchar_t * _MSL_CDECL wcsstr(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; -#endif - -#if defined(__STDC_WANT_SECURE_LIB__) && __STDC_WANT_SECURE_LIB__ -_MSL_IMP_EXP_C size_t _MSL_CDECL(wcsnlen_s)(const wchar_t *, size_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL(wcscpy_s)(wchar_t * _MSL_RESTRICT, rsize_t, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL wcsncpy_s(wchar_t * _MSL_RESTRICT, rsize_t, const wchar_t * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL wcscat_s(wchar_t * _MSL_RESTRICT, rsize_t, const wchar_t * _MSL_RESTRICT) _MSL_CANT_THROW; -_MSL_IMP_EXP_C errno_t _MSL_CDECL wcsncat_s(wchar_t * _MSL_RESTRICT, rsize_t, const wchar_t * _MSL_RESTRICT, rsize_t) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - - #if defined(__cplusplus) && __embedded_cplusplus == 0 - -inline -wchar_t * _MSL_CDECL wcschr (wchar_t * s, wchar_t c) _MSL_CANT_THROW { - return const_cast(wcschr(static_cast(s), c)); -} - -inline -wchar_t * _MSL_CDECL wcspbrk (wchar_t * s1, const wchar_t * s2) _MSL_CANT_THROW { - return const_cast(wcspbrk(static_cast(s1), s2)); -} - -inline -wchar_t * _MSL_CDECL wcsrchr (wchar_t * s, wchar_t c) _MSL_CANT_THROW { - return const_cast(wcsrchr(static_cast(s), c)); -} - -inline -wchar_t * _MSL_CDECL wcsstr (wchar_t * s1, const wchar_t * s2) _MSL_CANT_THROW { - return const_cast(wcsstr(static_cast(s1), s2)); -} - - #endif - -_MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_C/wtime.h b/tools/cw/include/MSL_C/wtime.h deleted file mode 100644 index 7da011a8a9..0000000000 --- a/tools/cw/include/MSL_C/wtime.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _MSL_WTIME_H -#define _MSL_WTIME_H - -#include -#include - -#include - -#ifdef __MWERKS__ - #if __MWERKS__ >= 0x3200 - #pragma implements_std_header("wchar.h") - #endif -#endif - -_MSL_BEGIN_NAMESPACE_STD - _MSL_BEGIN_EXTERN_C - -#if _MSL_OS_TIME_SUPPORT -_MSL_IMP_EXP_C __std(size_t) _MSL_CDECL wcsftime(wchar_t * _MSL_RESTRICT, __std(size_t), const wchar_t * _MSL_RESTRICT, const struct __std(tm) * _MSL_RESTRICT) _MSL_CANT_THROW; -static int _MSL_CDECL wemit(wchar_t *, __std(size_t), __std(size_t) *, const wchar_t *, ...) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C -_MSL_END_NAMESPACE_STD - -#endif diff --git a/tools/cw/include/MSL_Extras/dirent.h b/tools/cw/include/MSL_Extras/dirent.h deleted file mode 100644 index 8af5d1fac4..0000000000 --- a/tools/cw/include/MSL_Extras/dirent.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSL_DIRENT_H -#define _MSL_DIRENT_H - -#include - -#if _MSL_OS_DISK_FILE_SUPPORT - -#ifndef NAME_MAX - #define NAME_MAX 260 -#endif - -#pragma options align=native -#pragma warn_padding off - -_MSL_BEGIN_EXTERN_C - -struct dirent { - char d_name[NAME_MAX]; -}; - -_MSL_IMP_EXP_C DIR * opendir(const char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct dirent * readdir(DIR *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int readdir_r(DIR *, struct dirent *, struct dirent * *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C void rewinddir(DIR *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int closedir(DIR *) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#pragma warn_padding reset -#pragma options align=reset - -#endif /* _MSL_OS_DISK_FILE_SUPPORT */ - -#endif /* _MSL_DIRENT_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras.h b/tools/cw/include/MSL_Extras/extras.h deleted file mode 100644 index 834e059414..0000000000 --- a/tools/cw/include/MSL_Extras/extras.h +++ /dev/null @@ -1,17 +0,0 @@ -#ifndef _MSL_EXTRAS_H -#define _MSL_EXTRAS_H - -#include -#include -#include -#include "unistd.h" -#include -#include -#include "extras_io.h" -#include "extras_malloc.h" -#include "extras_stdlib.h" -#include "extras_string.h" -#include "extras_time.h" -#include "extras_wchar.h" - -#endif /* _MSL_EXTRAS_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_io.h b/tools/cw/include/MSL_Extras/extras_io.h deleted file mode 100644 index da54d3ddb9..0000000000 --- a/tools/cw/include/MSL_Extras/extras_io.h +++ /dev/null @@ -1,19 +0,0 @@ -#ifndef _MSL_EXTRAS_IO_H -#define _MSL_EXTRAS_IO_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - - _MSL_IMP_EXP_C int _MSL_CDECL filelength(int) _MSL_CANT_THROW; - - #if _MSL_OS_DISK_FILE_SUPPORT - _MSL_IMP_EXP_C int _MSL_CDECL chsize(int, long) _MSL_CANT_THROW; - int _MSL_CDECL __msl_setfilesize(int, long) _MSL_CANT_THROW; - __inline long _MSL_CDECL tell(int fildes) _MSL_CANT_THROW { return(lseek(fildes, 0L, SEEK_CUR)); } - #endif - -_MSL_END_EXTERN_C - -#endif \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_malloc.h b/tools/cw/include/MSL_Extras/extras_malloc.h deleted file mode 100644 index c7ade9e1e5..0000000000 --- a/tools/cw/include/MSL_Extras/extras_malloc.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _MSL_EXTRAS_MALLOC_H -#define _MSL_EXTRAS_MALLOC_H - -#include - -_MSL_BEGIN_EXTERN_C - - _MSL_IMP_EXP_C int _MSL_CDECL heapmin(void) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif /* _MSL_EXTRAS_MALLOC_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_stdlib.h b/tools/cw/include/MSL_Extras/extras_stdlib.h deleted file mode 100644 index 57e61b5918..0000000000 --- a/tools/cw/include/MSL_Extras/extras_stdlib.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef _MSL_EXTRAS_STDLIB_H -#define _MSL_EXTRAS_STDLIB_H - -_MSL_BEGIN_EXTERN_C - -_MSL_IMP_EXP_C int _MSL_CDECL rand_r(unsigned int *) _MSL_CANT_THROW; - -_MSL_IMP_EXP_C char * _MSL_CDECL itoa(int, char *, int) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL ultoa(unsigned long, char *, int) _MSL_CANT_THROW; - -__inline char * _MSL_CDECL ltoa (long x, char * y, int z) _MSL_CANT_THROW { - return (itoa(x, y, z)); -} - - #if _MSL_FLOATING_POINT -_MSL_IMP_EXP_C char * _MSL_CDECL gcvt(double, int, char *) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - -#endif /* _MSL_EXTRAS_STDLIB_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_string.h b/tools/cw/include/MSL_Extras/extras_string.h deleted file mode 100644 index f7fb3a72ea..0000000000 --- a/tools/cw/include/MSL_Extras/extras_string.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _MSL_EXTRAS_STRING_H -#define _MSL_EXTRAS_STRING_H - -_MSL_BEGIN_EXTERN_C - - _MSL_IMP_EXP_C int _MSL_CDECL stricmp(const char *, const char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strnicmp(const char *, const char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strcmpi(const char *, const char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strncmpi(const char *, const char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strcasecmp (const char *, const char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strncasecmp(const char *, const char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strset(char *, int ) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strnset(char *, int , __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strrev(char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strupr(char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strspnp(char *, const char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strlwr (char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strdup(const char *str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL stricoll(const char *, const char *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strncoll(const char *, const char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strnicoll(const char *, const char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL strerror_r(int, char *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C char * _MSL_CDECL strtok_r(char * _MSL_RESTRICT, const char * _MSL_RESTRICT, char ** _MSL_RESTRICT) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif /* _MSL_EXTRAS_STRING_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_time.h b/tools/cw/include/MSL_Extras/extras_time.h deleted file mode 100644 index 6e836d73ab..0000000000 --- a/tools/cw/include/MSL_Extras/extras_time.h +++ /dev/null @@ -1,18 +0,0 @@ -#ifndef _MSL_EXTRAS_TIME_H -#define _MSL_EXTRAS_TIME_H - -_MSL_BEGIN_EXTERN_C - -#if _MSL_OS_TIME_SUPPORT - -_MSL_IMP_EXP_C char * _MSL_CDECL asctime_r(const struct __std(tm) *, char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL ctime_r(const __std(time_t) *, char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct __std(tm) * _MSL_CDECL localtime_r(const __std(time_t) *, struct __std(tm) *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C char * _MSL_CDECL strdate(char *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C struct __std(tm) * _MSL_CDECL gmtime_r(const __std(time_t) *, struct __std(tm) *) _MSL_CANT_THROW; - -#endif /* _MSL_OS_TIME_SUPPORT */ - -_MSL_END_EXTERN_C - -#endif /* _MSL_EXTRAS_TIME_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/extras_wchar.h b/tools/cw/include/MSL_Extras/extras_wchar.h deleted file mode 100644 index b594bdcea3..0000000000 --- a/tools/cw/include/MSL_Extras/extras_wchar.h +++ /dev/null @@ -1,33 +0,0 @@ -#ifndef _MSL_EXTRAS_WCHAR_H -#define _MSL_EXTRAS_WCHAR_H - -#include -#include - -#if _MSL_WIDE_CHAR - -#include - -_MSL_BEGIN_EXTERN_C - - _MSL_IMP_EXP_C int _MSL_CDECL wtoi(const wchar_t *_a) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL wcsicmp(const wchar_t *s1, const wchar_t *s2) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL wcsnicmp(const wchar_t *s1, const wchar_t *s2, __std(size_t) n) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL itow(int, wchar_t *, int) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsrev(wchar_t *str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsupr(wchar_t *str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsdup (const wchar_t *str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wstrrev(wchar_t * str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcslwr(wchar_t *str) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsset(wchar_t *str, wchar_t wc) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsnset(wchar_t *str, wchar_t wc, __std(size_t) n) _MSL_CANT_THROW; - _MSL_IMP_EXP_C wchar_t * _MSL_CDECL wcsspnp(const wchar_t *s1, const wchar_t *s2) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL wcsicoll(const wchar_t *, const wchar_t *) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL wcsnicoll(const wchar_t *, const wchar_t *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C int _MSL_CDECL wcsncoll(const wchar_t *, const wchar_t *, __std(size_t)) _MSL_CANT_THROW; - _MSL_IMP_EXP_C double _MSL_CDECL watof(const wchar_t * ) _MSL_CANT_THROW; - -_MSL_END_EXTERN_C - -#endif /* _MSL_WIDE_CHAR */ -#endif /* _MSL_EXTRAS_WCHAR_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/fcntl.h b/tools/cw/include/MSL_Extras/fcntl.h deleted file mode 100644 index 0a3dddbd2e..0000000000 --- a/tools/cw/include/MSL_Extras/fcntl.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _MSL_FCNTL_H -#define _MSL_FCNTL_H - -#include -#include - -#define O_TEXT 0x0 /* 960827: Added this for Visual C++ compatibility. */ -#define O_RDWR 0x1 /* open the file in read/write mode */ /*- mm 980420 -*/ -#define O_RDONLY 0x2 /* open the file in read only mode */ /*- mm 980420 -*/ -#define O_WRONLY 0x4 /* open the file in write only mode */ /*- mm 980420 -*/ -#define O_APPEND 0x0100 /* open the file in append mode */ -#define O_CREAT 0x0200 /* create the file if it doesn't exist */ -#define O_EXCL 0x0400 /* if the file already exists don't create it again */ -#define O_TRUNC 0x0800 /* truncate the file after opening it */ -#define O_NRESOLVE 0x1000 /* Don't resolve any aliases */ -#define O_ALIAS 0x2000 /* Open alias file (if the file is an alias) */ -#define O_RSRC 0x4000 /* Open the resource fork */ -#define O_BINARY 0x8000 /* open the file in binary mode (default is text mode) */ -#define F_DUPFD 0x0 /* return a duplicate file descriptor */ - -_MSL_BEGIN_EXTERN_C - - #if _MSL_OS_DISK_FILE_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL open(const char *, int, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL creat(const char *, mode_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fcntl(int, int, ...) _MSL_CANT_THROW; - #endif - -#if _MSL_WFILEIO_AVAILABLE - #include -_MSL_IMP_EXP_C int _MSL_CDECL _wopen(const wchar_t *, int, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL _wcreat(const wchar_t *, mode_t) _MSL_CANT_THROW; -#endif - -_MSL_END_EXTERN_C - -#endif /* _MSL_FCNTL_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/sys/stat.h b/tools/cw/include/MSL_Extras/sys/stat.h deleted file mode 100644 index 7531a4c876..0000000000 --- a/tools/cw/include/MSL_Extras/sys/stat.h +++ /dev/null @@ -1,105 +0,0 @@ -#ifndef _MSL_STAT_H -#define _MSL_STAT_H - -#include -#include - -#define S_IFMT 0xF000 /* file type mask */ -#define S_IFDIR 0x4000 /* directory */ -#define S_IFIFO 0x1000 /* pipe */ -#define S_IFCHR 0x2000 /* character special */ -#define S_IFBLK 0x6000 /* blocking stream */ -#define S_IFREG 0x8000 /* regular */ - -/* - * File type macros - */ - -#define S_ISFIFO(m) (((m) & (S_IFMT)) == (S_IFIFO)) -#define S_ISDIR(m) (((m) & (S_IFMT)) == (S_IFDIR)) -#define S_ISCHR(m) (((m) & (S_IFMT)) == (S_IFCHR)) -#define S_ISREG(m) (((m) & (S_IFMT)) == (S_IFREG)) - -/* - * The following file mode macros are defined to allow compilation of programs that - * reference them; however, they are not relevant for Windows - */ - -#define S_IRWXU 0x0E00 /* Permissions for file owner class */ /*- mm 990107 -*/ -#define S_IRUSR 0x0800 /* Read permission file owner class */ /*- mm 990107 -*/ -#define S_IWUSR 0x0400 /* writ permission file owner class */ /*- mm 990107 -*/ -#define S_IXUSR 0x0200 /* exec permission file owner class */ /*- mm 990107 -*/ -#define S_IRWXG 0x01C0 /* permissions for file group class */ /*- mm 990107 -*/ -#define S_IRGRP 0x0100 /* Read permission file group class */ /*- mm 990107 -*/ -#define S_IWGRP 0x0080 /* writ permission file group class */ /*- mm 990107 -*/ /*- mm 010612 -*/ -#define S_IXGRP 0x0040 /* exec permission file group class */ /*- mm 990107 -*/ /*- mm 010612 -*/ -#define S_IRWXO 0x0038 /* permissions for file other class */ /*- mm 990107 -*/ -#define S_IROTH 0x0020 /* Read permission file other class */ /*- mm 990107 -*/ /*- mm 010612 -*/ -#define S_IWOTH 0x0010 /* writ permission file other class */ /*- mm 990107 -*/ /*- mm 010612 -*/ -#define S_IXOTH 0x0008 /* exec permission file other class */ /*- mm 990107 -*/ /*- mm 010612 -*/ -#define S_ISUID 0x0004 /* set user ID on execution */ /*- mm 990107 -*/ -#define S_ISGID 0x0002 /* set group ID on execution */ /*- mm 990107 -*/ - -#define _MSL_POSIX_PARAMS int - - -typedef unsigned long mode_t; -typedef unsigned long ino_t; -typedef unsigned long dev_t; -typedef short nlink_t; -typedef unsigned long uid_t; -typedef unsigned long gid_t; -typedef long off_t; - -/* - * (stat) st_mode bit values - * NB: all modes marked as (GUSI) mean that the mode is used only by GUSI - * (Grand Unified Sockets Interface). - */ - - #define S_IFLNK 0xA000 /* symbolic link */ /*- mm 990107 -*/ - #define S_IFSOCK 0xE000 /* socket (GUSI) */ /*- mm 990107 -*/ - -/* - * File type macros - */ - - #define S_ISBLK(m) (((m) & (S_IFMT)) == (S_IFBLK)) - -_MSL_BEGIN_EXTERN_C - - #pragma options align=native - #pragma warn_padding off - -struct stat { - mode_t st_mode; /* File mode; see #define's above */ - ino_t st_ino; /* File serial number */ - dev_t st_dev; /* ID of device containing this file*/ - nlink_t st_nlink; /* Number of links */ - uid_t st_uid; /* User ID of the file's owner */ - gid_t st_gid; /* Group ID of the file's group */ - dev_t st_rdev; /* Device type */ - off_t st_size; /* File size in bytes */ - #ifdef _MSL_TIME_T_DEFINED - __std(time_t) st_atime; /* Time of last access */ /*- hh 990124 -*/ - __std(time_t) st_mtime; /* Time of last data modification */ - __std(time_t) st_ctime; /* Time of last file status change */ - #endif /* _MSL_TIME_T_DEFINED */ - long st_blksize; /* Optimal blocksize */ - long st_blocks; /* blocks allocated for file */ -}; - - #pragma warn_padding reset - #pragma options align=reset - - #if _MSL_OS_DISK_FILE_SUPPORT -_MSL_IMP_EXP_C int _MSL_CDECL chmod(const char *, mode_t) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL fstat(int, struct stat *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL mkdir(const char *, ...) _MSL_CANT_THROW; -_MSL_IMP_EXP_C int _MSL_CDECL stat(const char *, struct stat *) _MSL_CANT_THROW; -_MSL_IMP_EXP_C _MSL_POSIX_PARAMS _MSL_CDECL umask(_MSL_POSIX_PARAMS) _MSL_CANT_THROW; - #endif - -_MSL_END_EXTERN_C - -#endif /* _MSL_STAT_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/sys/timeb.h b/tools/cw/include/MSL_Extras/sys/timeb.h deleted file mode 100644 index f28aa9da8f..0000000000 --- a/tools/cw/include/MSL_Extras/sys/timeb.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef _MSL_TIMEB_H -#define _MSL_TIMEB_H - -#include -#include - -_MSL_BEGIN_EXTERN_C - -#pragma options align=native - -/*- EJS 030922: ANSI-safe name -*/ -struct _timeb { - __std(time_t) time; /* Seconds in the current time */ - unsigned short millitm; /* Milliseconds in the current time */ - short timezone; /* The difference,in minutes, between local time - and Greenwich Mean time */ - short dstflag; /* 1 if Daylight Savings time is in effect */ -}; - -#define timeb _timeb /* EJS 030922: compatibility name */ - -#pragma options align=reset - -_MSL_END_EXTERN_C - -#endif /* _MSL_TIMEB_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/sys/utsname.h b/tools/cw/include/MSL_Extras/sys/utsname.h deleted file mode 100644 index 9482aa9f59..0000000000 --- a/tools/cw/include/MSL_Extras/sys/utsname.h +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Content: Interface file to standard UNIX-style entry points ... - * - * NB: This file implements some UNIX low level support. These functions - * are not guaranteed to be 100% conformant. - */ - -#ifndef _MSL_UTSNAME_H -#define _MSL_UTSNAME_H - -#include - -#pragma options align=native - -_MSL_BEGIN_EXTERN_C - -_MSL_END_EXTERN_C - -#pragma options align=reset - -#endif /*_MSL_UTSNAME_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/unistd.h b/tools/cw/include/MSL_Extras/unistd.h deleted file mode 100644 index 517366e114..0000000000 --- a/tools/cw/include/MSL_Extras/unistd.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _MSL_UNISTD_H -#define _MSL_UNISTD_H - -#include -#include - - /* macros for whence parameter of lseek() (taken from */ - #define SEEK_SET 0 - #define SEEK_CUR 1 - #define SEEK_END 2 - -_MSL_BEGIN_EXTERN_C - - /* The following are symbolic constants for access() */ /*- mm 991216 -*/ - /* See Posix 2.9.1 */ /*- mm 991216 -*/ - #define F_OK 0 /* Test for existence of file */ /*- mm 991216 -*/ - #define W_OK 2 /* Test for write permission */ /*- mm 991216 -*/ - #define R_OK 4 /* Test for read permission */ /*- mm 991216 -*/ - #define X_OK 1 /* Test for execute permission*/ /*- mm 010626 -*/ - - #if __dest_os != __win32_os - __inline int _MSL_CDECL getpid(void) _MSL_CANT_THROW {return 9000;} - #endif - - __inline int _MSL_CDECL getppid(void) _MSL_CANT_THROW {return 8000 ;} - __inline int _MSL_CDECL getuid(void) _MSL_CANT_THROW {return 200 ;} - __inline int _MSL_CDECL geteuid(void) _MSL_CANT_THROW {return 200 ;} - __inline int _MSL_CDECL getgid(void) _MSL_CANT_THROW {return 100 ;} - __inline int _MSL_CDECL getegid(void) _MSL_CANT_THROW {return 100 ;} - __inline int _MSL_CDECL getpgrp(void) _MSL_CANT_THROW {return 9000 ;} - -_MSL_END_EXTERN_C - -#endif /* _MSL_UNISTD_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/unistd_api.h b/tools/cw/include/MSL_Extras/unistd_api.h deleted file mode 100644 index baa21e8b6c..0000000000 --- a/tools/cw/include/MSL_Extras/unistd_api.h +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef _MSL_UNISTD_API_H -#define _MSL_UNISTD_API_H - -#include - -_MSL_BEGIN_EXTERN_C - - -_MSL_END_EXTERN_C - -#endif /* _MSL_UNISTD_API_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/unix.h b/tools/cw/include/MSL_Extras/unix.h deleted file mode 100644 index 197c5b2e5b..0000000000 --- a/tools/cw/include/MSL_Extras/unix.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef _MSL_UNIX_H -#define _MSL_UNIX_H - -#include -#include -#include - -#endif /* _MSL_UNIX_H */ \ No newline at end of file diff --git a/tools/cw/include/MSL_Extras/utime.h b/tools/cw/include/MSL_Extras/utime.h deleted file mode 100644 index 2990703077..0000000000 --- a/tools/cw/include/MSL_Extras/utime.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _MSL_UTIME_H -#define _MSL_UTIME_H - -#include - -#if _MSL_OS_TIME_SUPPORT - -#include - -if (__dest_os == __arm_bare) - #include "utime.ARM.h" -#endif - - #pragma options align=native - - /* struct for utime */ - struct utimbuf { - __std(time_t) actime; /* access time */ - __std(time_t) modtime; /* modification time */ - }; - - #pragma options align=reset - - #ifndef _MSL_STRUCT_UTIMEBUF_TYPE - #define _MSL_STRUCT_UTIMEBUF_TYPE const struct - #endif - - _MSL_BEGIN_EXTERN_C - - _MSL_IMP_EXP_C int _MSL_CDECL utime (const char *, _MSL_STRUCT_UTIMEBUF_TYPE utimbuf *) _MSL_CANT_THROW; - - _MSL_IMP_EXP_C int _MSL_CDECL utimes (const char *path, struct timeval buf[2]) _MSL_CANT_THROW; - - _MSL_END_EXTERN_C - -#endif /* _MSL_OS_TIME_SUPPORT */ - -#endif /* _MSL_UTIME_H */ \ No newline at end of file diff --git a/tools/cw/lib/FP_fastI_v5t_LE.a b/tools/cw/lib/FP_fastI_v5t_LE.a deleted file mode 100644 index c5482694ce..0000000000 Binary files a/tools/cw/lib/FP_fastI_v5t_LE.a and /dev/null differ diff --git a/tools/cw/lib/MSL_CPP_NITRO_Ai_LE.a b/tools/cw/lib/MSL_CPP_NITRO_Ai_LE.a deleted file mode 100644 index 7e8d90b0e2..0000000000 Binary files a/tools/cw/lib/MSL_CPP_NITRO_Ai_LE.a and /dev/null differ diff --git a/tools/cw/lib/MSL_C_NITRO_Ai_LE.a b/tools/cw/lib/MSL_C_NITRO_Ai_LE.a deleted file mode 100644 index e1d6e094a3..0000000000 Binary files a/tools/cw/lib/MSL_C_NITRO_Ai_LE.a and /dev/null differ diff --git a/tools/cw/lib/MSL_Extras_NITRO_Ai_LE.a b/tools/cw/lib/MSL_Extras_NITRO_Ai_LE.a deleted file mode 100644 index cd2b7f6a33..0000000000 Binary files a/tools/cw/lib/MSL_Extras_NITRO_Ai_LE.a and /dev/null differ diff --git a/tools/cw/lib/NITRO_Runtime_Ai_LE.a b/tools/cw/lib/NITRO_Runtime_Ai_LE.a deleted file mode 100644 index caf9ba4b18..0000000000 Binary files a/tools/cw/lib/NITRO_Runtime_Ai_LE.a and /dev/null differ diff --git a/tools/cw/lmgr8c/lmgr8c.c b/tools/cw/lmgr8c/lmgr8c.c deleted file mode 100644 index 51a0786326..0000000000 --- a/tools/cw/lmgr8c/lmgr8c.c +++ /dev/null @@ -1,10 +0,0 @@ -int lp_checkout() -{ - return 0; -} -void lp_checkin() -{ -} -void lp_errstring() -{ -} diff --git a/tools/cw/lmgr8c/lmgr8c.def b/tools/cw/lmgr8c/lmgr8c.def deleted file mode 100644 index 67ee9d727a..0000000000 --- a/tools/cw/lmgr8c/lmgr8c.def +++ /dev/null @@ -1,6 +0,0 @@ -; x86_64-w64-mingw32-gcc -m32 -shared -s -o lmgr8c.dll lmgr8c.def lmgr8c.c -LIBRARY LMGR8C -EXPORTS - lp_checkout @190 - lp_checkin @189 - lp_errstring @191 diff --git a/tools/cw/meson.build b/tools/cw/meson.build deleted file mode 100644 index e86fa4ee80..0000000000 --- a/tools/cw/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -project('metrowerks', 'c', - default_options : ['warning_level=2']) - -if host_machine.system() == 'windows' - winflags = [ - '-mconsole', - '-municode' - ] - add_project_arguments(winflags, language : 'c') - add_project_link_arguments(winflags, language : 'c') - add_project_arguments( - '-DUNICODE', - '-D_UNICODE', - '-D_CRT_SECURE_NO_WARNINGS', - language : 'c') -endif - -executable('mwrap', 'mwrap.c') diff --git a/tools/cw/mwrap.c b/tools/cw/mwrap.c deleted file mode 100644 index 9034d91e2a..0000000000 --- a/tools/cw/mwrap.c +++ /dev/null @@ -1,678 +0,0 @@ -#include -#include -#include -#include - -#ifdef _WIN32 -#include -#include -#include -#else -#include -#include -extern char **environ; -#endif - -#define PROGRAM_NAME "mwrap" - -#define DEFAULT_VER "2.0/sp2p2" -#define DEFAULT_CFG_FILE ".mwconfig" -#define VER_CFG 1 - -#ifdef _UNICODE -#define FMT_TS "%ls" -#else -#define FMT_TS "%s" -#endif - -// POSIX-compatibility -#ifndef _WIN32 -typedef char _TCHAR; -#define _tmain main -#define _T(...) __VA_ARGS__ -#define _ftprintf(...) fprintf(__VA_ARGS__) -#define _sntprintf(...) snprintf(__VA_ARGS__) -#define _tcscat(...) strcat(__VA_ARGS__) -#define _tcscmp(...) strcmp(__VA_ARGS__) -#define _tcscspn(...) strcspn(__VA_ARGS__) -#define _tcsdup(...) strdup(__VA_ARGS__) -#define _tcslen(...) strlen(__VA_ARGS__) -#define _tcsrchr(...) strrchr(__VA_ARGS__) -#define _tfopen(...) fopen(__VA_ARGS__) -#define _tgetenv(...) getenv(__VA_ARGS__) -#endif - -struct args { - _TCHAR *o; - _TCHAR *precompile; - bool M; - bool MD; - - bool wrap_dbg; - _TCHAR *wrap_ver; - bool wrap_noipa; -}; - -struct args parse_args(int argc, _TCHAR *argv[], int *out_argc, _TCHAR ***out_argv) -{ - struct args args = { - .o = NULL, - .precompile = NULL, - .M = false, - .MD = false, - .wrap_dbg = false, - .wrap_ver = NULL, - .wrap_noipa = false - }; - - int new_argc = 0; - _TCHAR **new_argv = malloc(sizeof(_TCHAR *) * (argc + 2)); - new_argv[new_argc++] = NULL; - - while (argc >= 1) { - int skip = 0; - int copy = 0; - - if (_tcscmp(argv[0], _T("-o")) == 0 && - argc >= 2) { - args.o = argv[1]; - copy = 2; - } else if (_tcscmp(argv[0], _T("-precompile")) == 0 && - argc >= 2) { - args.precompile = argv[1]; - copy = 2; - } else if (_tcscmp(argv[0], _T("-M")) == 0) { - args.M = true; - copy = 1; - } else if (_tcscmp(argv[0], _T("-MD")) == 0) { - args.MD = true; - copy = 1; - } else if (_tcscmp(argv[0], _T("-wrap:dbg")) == 0) { - args.wrap_dbg = true; - skip = 1; - } else if (_tcscmp(argv[0], _T("-wrap:ver")) == 0 && - argc >= 2) { - args.wrap_ver = argv[1]; - skip = 2; - } else if (_tcscmp(argv[0], _T("-wrap:noipa")) == 0) { - args.wrap_noipa = true; - skip = 1; - } else { - copy = 1; - } - - argc -= skip + copy; - while (skip--) argv++; - while (copy--) new_argv[new_argc++] = *argv++; - } - new_argv[new_argc] = NULL; - - *out_argc = new_argc; - *out_argv = new_argv; - return args; -} - -char *file_read(const _TCHAR *fname, size_t *size) -{ - FILE *f = _tfopen(fname, _T("rb")); - if (!f) return NULL; - fseek(f, 0, SEEK_END); - *size = ftell(f); - char *file = malloc(*size); - rewind(f); - fread(file, *size, 1, f); - fclose(f); - return file; -} - -char *tctoutf(const _TCHAR *str) -{ - if (!str) return NULL; -#ifdef _UNICODE - size_t size = WideCharToMultiByte(CP_UTF8, 0, str, -1, NULL, 0, NULL, NULL); - if (!size) return NULL; - char *res = malloc(size); - if (!res) return NULL; - WideCharToMultiByte(CP_UTF8, 0, str, -1, res, size, NULL, NULL); - return res; -#else - return strdup(str); -#endif -} - -_TCHAR *utftotc(const char *str) -{ - if (!str) return NULL; -#ifdef _UNICODE - size_t size = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); - if (!size) return NULL; - _TCHAR *res = malloc(size); - if (!res) return NULL; - MultiByteToWideChar(CP_UTF8, 0, str, -1, res, size); - return res; -#else - return strdup(str); -#endif -} - -struct config { - char *wine; - char *path_unx; - char *path_win; - char *path_build_unx; - char *path_build_win; -}; - -const _TCHAR *cfg_file(void) -{ - const _TCHAR *path = _tgetenv(_T("MWCONFIG")); - if (!path) path = _T(DEFAULT_CFG_FILE); - return path; -} - -void cfg_save_writestr(FILE *f, const char *str) -{ - if (str) fputs(str, f); - fputc('\0', f); -} - -void cfg_save(struct config cfg) -{ - FILE *f = _tfopen(cfg_file(), _T("wb")); - if (!f) { - fprintf(stderr, PROGRAM_NAME ": cfg_save: Failed to write config\n"); - exit(EXIT_FAILURE); - } - - const char head[] = {'M', 'W', 'R', VER_CFG}; - fwrite(head, sizeof(head), 1, f); - cfg_save_writestr(f, cfg.wine); - cfg_save_writestr(f, cfg.path_unx); - cfg_save_writestr(f, cfg.path_win); - cfg_save_writestr(f, cfg.path_build_unx); - cfg_save_writestr(f, cfg.path_build_win); - fclose(f); -} - -char *cfg_load_readstr(char *file, size_t *pos, size_t len) -{ - // Check if a string is present - if (len < *pos + 1) return NULL; - if (file[*pos] == '\0') { - // Treat empty string as empty - (*pos)++; - return NULL; - } - - // Look for the null byte - size_t readlen = strnlen(file + *pos, len - *pos); - if (len - *pos <= readlen) return NULL; - - // If found, we can safely read it - char *readstr = strdup(file + *pos); - *pos += readlen + 1; - return readstr; -} - -struct config cfg_load(void) -{ - struct config cfg; - cfg.wine = NULL; - cfg.path_unx = NULL; - cfg.path_win = NULL; - cfg.path_build_unx = NULL; - cfg.path_build_win = NULL; - - size_t file_len = 0; - char *file = file_read(cfg_file(), &file_len); - if (!file) return cfg; - size_t file_pos = 0; - - const char head[] = {'M', 'W', 'R', VER_CFG}; - if (file_len < file_pos + sizeof(head)) return cfg; - if (memcmp(file + file_pos, head, sizeof(head)) != 0) return cfg; - file_pos += sizeof(head); - - cfg.wine = cfg_load_readstr(file, &file_pos, file_len); - cfg.path_unx = cfg_load_readstr(file, &file_pos, file_len); - cfg.path_win = cfg_load_readstr(file, &file_pos, file_len); - cfg.path_build_unx = cfg_load_readstr(file, &file_pos, file_len); - cfg.path_build_win = cfg_load_readstr(file, &file_pos, file_len); - - free(file); - return cfg; -} - -void cfg_free(struct config cfg) -{ - free(cfg.path_win); - free(cfg.path_unx); - free(cfg.path_build_win); - free(cfg.path_build_unx); - free(cfg.wine); -} - -void configure(int argc, _TCHAR *argv[]) -{ - _TCHAR *wine = NULL; - _TCHAR *path_unx = NULL; - _TCHAR *path_win = NULL; - _TCHAR *path_build_unx = NULL; - _TCHAR *path_build_win = NULL; - - while (argc >= 1) { - if (_tcscmp(argv[0], _T("-wine")) == 0) { - wine = argv[1]; - argv += 2; argc -= 2; - } else if (_tcscmp(argv[0], _T("-path_unx")) == 0) { - path_unx = argv[1]; - argv += 2; argc -= 2; - } else if (_tcscmp(argv[0], _T("-path_win")) == 0) { - path_win = argv[1]; - argv += 2; argc -= 2; - } else if (_tcscmp(argv[0], _T("-path_build_unx")) == 0) { - path_build_unx = argv[1]; - argv += 2; argc -= 2; - } else if (_tcscmp(argv[0], _T("-path_build_win")) == 0) { - path_build_win = argv[1]; - argv += 2; argc -= 2; - } else { - fprintf(stderr, - PROGRAM_NAME ": configure: Invalid argument: " FMT_TS "\n", - *argv); - exit(EXIT_FAILURE); - } - } - - struct config cfg; - cfg.wine = tctoutf(wine); - cfg.path_unx = tctoutf(path_unx); - cfg.path_win = tctoutf(path_win); - cfg.path_build_unx = tctoutf(path_build_unx); - cfg.path_build_win = tctoutf(path_build_win); - if ((wine && !cfg.wine) || - (path_unx && !cfg.path_unx) || - (path_win && !cfg.path_win) || - (path_build_unx && !cfg.path_build_unx) || - (path_build_win && !cfg.path_build_win)) { - fprintf(stderr, PROGRAM_NAME ": configure: Conversion failed\n"); - exit(EXIT_FAILURE); - } - cfg_save(cfg); - cfg_free(cfg); -} - -_TCHAR *my_dirname(const _TCHAR *str) -{ - _TCHAR *dir = _tcsdup(str); - size_t sep = _tcslen(dir); - while (sep > 0) { - if (dir[sep] == '/') goto found; -#ifdef _WIN32 - if (dir[sep] == '\\') goto found; -#endif - sep--; - } - // Indicate current dir if no slash was found - dir[0] = '.'; - sep = 1; -found: - dir = realloc(dir, sizeof(*dir) * (sep + 1)); - dir[sep] = '\0'; - return dir; -} - -void str_resize(_TCHAR **str, size_t *max, size_t req) -{ - if (*max < req) { - while (*max < req) *max += 1024; - *str = realloc(*str, sizeof(**str) * *max); - } -} - -// Windows argv[] strings are passed as a whole, instead of being split up into -// an array. This means that *we* have to make sure to quote our arguments, and -// for some reason nobody every thought to make a library for this. -_TCHAR *win_argv_build(const _TCHAR *const *argv) -{ - size_t args_max = 1024; - size_t args_pos = 0; - _TCHAR *args = malloc(sizeof(_TCHAR) * args_max); - - bool first = true; - - while (*argv) { - const _TCHAR *arg = *argv; - - // Add a space between arguments - if (!first) { - str_resize(&args, &args_max, args_pos + 1); - args[args_pos++] = ' '; - } - first = false; - - // If it doesn't contain any special chars, copy as-is - size_t arg_len = _tcslen(arg); - if (_tcscspn(arg, _T(" \t\n\r")) == arg_len) { - str_resize(&args, &args_max, args_pos + arg_len); - memcpy(args + args_pos, arg, sizeof(_TCHAR) * arg_len); - args_pos += arg_len; - argv++; - continue; - } - - // Quote the argument - int backslashes = 0; - str_resize(&args, &args_max, args_pos + 1); - args[args_pos++] = '"'; - while (*arg) { - if (*arg == '\\') { - backslashes++; - } else if (*arg == '"') { - // Add extra backslashes to escape the quote - backslashes++; - str_resize(&args, &args_max, args_pos + backslashes); - while (backslashes--) args[args_pos++] = '\\'; - backslashes = 0; - } else { - backslashes = 0; - } - - str_resize(&args, &args_max, args_pos + 1); - args[args_pos++] = *arg; - - arg++; - } - // Add extra backslashes to avoid escaping the final quote - if (backslashes) { - str_resize(&args, &args_max, args_pos + backslashes); - while (backslashes--) args[args_pos++] = '\\'; - } - str_resize(&args, &args_max, args_pos + 1); - args[args_pos++] = '"'; - - argv++; - } - - args = realloc(args, sizeof(*args) * (args_pos + 1)); - args[args_pos] = '\0'; - - return args; -} - -void fix_depfile(_TCHAR *fname, const char *path_unx, const char *path_win, const char *path_build_unx, const char *path_build_win) -{ - size_t file_size; - char *file = file_read(fname, &file_size); - if (!file) return; - - FILE *f = _tfopen(fname, _T("wb")); - if (!f) { - free(file); - return; - } - - size_t size_win = strlen(path_win); - size_t size_build_win = 0; - if (path_build_win && path_build_unx) { - size_build_win = strlen(path_build_win); - } - - bool blankline = false; - - // Replace any instances of path_win at the beginning of a line with - // path_unx, and backslashes with forward slashes. - for (size_t x = 0; x < file_size;) { - if (blankline && - file_size - x > size_win && - memcmp(file + x, path_win, size_win) == 0) { - fputs(path_unx, f); - x += size_win; - } else if (blankline && size_build_win && - file_size - x > size_build_win && - memcmp(file + x, path_build_win, size_build_win) == 0) { - fputs(path_build_unx, f); - x += size_build_win; - } else if (file_size - x > 2 && file[x] == '\\' && - file[x + 1] != '\r' && file[x + 1] != '\n') { - fputc('/', f); - x++; - } else { - if (blankline && file[x] != ' ' && file[x] != '\t') { - blankline = false; - } - if (file[x] == '\n') blankline = true; - fputc(file[x++], f); - } - } - - fclose(f); - free(file); -} - -char *replace_str(char *str, char *orig, char *rep, int start) -{ - static char temp[4096]; - static char buffer[4096]; - char *p; - - strcpy(temp, str + start); - - if(!(p = strstr(temp, orig))) // Is 'orig' even in 'temp'? - return temp; - - strncpy(buffer, temp, p-temp); // Copy characters from 'temp' start to 'orig' str - buffer[p-temp] = '\0'; - - sprintf(buffer + (p - temp), "%s%s", rep, p + strlen(orig)); - sprintf(str + start, "%s", buffer); - - return str; -} - -void remove_ipa_arguments(int *argc, _TCHAR **argv) -{ - int new_argc = 0; - for (int i = 0; i < *argc; i++) { - if (argv[i] && _tcscmp(argv[i], _T("-ipa")) == 0 && (i + 1) < *argc) { - // Skip the current "-ipa" argument and the following argument. - i++; // Increment to skip the next argument. - } else { - // Keep this argument, by moving it down if necessary. - argv[new_argc] = argv[i]; - new_argc++; - } - } - - // Update the original argc to the new count of arguments. - *argc = new_argc; - argv[*argc] = NULL; -} - -int _tmain(int argc, _TCHAR *argv[]) -{ - if (argc < 2) { - fprintf(stderr, PROGRAM_NAME ": Too few arguments\n"); - return EXIT_FAILURE; - } - - if (_tcscmp(argv[1], _T("-test")) == 0) return EXIT_SUCCESS; - if (_tcscmp(argv[1], _T("-conf")) == 0) { - configure(argc - 2, argv + 2); - return EXIT_SUCCESS; - } - - struct config cfg = cfg_load(); - - _TCHAR *tool_dir = my_dirname(argv[0]); - const _TCHAR *tool_ver = _T(DEFAULT_VER); - const _TCHAR *tool_bin = argv[1]; - - int new_argc; - _TCHAR **new_argv; - struct args args = parse_args(argc - 2, argv + 2, &new_argc, &new_argv); - - if (args.wrap_ver) tool_ver = args.wrap_ver; - - if (args.wrap_noipa) { - remove_ipa_arguments(&new_argc, new_argv); - } - - // Make a path of the chosen tool - size_t tool_size = _tcslen(tool_dir) + 1 + _tcslen(tool_ver) + 1 + - _tcslen(tool_bin) + 5; - _TCHAR *tool = malloc(sizeof(_TCHAR) * tool_size); - _sntprintf(tool, tool_size, _T(FMT_TS "/" FMT_TS "/" FMT_TS ".exe"), - tool_dir, tool_ver, tool_bin); - new_argv[0] = tool; - - // Add the wine command if requested - _TCHAR *wine = utftotc(cfg.wine); - if (wine) { - new_argc += 1; - new_argv = realloc(new_argv, sizeof(*new_argv) * (new_argc + 1)); - memmove(new_argv + 1, new_argv, sizeof(*new_argv) * new_argc); - new_argv[0] = wine; - } - -#ifdef _WIN32 -#define PATHSEP ";" -#else -#define PATHSEP ":" -#endif - - // Build standard library paths for environment variables - size_t mwcincludes_size = _tcslen(tool_dir) * 3 + 46; - _TCHAR *MWCIncludes = malloc(sizeof(_TCHAR) * mwcincludes_size); - _sntprintf(MWCIncludes, mwcincludes_size, _T( - FMT_TS "/" FMT_TS PATHSEP - FMT_TS "/" FMT_TS PATHSEP - FMT_TS "/" FMT_TS), - tool_dir, _T("include"), - tool_dir, _T("include/MSL_C"), - tool_dir, _T("include/MSL_Extras")); - - size_t mwclibraries_size = _tcslen(tool_dir) + 5; - _TCHAR *MWLibraries = malloc(sizeof(_TCHAR) * mwclibraries_size); - _sntprintf(MWLibraries, mwclibraries_size, _T( - FMT_TS "/" FMT_TS), - tool_dir, _T("lib")); - - size_t mwclibraryfiles_size = 107; - _TCHAR *MWLibraryFiles = malloc(sizeof(_TCHAR) * mwclibraryfiles_size); - _sntprintf(MWLibraryFiles, mwclibraryfiles_size, _T( - "MSL_C_NITRO_Ai_LE.a" PATHSEP - "MSL_Extras_NITRO_Ai_LE.a" PATHSEP - "MSL_CPP_NITRO_Ai_LE.a" PATHSEP - "FP_fastI_v5t_LE.a" PATHSEP - "NITRO_Runtime_Ai_LE.a")); - -#ifdef _WIN32 - // Set up the environment - SetEnvironmentVariable(_T("MWCIncludes"), MWCIncludes); - SetEnvironmentVariable(_T("MWLibraries"), MWLibraries); - SetEnvironmentVariable(_T("MWLibraryFiles"), MWLibraryFiles); - - // Execute the tool - _TCHAR *argv_quoted = win_argv_build((const _TCHAR **)new_argv); - if (args.wrap_dbg) fprintf(stderr, FMT_TS "\n", argv_quoted); - STARTUPINFO si; - PROCESS_INFORMATION pi; - DWORD exitcode; - ZeroMemory(&si, sizeof(si)); - ZeroMemory(&pi, sizeof(pi)); - si.cb = sizeof(si); - if (!CreateProcess(new_argv[0], argv_quoted, NULL, NULL, FALSE, 0, - NULL, NULL, &si, &pi)) { - fprintf(stderr, PROGRAM_NAME ": CreateProcess failed\n"); - exit(EXIT_FAILURE); - } - WaitForSingleObject(pi.hProcess, INFINITE); - GetExitCodeProcess(pi.hProcess, &exitcode); - CloseHandle(pi.hProcess); - CloseHandle(pi.hThread); - if (exitcode) return exitcode; - free(argv_quoted); -#else - // Set up the environment - setenv("MWCIncludes", MWCIncludes, true); - setenv("MWLibraries", MWLibraries, true); - setenv("MWLibraryFiles", MWLibraryFiles, true); - - #ifndef __CYGWIN__ - // Pass environment variables to Windows if running in WSL - setenv("WSLENV", "MWCIncludes/p:MWLibraries/p:MWLibraryFiles", true); - #endif - - // Execute the tool - if (args.wrap_dbg) { - for (int x = 0; x < new_argc; x++) { - printf(x ? " %s" : "%s", new_argv[x]); - } - printf("\n"); - } - pid_t pid; - if (posix_spawn(&pid, new_argv[0], NULL, NULL, new_argv, environ) != 0) { - perror(PROGRAM_NAME ": posix_spawn"); - exit(EXIT_FAILURE); - } - int exitcode; - waitpid(pid, &exitcode, 0); - if (WEXITSTATUS(exitcode)) return WEXITSTATUS(exitcode); -#endif - - if (wine) free(wine); - free(tool); - free(new_argv); - free(tool_dir); - - free(MWCIncludes); - free(MWLibraries); - free(MWLibraryFiles); - - // Fix dependency file if generated - if (cfg.path_unx && cfg.path_win) { - _TCHAR *depfile = NULL; - if (args.M) { - // Only generated a depfile - depfile = _tcsdup(args.o); - } else if (args.MD) { - // Generating a depfile as a side-effect of compilation - _TCHAR *out = NULL; - if (args.o) out = args.o; - if (args.precompile) out = args.precompile; - - // Replace filename extension with .d - if (out) { - out = _tcsdup(out); - _TCHAR *dot = _tcsrchr(out, '.'); - if (!dot) dot = _tcsrchr(out, '\0'); - *dot = '\0'; - - size_t len = dot - out + 3; - out = realloc(out, sizeof(*out) * len); - _tcscat(out, _T(".d")); - } - depfile = out; - } - - if (depfile) { - if (args.wrap_dbg) { - fprintf(stderr, "dep: " FMT_TS "\n", depfile); - fprintf(stderr, "path_unx: %s\n", cfg.path_unx); - fprintf(stderr, "path_win: %s\n", cfg.path_win); - if (cfg.path_build_unx && cfg.path_build_win) { - fprintf(stderr, "path_build_unx: %s\n", cfg.path_build_unx); - fprintf(stderr, "path_build_win: %s\n", cfg.path_build_win); - } - } - fix_depfile(depfile, - cfg.path_unx, cfg.path_win, - cfg.path_build_unx, cfg.path_build_win); - free(depfile); - } - } - - cfg_free(cfg); - return EXIT_SUCCESS; -} diff --git a/tools/devtools/get_metroskrew.sh b/tools/devtools/get_metroskrew.sh new file mode 100755 index 0000000000..001af60c59 --- /dev/null +++ b/tools/devtools/get_metroskrew.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Usage: Run this script from the project root and provide the following environment variables: +# - SKREW_SYS - controls the distribution downloaded; either `windows`, `linux`, or `wine` +# - SKREW_VER - the release version of the metroskrew archive to be downloaded +# - SKREW_DIR - the subproject directory in which metroskrew shall be stored + +set -euxo pipefail + +case "$SKREW_SYS" in +windows) + SKREW_EXT=".7z" + EXTRACTOR="p7zip -d" + ;; + +linux | wine) + SKREW_EXT=".tar.xz" + EXTRACTOR="tar xf" + ;; + +*) + echo "Unrecognized platform $SKREW_SYS" + exit 1 + ;; +esac + +TMP="/tmp" + +SKREW="metroskrew" +SKREW_GH="https://github.com/mid-kid/$SKREW" +SKREW_ARC="metroskrew-$SKREW_SYS$SKREW_EXT" +SKREW_URL="$SKREW_GH/releases/download/$SKREW_VER/$SKREW_ARC" +SKREW_TMP="$TMP/$SKREW" + +rm -rf "$SKREW_DIR" + +# We extract the archive to `/tmp` to ensure that Windows does not muddle with permissions. +pushd "$TMP" >/dev/null +wget --quiet --show-progress -O "$SKREW_ARC" "$SKREW_URL" +$EXTRACTOR "$SKREW_ARC" +popd >/dev/null + +mv "$SKREW_TMP" "$SKREW_DIR" diff --git a/tools/meson.build b/tools/meson.build index d12f54d1ca..876bb0eb13 100644 --- a/tools/meson.build +++ b/tools/meson.build @@ -9,17 +9,12 @@ subdir('postconf') subdir('scripts') subdir('debug') -# Prebuilt tools -mwrap_exe = find_program('cw/mwrap', native: true) -makebanner_exe = find_program('makebanner', native: true) -makelcf_exe = find_program('makelcf', native: true) -makerom_exe = find_program('makerom', native: true) - # ARM binutils arm_none_eabi_gcc_exe = find_program('arm-none-eabi-gcc', native: true) arm_none_eabi_objcopy_exe = find_program('arm-none-eabi-objcopy', native: true) # Subproject tools +makelcf_exe = find_program('makelcf', native: true) nitrogfx_exe = find_program('nitrogfx', native: true) nitrorom_exe = find_program('nitrorom', native: true) narc_exe = find_program('narc', native: true)