1 | /* $Id: kHlpSys.h 2 2007-11-16 16:07:14Z bird $ */
|
---|
2 | /** @file
|
---|
3 | * kHlpSys - System Call Prototypes.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
|
---|
8 | *
|
---|
9 | * This file is part of kStuff.
|
---|
10 | *
|
---|
11 | * kStuff is free software; you can redistribute it and/or modify
|
---|
12 | * it under the terms of the GNU Lesser General Public License as published
|
---|
13 | * by the Free Software Foundation; either version 2 of the License, or
|
---|
14 | * (at your option) any later version.
|
---|
15 | *
|
---|
16 | * kStuff is distributed in the hope that it will be useful,
|
---|
17 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
18 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
19 | * GNU Lesser General Public License for more details.
|
---|
20 | *
|
---|
21 | * You should have received a copy of the GNU Lesser General Public License
|
---|
22 | * along with kStuff; if not, write to the Free Software
|
---|
23 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
24 | *
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef ___k_kHlpSys_h___
|
---|
28 | #define ___k_kHlpSys_h___
|
---|
29 |
|
---|
30 | #include <k/kHlpDefs.h>
|
---|
31 | #include <k/kTypes.h>
|
---|
32 |
|
---|
33 | /** @defgroup grp_kHlpSys kHlpSys - System Call Prototypes
|
---|
34 | * @addtogroup grp_kHlp
|
---|
35 | * @{*/
|
---|
36 |
|
---|
37 | #ifdef __cplusplus
|
---|
38 | extern "C" {
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | /* common unix stuff. */
|
---|
42 | #if K_OS == K_OS_DARWIN \
|
---|
43 | || K_OS == K_OS_FREEBSD \
|
---|
44 | || K_OS == K_OS_LINUX \
|
---|
45 | || K_OS == K_OS_NETBSD \
|
---|
46 | || K_OS == K_OS_OPENBSD \
|
---|
47 | || K_OS == K_OS_SOLARIS
|
---|
48 | KSSIZE kHlpSys_readlink(const char *pszPath, char *pszBuf, KSIZE cbBuf);
|
---|
49 | int kHlpSys_open(const char *filename, int flags, int mode);
|
---|
50 | int kHlpSys_close(int fd);
|
---|
51 | KFOFF kHlpSys_lseek(int fd, int whench, KFOFF off);
|
---|
52 | KSSIZE kHlpSys_read(int fd, void *pvBuf, KSIZE cbBuf);
|
---|
53 | KSSIZE kHlpSys_write(int fd, const void *pvBuf, KSIZE cbBuf);
|
---|
54 | void *kHlpSys_mmap(void *addr, KSIZE len, int prot, int flags, int fd, KI64 off);
|
---|
55 | int kHlpSys_mprotect(void *addr, KSIZE len, int prot);
|
---|
56 | int kHlpSys_munmap(void *addr, KSIZE len);
|
---|
57 | void kHlpSys_exit(int rc);
|
---|
58 | #endif
|
---|
59 |
|
---|
60 | /* specific */
|
---|
61 | #if K_OS == K_OS_DARWIN
|
---|
62 |
|
---|
63 | #elif K_OS == K_OS_LINUX
|
---|
64 |
|
---|
65 | #endif
|
---|
66 |
|
---|
67 | #ifdef __cplusplus
|
---|
68 | }
|
---|
69 | #endif
|
---|
70 |
|
---|
71 | /** @} */
|
---|
72 |
|
---|
73 | #endif
|
---|
74 |
|
---|
75 |
|
---|