<feed xmlns='http://www.w3.org/2005/Atom'>
<title>fortify-headers/include/fortify-headers.h, branch experimental</title>
<subtitle>Standalone portable header-based implementation of FORTIFY_SOURCE=3 
</subtitle>
<id>http://git.dustri.org/fortify-headers/atom?h=experimental</id>
<link rel='self' href='http://git.dustri.org/fortify-headers/atom?h=experimental'/>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/'/>
<updated>2025-10-28T22:16:05Z</updated>
<entry>
<title>Fix possible cast-mismatch spotted by `-Werror=cast-qual`</title>
<updated>2025-10-28T22:16:05Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:16:05Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=05baf9cfe90c25b02652489c6dd75810600ead5e'/>
<id>urn:sha1:05baf9cfe90c25b02652489c6dd75810600ead5e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use C90-compliant comments</title>
<updated>2025-10-28T22:13:42Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2025-10-28T22:13:42Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8a43ce98138d363b6595a16b98b6016c5e306191'/>
<id>urn:sha1:8a43ce98138d363b6595a16b98b6016c5e306191</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fortify-headers: Remove __fh_has_builtin()</title>
<updated>2025-10-28T19:09:50Z</updated>
<author>
<name>Hauke Mehrtens</name>
</author>
<published>2025-10-26T22:16:01Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=4b6225cf322adf3e47425156e00a844b2f08e221'/>
<id>urn:sha1:4b6225cf322adf3e47425156e00a844b2f08e221</id>
<content type='text'>
GCC complains about the `defined` usage here. Just call `__has_builtin` directly.

This fixes the following compile error when compiling strace:
```
In file included from /home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/stdlib.h:27,
                 from number_set.c:14:
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:28:7: note: in expansion of macro '__fh_has_builtin'
   28 | #if ! __fh_has_builtin(__builtin_trap)
      |       ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:73:29: note: in expansion of macro '__fh_has_builtin'
   73 | #if _FORTIFY_SOURCE  &gt; 2 &amp;&amp; __fh_has_builtin (__builtin_dynamic_object_size)
      |                             ^~~~~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:26:30: error: this use of "defined" may not be portable [-Werror=expansion-to-defined]
   26 | #define __fh_has_builtin(x) (__has_builtin(x) || defined(x))
      |                              ^~~~~~~~~~~~~
/home/hauke/openwrt/openwrt/staging_dir/toolchain-aarch64_generic_gcc-14.3.0_musl/include/fortify/fortify-headers.h:158:5: note: in expansion of macro '__fh_has_builtin'
  158 | #if __fh_has_builtin (__builtin_mul_overflow_p)
      |     ^~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

Signed-off-by: Hauke Mehrtens &lt;hauke@hauke-m.de&gt;
</content>
</entry>
<entry>
<title>Fix some pointer-arithmetic warnings</title>
<updated>2024-06-15T13:46:35Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-06-14T17:46:14Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=520e7e4a631cc038b3e867b2255235da35a98ece'/>
<id>urn:sha1:520e7e4a631cc038b3e867b2255235da35a98ece</id>
<content type='text'>
This should fix the second part of #59
</content>
</entry>
<entry>
<title>Fix some overlap mismatch</title>
<updated>2024-04-24T15:14:46Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-04-24T15:09:08Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=a817e1555a755224cacc1cbdeeaefb6a1de606f0'/>
<id>urn:sha1:a817e1555a755224cacc1cbdeeaefb6a1de606f0</id>
<content type='text'>
This was caught by the following test:

```

int main(void) {
    char c[32];
    memcpy(c, c + 16, 16);
}
```

Reported-by: q66
</content>
</entry>
<entry>
<title>Properly check for builtins</title>
<updated>2024-01-13T19:34:19Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2024-01-13T19:34:19Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=1a8431430ec4b97f0baaf2bf3b385be5f5da08cf'/>
<id>urn:sha1:1a8431430ec4b97f0baaf2bf3b385be5f5da08cf</id>
<content type='text'>
Clang's [documentation](https://clang.llvm.org/docs/LanguageExtensions.html#has-builtin) says:

 &gt; __has_builtin should not be used to detect support for a builtin macro; use #ifdef instead.

So we're now using both, since it's often tedious/non-trivial to find out
what is a macro and what is a compiler builtin, across compilers and C
versions.
</content>
</entry>
<entry>
<title>Improve __fh_overlap implementation</title>
<updated>2023-12-27T15:17:55Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-12-27T15:17:55Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=8513fddefca4c6e3982718732afeec71bad4e688'/>
<id>urn:sha1:8513fddefca4c6e3982718732afeec71bad4e688</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rename some macros to be more namespace-friendly</title>
<updated>2023-12-15T22:50:43Z</updated>
<author>
<name>q66</name>
</author>
<published>2023-12-15T22:48:58Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=a018052d410126f94c2602b208b099839d333b05'/>
<id>urn:sha1:a018052d410126f94c2602b208b099839d333b05</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Do not use static inline for C++ to avoid ODR violations</title>
<updated>2023-12-15T21:50:23Z</updated>
<author>
<name>q66</name>
</author>
<published>2023-12-15T21:42:34Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=c607773a80e6685ab4c922245c33cf2ea5dcfb72'/>
<id>urn:sha1:c607773a80e6685ab4c922245c33cf2ea5dcfb72</id>
<content type='text'>
Fixes https://github.com/jvoisin/fortify-headers/issues/31
</content>
</entry>
<entry>
<title>Remove superfluous includes</title>
<updated>2023-12-15T20:41:08Z</updated>
<author>
<name>jvoisin</name>
</author>
<published>2023-12-15T15:08:12Z</published>
<link rel='alternate' type='text/html' href='http://git.dustri.org/fortify-headers/commit/?id=57a3e9c1c7507b5ce56122429cc3649009a4ecc7'/>
<id>urn:sha1:57a3e9c1c7507b5ce56122429cc3649009a4ecc7</id>
<content type='text'>
This should fix #32
</content>
</entry>
</feed>
