<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/sendfile, branch gzip-v37</title>
<subtitle>Universal Web Application Server</subtitle>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/'/>
<entry>
<title>Fixed main() prototypes in auto tests.</title>
<updated>2022-10-28T02:17:31+00:00</updated>
<author>
<name>Andrew Clayton</name>
<email>a.clayton@nginx.com</email>
</author>
<published>2022-10-27T23:17:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=8f0dd9478e164121e31bebaf1c10dd6e537d2918'/>
<id>8f0dd9478e164121e31bebaf1c10dd6e537d2918</id>
<content type='text'>
Future releases of GCC are planning to remove[0] default support for
some old features that were removed from C99 but GCC still accepts.

We can test for these changes by using the following -Werror=
directives

  -Werror=implicit-int
  -Werror=implicit-function-declaration
  -Werror=int-conversion
  -Werror=strict-prototypes
  -Werror=old-style-definition

Doing so revealed an issue with the auto/ tests in that the test
programs always define main as

  int main()

rather than

  int main(void)

which results in a bunch of errors like

build/autotest.c:3:23: error: function declaration isn't a prototype [-Werror=strict-prototypes]
    3 |                   int main() {
      |                       ^~~~
build/autotest.c: In function 'main':
build/autotest.c:3:23: error: old-style function definition [-Werror=old-style-definition]

The fix was easy, it only required fixing the main prototype with

  find -type f -exec sed -i 's/int main() {/int main(void) {/g' {} \;

Regardless of these upcoming GCC changes, this is probably a good thing
to do anyway for correctness.

[0]: https://fedoraproject.org/wiki/Changes/PortingToModernC

Link: &lt;https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/&gt;
Link: &lt;https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6SGHPHPAXKCVJ6PUZ57WVDQ5TDBVIRMF/&gt;
Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Future releases of GCC are planning to remove[0] default support for
some old features that were removed from C99 but GCC still accepts.

We can test for these changes by using the following -Werror=
directives

  -Werror=implicit-int
  -Werror=implicit-function-declaration
  -Werror=int-conversion
  -Werror=strict-prototypes
  -Werror=old-style-definition

Doing so revealed an issue with the auto/ tests in that the test
programs always define main as

  int main()

rather than

  int main(void)

which results in a bunch of errors like

build/autotest.c:3:23: error: function declaration isn't a prototype [-Werror=strict-prototypes]
    3 |                   int main() {
      |                       ^~~~
build/autotest.c: In function 'main':
build/autotest.c:3:23: error: old-style function definition [-Werror=old-style-definition]

The fix was easy, it only required fixing the main prototype with

  find -type f -exec sed -i 's/int main() {/int main(void) {/g' {} \;

Regardless of these upcoming GCC changes, this is probably a good thing
to do anyway for correctness.

[0]: https://fedoraproject.org/wiki/Changes/PortingToModernC

Link: &lt;https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/CJXKTLXJUPZ4F2C2VQOTNMEA5JAUPMBD/&gt;
Link: &lt;https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/6SGHPHPAXKCVJ6PUZ57WVDQ5TDBVIRMF/&gt;
Reviewed-by: Alejandro Colomar &lt;alx@nginx.com&gt;
Signed-off-by: Andrew Clayton &lt;a.clayton@nginx.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Supporting platforms without sendfile() implementation.</title>
<updated>2020-08-17T09:28:48+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-08-17T09:28:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=7ffc617ae89fe08b8a9a17bed41ef8941b8151fb'/>
<id>7ffc617ae89fe08b8a9a17bed41ef8941b8151fb</id>
<content type='text'>
This is a quick and dirty sendfile() replacement.

This closes #452 PR on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a quick and dirty sendfile() replacement.

This closes #452 PR on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Checking sendfile() availability in configure.</title>
<updated>2020-03-17T11:44:06+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2020-03-17T11:44:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=efbcd517fc9ec1ef5a6dfe85cb79bf0a57b954c5'/>
<id>efbcd517fc9ec1ef5a6dfe85cb79bf0a57b954c5</id>
<content type='text'>
Removing SF_NODISKIO flag for FreeBSD sendfile() check because it
is not used yet and to support DragonFlyBSD.

This closes #414 issue on GitHub.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Removing SF_NODISKIO flag for FreeBSD sendfile() check because it
is not used yet and to support DragonFlyBSD.

This closes #414 issue on GitHub.
</pre>
</div>
</content>
</entry>
<entry>
<title>Initial version.</title>
<updated>2017-01-17T17:00:00+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2017-01-17T17:00:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=16cbf3c076a0aca6d47adaf3f719493674cf2363'/>
<id>16cbf3c076a0aca6d47adaf3f719493674cf2363</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
