chiark / gitweb /
65f4e01c2340077b9ce9b876905e546f0d90da87
[elogind.git] / udev_libc_wrapper.h
1 /*
2  * udev_libc_wrapper - wrapping of functions missing in a specific libc
3  *                     or not working in a statically compiled binary
4  *
5  * Copyright (C) 2005 Kay Sievers <kay.sievers@vrfy.org>
6  *
7  *      This program is free software; you can redistribute it and/or modify it
8  *      under the terms of the GNU General Public License as published by the
9  *      Free Software Foundation version 2 of the License.
10  * 
11  *      This program is distributed in the hope that it will be useful, but
12  *      WITHOUT ANY WARRANTY; without even the implied warranty of
13  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  *      General Public License for more details.
15  * 
16  *      You should have received a copy of the GNU General Public License along
17  *      with this program; if not, write to the Free Software Foundation, Inc.,
18  *      675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  */
21
22 #ifndef _UDEV_LIBC_WRAPPER_H_
23 #define _UDEV_LIBC_WRAPPER_H_
24
25 #ifdef asmlinkage
26 # undef asmlinkage
27 #endif
28 #ifdef __i386__
29 # define asmlinkage     __attribute__((regparm(0)))
30 #endif
31 #ifndef asmlinkage
32 # define asmlinkage
33 #endif
34
35 #include <string.h>
36
37 extern uid_t lookup_user(const char *user);
38 extern gid_t lookup_group(const char *group);
39
40 #ifndef strlcat
41 extern size_t strlcpy(char *dst, const char *src, size_t size);
42 #endif
43
44 #ifndef strlcat
45 extern size_t strlcat(char *dst, const char *src, size_t size);
46 #endif
47
48 #endif /* _UDEV_LIBC_WRAPPER_H_ */