]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[REORG] build: move syscall redefinition to specific places
authorWilly Tarreau <w@1wt.eu>
Mon, 22 Aug 2011 15:12:02 +0000 (17:12 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 22 Aug 2011 22:11:25 +0000 (00:11 +0200)
commit43d8fb2d3ad2192d5d59e189a49c060989b56927
tree058e212da97b7d0465f1e340e46abc9843a0cf46
parent87cf51406cea6d6861c8c2a04ffa8fc6be998ce8
[REORG] build: move syscall redefinition to specific places

Some older libc don't define splice() and and don't define _syscall*()
either, which causes build errors if splicing is enabled.

To solve this, we now split the syscall redefinition into two layers :
  - one file per syscall (epoll, splice)
  - one common file to declare the _syscall*() macros

The code is cleaner because files using the syscalls just have to include
their respective file. It's not adviced to merge multiple syscall families
into a same file if all are not intended to be used simultaneously, because
defining unused static functions causes warnings to be emitted during build.

As a result, the new USE_MY_SPLICE parameter was added in order to be able
to define the splice() syscall separately.
Makefile
include/common/epoll.h
include/common/splice.h [new file with mode: 0644]
include/common/syscall.h [new file with mode: 0644]
src/ev_epoll.c
src/ev_sepoll.c
src/stream_sock.c