<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git, branch cmn/allocator-init-order</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>alloc: don't overwrite allocator during init if set</title>
<updated>2018-07-15T15:30:04+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2018-07-15T15:30:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=19007b19b70504a3964f5d8320d0ef39c01ce6b0'/>
<id>19007b19b70504a3964f5d8320d0ef39c01ce6b0</id>
<content type='text'>
If the allocator has been set before we the library is initialised, we would
replace that setting with the standard allocator contrary to the user's wishes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the allocator has been set before we the library is initialised, we would
replace that setting with the standard allocator contrary to the user's wishes.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4700 from pks-t/pks/std-c90</title>
<updated>2018-07-14T13:00:26+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-07-14T13:00:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=2510268a269cd79e5cfa68ce8f56e540131f3b6d'/>
<id>2510268a269cd79e5cfa68ce8f56e540131f3b6d</id>
<content type='text'>
C90 standard compliance</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
C90 standard compliance</pre>
</div>
</content>
</entry>
<entry>
<title>cmake: enforce C90 standard</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T09:58:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=e1a4a8ebfc5f5f138cb200f620eac73913cbe0f6'/>
<id>e1a4a8ebfc5f5f138cb200f620eac73913cbe0f6</id>
<content type='text'>
While the aim of libgit2 was to conform to C90 code, we never instructed
the compiler to enforce C90 compliance. Thus, quite a few violations
were able to get into our code base, which have been removed with the
previous commits. As we are now able to build libgit2 with C90 enforced,
we can set the C_STANDARD property for our own build targets.

Note that we explicitly avoid setting the C standard for our third-party
dependencies. At least the zlib target does not build with C90 enforced,
and we do not want to fix them by deviating from upstream. Thus we
simply enforce no standard for them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While the aim of libgit2 was to conform to C90 code, we never instructed
the compiler to enforce C90 compliance. Thus, quite a few violations
were able to get into our code base, which have been removed with the
previous commits. As we are now able to build libgit2 with C90 enforced,
we can set the C_STANDARD property for our own build targets.

Note that we explicitly avoid setting the C standard for our third-party
dependencies. At least the zlib target does not build with C90 enforced,
and we do not want to fix them by deviating from upstream. Thus we
simply enforce no standard for them.
</pre>
</div>
</content>
</entry>
<entry>
<title>mbedtls: fix `inline` being used in mbedtls headers</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T12:57:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=d19381e25e46db07617f91627a9fdc66b88aa0b3'/>
<id>d19381e25e46db07617f91627a9fdc66b88aa0b3</id>
<content type='text'>
The mbedtls headers make direct use of the `inline` attribute to
instruct the compiler to inline functions. As this function is not C90
compliant, this can cause the compiler to error as soon as any of these
files is included and the `-std=c90` flag is being added.

The mbedtls headers declaring functions as inline always have a prelude
which define `inline` as a macro in case it is not yet defined. Thus, we
can easily replace their define with our own define, which simply copies
the logic of our own `GIT_INLINE` macro.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The mbedtls headers make direct use of the `inline` attribute to
instruct the compiler to inline functions. As this function is not C90
compliant, this can cause the compiler to error as soon as any of these
files is included and the `-std=c90` flag is being added.

The mbedtls headers declaring functions as inline always have a prelude
which define `inline` as a macro in case it is not yet defined. Thus, we
can easily replace their define with our own define, which simply copies
the logic of our own `GIT_INLINE` macro.
</pre>
</div>
</content>
</entry>
<entry>
<title>cmake: distinguish internal and system include directories</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T12:12:53+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=c13e56f91c3a15dd47b9543984e763ab74270aa9'/>
<id>c13e56f91c3a15dd47b9543984e763ab74270aa9</id>
<content type='text'>
While we want to enforce strict C90 mode, this may cause issues with
system provided header files which are themselves not strictly
conforming. E.g. if a system header has C++ style comments, a compiler
in strict C90 mode would produce an error and abort the build. As the
user most likely doesn't want to change the system header, this would
completely break the build on such systems. One example of this is
mbedtls, which provides such header files.

The problem can be worked around by distinguishing between
system-provided and project-provided include directories. When adding
include directories via "-isystem" instead of "-I", the compiler will
skip certain checks and print out less warnings. To use system includes,
we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and
`TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the
include directories into two variables because of this, as we definitely
still want to check for all warnings produced by our own header files.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
While we want to enforce strict C90 mode, this may cause issues with
system provided header files which are themselves not strictly
conforming. E.g. if a system header has C++ style comments, a compiler
in strict C90 mode would produce an error and abort the build. As the
user most likely doesn't want to change the system header, this would
completely break the build on such systems. One example of this is
mbedtls, which provides such header files.

The problem can be worked around by distinguishing between
system-provided and project-provided include directories. When adding
include directories via "-isystem" instead of "-I", the compiler will
skip certain checks and print out less warnings. To use system includes,
we can simply add the "SYSTEM" flag to CMake's `INCLUDE_DIRECTORIES` and
`TARGET_INCLUDE_DIRECTORIES` functions. Note that we have to split the
include directories into two variables because of this, as we definitely
still want to check for all warnings produced by our own header files.
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: remove use of C++ style comments</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T09:56:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a'/>
<id>9994cd3f0ffcd7b28d26c82ecb6564bc4072dc2a</id>
<content type='text'>
C++ style comment ("//") are not specified by the ISO C90 standard and
thus do not conform to it. While libgit2 aims to conform to C90, we did
not enforce it until now, which is why quite a lot of these
non-conforming comments have snuck into our codebase. Do a tree-wide
conversion of all C++ style comments to the supported C style comments
to allow us enforcing strict C90 compliance in a later commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
C++ style comment ("//") are not specified by the ISO C90 standard and
thus do not conform to it. While libgit2 aims to conform to C90, we did
not enforce it until now, which is why quite a lot of these
non-conforming comments have snuck into our codebase. Do a tree-wide
conversion of all C++ style comments to the supported C style comments
to allow us enforcing strict C90 compliance in a later commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: avoid use of `inline` attribute</title>
<updated>2018-07-13T06:25:12+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2018-06-25T09:55:13+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=f347a441c81c4e16dd54de07c5070eca8fccd5c8'/>
<id>f347a441c81c4e16dd54de07c5070eca8fccd5c8</id>
<content type='text'>
ISO C90 does not specify the `inline` attribute, and as such we cannot
use it in our code. While we already use `__inline` when building in
Microsoft Visual Studio, we should also be using the `__inline__`
attribute from GCC/Clang. Otherwise, if we're using neither MSVC nor
GCC/Clang, we should simply avoid using `inline` at all and just define
functions as static.

This commit adjusts our own `GIT_INLINE` macro as well as the inline
macros specified by khash and xdiff. This allows us to enable strict C90
mode in a later commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ISO C90 does not specify the `inline` attribute, and as such we cannot
use it in our code. While we already use `__inline` when building in
Microsoft Visual Studio, we should also be using the `__inline__`
attribute from GCC/Clang. Otherwise, if we're using neither MSVC nor
GCC/Clang, we should simply avoid using `inline` at all and just define
functions as static.

This commit adjusts our own `GIT_INLINE` macro as well as the inline
macros specified by khash and xdiff. This allows us to enable strict C90
mode in a later commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4719 from pks-t/pks/delta-oob</title>
<updated>2018-07-09T22:10:05+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-07-09T22:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=6dfc8bc2499db78eae4e29dd121c75121f0e8baf'/>
<id>6dfc8bc2499db78eae4e29dd121c75121f0e8baf</id>
<content type='text'>
Delta OOB access</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Delta OOB access</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4710 from pks-t/pks/ssl-init-errors</title>
<updated>2018-07-08T14:28:50+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-07-08T14:28:50+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=290292b4b20f36920ff1ce1f079c6cf216eb8605'/>
<id>290292b4b20f36920ff1ce1f079c6cf216eb8605</id>
<content type='text'>
streams: report OpenSSL errors if global init fails</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
streams: report OpenSSL errors if global init fails</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #4687 from tiennou/fix/4672</title>
<updated>2018-07-06T11:36:05+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-07-06T11:36:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=f4633791104fa5be75115fd4c7fab0c097da345e'/>
<id>f4633791104fa5be75115fd4c7fab0c097da345e</id>
<content type='text'>
patch_parse: populate line numbers while parsing diffs</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
patch_parse: populate line numbers while parsing diffs</pre>
</div>
</content>
</entry>
</feed>
