<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/time, 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>Better checking for shm_open() during configure.</title>
<updated>2017-09-27T15:34:23+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2017-09-27T15:34:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=aac0f06f3d548cf02107687d637c25e54b186b68'/>
<id>aac0f06f3d548cf02107687d637c25e54b186b68</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>
