syslog-ng source
pio.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2002-2013 Balabit
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17  *
18  * As an additional exemption you are allowed to compile & link against the
19  * OpenSSL libraries as published by the OpenSSL project. See the file
20  * COPYING for details.
21  *
22  */
23 #ifndef COMPAT_PIO_H_INCLUCED
24 #define COMPAT_PIO_H_INCLUDED 1
25 
26 #include "compat.h"
27 
28 #include <sys/types.h>
29 #include <unistd.h>
30 
31 /* NOTE: bb__ prefix is used for function names that might clash with system
32  * supplied symbols. */
33 
34 #if ! SYSLOG_NG_HAVE_PREAD || SYSLOG_NG_HAVE_BROKEN_PREAD
35 # ifdef pread
36 # undef pread
37 # endif
38 # ifdef pwrite
39 # undef pwrite
40 # endif
41 #define pread bb__pread
42 #define pwrite bb__pwrite
43 
44 ssize_t bb__pread(int fd, void *buf, size_t count, off_t offset);
45 ssize_t bb__pwrite(int fd, const void *buf, size_t count, off_t offset);
46 
47 #endif
48 
49 #endif
ssize_t bb__pread(int fd, void *buf, size_t count, off_t offset)
Definition: pio.c:33
ssize_t bb__pwrite(int fd, const void *buf, size_t count, off_t offset)
Definition: pio.c:55