Skip to content

Commit 0ca3867

Browse files
committed
Update documentation w/regard to C11 compatibility discovery
[skip ci]
1 parent d3c1499 commit 0ca3867

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ In addition, please make sure:
2525

2626
- You commit files with Unix Line-endings (`\n` `<LF>` `0x0a`)
2727
- Each text file committed has a trailing newline at the end
28+
- Your C code is compliant to the ISO C99 and C11 standards
2829
- C source code is indented with 4 spaces per indentation level (no tabs)
2930
- Public functions are prototyped in the correct C Header file, all private declarations are declared `static`
3031
- Every public function (and ideally private too) has an accompanying explanatory comment

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ Libsaxbospiral can be built without installing for test purposes and for general
4242

4343
You will need:
4444

45-
- A compiler that can compile ISO C99 code
45+
- A compiler that can compile ISO C99 or C11 code
4646
- [Cmake](https://cmake.org/) - v3.0 or newer
4747
- [libpng](http://www.libpng.org/pub/png/libpng.html) - (this often comes preinstalled with many modern unix-like systems)
4848

4949
> ### Note:
5050
5151
> These commands are for unix-like systems, without an IDE or other build system besides CMake. If building for a different system, or within an IDE or other environment, consult your IDE/System documentation on how to build CMake projects.
5252
53-
> Additionally, it is of worth noting that this library has only been thoroughly tested and developed on **Ubuntu GNU/Linux** with **GCC v5.4.0** and **Clang 3.8.0**. Although every effort has been made to make it as cross-platform as possible (including quite strict **ISO C 99** compliance), **Your Mileage May Vary**. Bug Reports and Patches for problems running on other systems, particularly **Microsoft Windows** and **Mac OSX** are most welcome.
53+
> Additionally, it is of worth noting that this library has only been thoroughly tested and developed on **Ubuntu GNU/Linux** with **GCC v5.4.0** and **Clang 3.8.0**. Although every effort has been made to make it as cross-platform as possible (including quite strict **ISO C99** and **ISO C11** compliance), **Your Mileage May Vary**. Bug Reports and Patches for problems running on other systems, particularly **Microsoft Windows** and **Mac OSX** are most welcome.
5454
5555
### Recommended Library Build
5656

@@ -61,6 +61,14 @@ cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
6161
make
6262
```
6363

64+
The above builds in C99 mode by default. The standard to use is controlled by the `LIBSAXBOSPIRAL_C_STANDARD` environment variable.
65+
66+
You can build in C11 mode if you want with the following:
67+
68+
```sh
69+
LIBSAXBOSPIRAL_C_STANDARD=11 cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON .
70+
```
71+
6472
> ### Note:
6573
6674
> Building as a shared library is recommended as then binaries compiled from [sxbp](https://github.com/saxbophone/sxbp) or your own programs that are linked against the shared version can immediately use any installed upgraded versions of libsaxbospiral with compatible ABIs without needing re-compiling.

0 commit comments

Comments
 (0)