<feed xmlns='http://www.w3.org/2005/Atom'>
<title>unit.git/auto/shmem, 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>Added support for shm_open(SHM_ANON) extension.</title>
<updated>2018-03-06T13:55:51+00:00</updated>
<author>
<name>Sergey Kandaurov</name>
<email>pluknet@nginx.com</email>
</author>
<published>2018-03-06T13:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=4f712e3fd0c2c8f1e91b11dce5596b995ef69985'/>
<id>4f712e3fd0c2c8f1e91b11dce5596b995ef69985</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed DragonFly BSD shared memory implementation.</title>
<updated>2018-01-11T14:13:58+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2018-01-11T14:13:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=c105988e5102eefd91fa8336848e926ebbb42a5b'/>
<id>c105988e5102eefd91fa8336848e926ebbb42a5b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</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>nginext has been renamed to unit.</title>
<updated>2017-08-30T21:42:16+00:00</updated>
<author>
<name>Igor Sysoev</name>
<email>igor@sysoev.ru</email>
</author>
<published>2017-08-30T21:42:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f0e9e3ace94c82fab78ab1d4ee8c3042f3e94fdf'/>
<id>f0e9e3ace94c82fab78ab1d4ee8c3042f3e94fdf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Store and use NXT_LIBRT for go module.</title>
<updated>2017-08-29T18:33:35+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2017-08-29T18:33:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=52ae0e69c14cb65223e23b533e0753fe8aa1e971'/>
<id>52ae0e69c14cb65223e23b533e0753fe8aa1e971</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Using shared memory to send data via nxt_port.</title>
<updated>2017-05-12T17:32:41+00:00</updated>
<author>
<name>Max Romanov</name>
<email>max.romanov@nginx.com</email>
</author>
<published>2017-05-12T17:32:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.sigsegv.uk/unit.git/commit/?id=f7b4bdfd892a0b479dc946896435a3ba7f9615dd'/>
<id>f7b4bdfd892a0b479dc946896435a3ba7f9615dd</id>
<content type='text'>
Usage:
    b = nxt_port_mmap_get_buf(task, port, size);
    b-&gt;mem.free = nxt_cpymem(b-&gt;mem.free, data, size);
    nxt_port_socket_write(task, port, NXT_PORT_MSG_DATA, -1, 0, b);
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Usage:
    b = nxt_port_mmap_get_buf(task, port, size);
    b-&gt;mem.free = nxt_cpymem(b-&gt;mem.free, data, size);
    nxt_port_socket_write(task, port, NXT_PORT_MSG_DATA, -1, 0, b);
</pre>
</div>
</content>
</entry>
</feed>
