1
/* $Id: kafs.h 2998 2007-03-03 08:40:31Z rra $
3
** Portability wrapper around the kafs API.
5
** This header includes kafs.h if it's available, provides k_hasafs and
6
** k_setpag replacements imlemented in terms of lsetpag if it is available
7
** and libkafs isn't, and as a last resort provides a k_hasafs function that
8
** always fails and a k_setpag function that always succeeds.
1
/* $Id: kafs.h 4064 2008-04-09 22:00:21Z rra $
3
* Portability wrapper around the kafs API.
5
* This header includes kafs.h if it's available, provides k_hasafs, k_setpag,
6
* and k_unlog replacements imlemented in terms of our system call layer or
7
* lsetpag if it is available and libkafs isn't, and as a last resort provides
8
* a k_hasafs function that always fails and k_setpag and k_unlog functions
11
* Written by Russ Allbery <rra@stanford.edu>
12
* Copyright 2006, 2007, 2008
13
* Board of Trustees, Leland Stanford Jr. University
15
* See LICENSE for licensing terms.
11
18
#ifndef PORTABLE_KAFS_H
12
19
#define PORTABLE_KAFS_H 1
22
#include <portable/macros.h>
31
# elif HAVE_KOPENAFS_H
32
# include <kopenafs.h>
35
# if HAVE_AFS_AFSSYSCALLS_H
36
# include <afs/afssyscalls.h>
20
40
# define k_hasafs() (1)
21
41
# define k_setpag() lsetpag()
42
# define k_unlog() (errno = ENOSYS, -1)
43
#elif defined(HAVE_AFS_PARAM_H) || defined(HAVE_LINUX_AFS)
23
# define k_hasafs() (1)
24
# define k_setpag() (0)
48
# define k_hasafs() (0)
49
# define k_setpag() (errno = ENOSYS, -1)
50
# define k_unlog() (errno = ENOSYS, -1)
27
55
#endif /* PORTABLE_KAFS_H */