diff --git a/README.md b/README.md index 006b073..caf4667 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,8 @@ To build the STL tools, you need: Not so recent C compilers might also work (not tested). +## Linux / macOS + ```shell #Download source code git clone https://github.com/openitu/STL @@ -26,16 +28,40 @@ git clone https://github.com/openitu/STL cd STL #Generate platform dependent build scripts using CMake -#For using a specific generator see CMake parameter "-G" cmake . -##Build STL tools +#Build STL tools cmake --build . -##Run tests (optional) +#Run tests (optional) ctest ``` +## Windows + +Prerequisites: +* Visual Studio with the **"Desktop development with C++"** workload installed +* CMake (included with Visual Studio, or install separately) + +```powershell +#Download source code +git clone https://github.com/openitu/STL + +#Enter directory +cd STL + +#Generate Visual Studio project files (adjust version as needed) +cmake -G "Visual Studio 18 2026" . + +#Build STL tools +cmake --build . --config Release + +#Run tests (optional) +ctest -C Release +``` + +> **Note:** On Windows, you must specify a configuration (`Release` or `Debug`) for both the build and test steps. + # Licenses The STL, and all of its derivations, is subject to the "ITU-T General Public License", which is a modified version of the GPL1. Please read the file `LICENSE.md` for the terms and conditions. diff --git a/src/eid/softbit.h b/src/eid/softbit.h index 02b396d..4cf067d 100644 --- a/src/eid/softbit.h +++ b/src/eid/softbit.h @@ -16,7 +16,7 @@ /* ......... Smart prototypes .......... */ #ifndef ARGS -#if (defined(__STDC__) || defined(VMS) || defined(__DECC) || defined(MSDOS) || defined(__MSDOS__)) +#if (defined(__STDC__) || defined(VMS) || defined(__DECC) || defined(MSDOS) || defined(__MSDOS__) || defined(_MSC_VER)) #define ARGS(x) x #else #define ARGS(x) () diff --git a/src/mnru/p50fbmnru.c b/src/mnru/p50fbmnru.c index 5d58e51..e850a0c 100644 --- a/src/mnru/p50fbmnru.c +++ b/src/mnru/p50fbmnru.c @@ -14,8 +14,12 @@ #define random_MNRU new_random_MNRU /* Defines minimum and maximum value for a short int. */ +#ifndef SHRT_MIN #define SHRT_MIN -32768 +#endif +#ifndef SHRT_MAX #define SHRT_MAX +32767 +#endif void show_use(void) {