/[path-sandbox]/trunk/libsandbox/wrappers.h
Gentoo

Contents of /trunk/libsandbox/wrappers.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 320 - (show annotations) (download) (as text)
Mon Jul 10 17:18:38 2006 UTC (12 years, 5 months ago) by azarah
File MIME type: text/x-chdr
File size: 1364 byte(s)
Move the FUNCTION_SANDBOX_SAFE* macro's to libsandbox.h where they are more appropriate.

1 /*
2 * wrappers.h
3 *
4 * Function wrapping functions.
5 *
6 * Copyright 1999-2006 Gentoo Foundation
7 *
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation version 2 of the License.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program; if not, write to the Free Software Foundation, Inc.,
20 * 675 Mass Ave, Cambridge, MA 02139, USA.
21 *
22 * $Header$
23 */
24
25 #ifndef __WRAPPERS_H__
26 #define __WRAPPERS_H__
27
28 #include <libsandbox.h>
29
30 /* Macro to check if a wrapper is defined, if not
31 * then try to resolve it again. */
32 #define check_dlsym(_name) \
33 { \
34 int old_errno = errno; \
35 if (!true_ ## _name) \
36 true_ ## _name = get_dlsym(symname_ ## _name, symver_ ## _name); \
37 errno = old_errno; \
38 }
39
40 void *get_dlsym(const char *, const char *);
41
42 /* Wrapper for internal use of functions in libsandbox */
43 int libsb_open(const char *, int, ...);
44 char *libsb_getcwd(char *, size_t);
45
46 #endif /* __WRAPPERS_H__ */
47

  ViewVC Help
Powered by ViewVC 1.1.20