~ubuntu-branches/ubuntu/trusty/kstart/trusty-proposed

« back to all changes in this revision

Viewing changes to portable/kafs.h

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-04-23 14:25:55 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080423142555-5vrmy64hjq4w54wh
Tags: 3.12-1
* New upstream release.
  - krenew now copies the ticket cache when running a command.
  - Fix command-line parsing problems in k4start and k5start.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  $Id: kafs.h 2998 2007-03-03 08:40:31Z rra $
2
 
**
3
 
**  Portability wrapper around the kafs API.
4
 
**
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.
9
 
*/
 
1
/* $Id: kafs.h 4064 2008-04-09 22:00:21Z rra $
 
2
 *
 
3
 * Portability wrapper around the kafs API.
 
4
 *
 
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
 
9
 * that always succeed.
 
10
 *
 
11
 * Written by Russ Allbery <rra@stanford.edu>
 
12
 * Copyright 2006, 2007, 2008
 
13
 *     Board of Trustees, Leland Stanford Jr. University
 
14
 *
 
15
 * See LICENSE for licensing terms.
 
16
 */
10
17
 
11
18
#ifndef PORTABLE_KAFS_H
12
19
#define PORTABLE_KAFS_H 1
13
20
 
14
 
#if HAVE_K_SETPAG
 
21
#include <config.h>
 
22
#include <portable/macros.h>
 
23
 
 
24
#include <errno.h>
 
25
 
 
26
BEGIN_DECLS
 
27
 
 
28
#if HAVE_K_HASAFS
15
29
# if HAVE_KAFS_H
16
30
#  include <kafs.h>
 
31
# elif HAVE_KOPENAFS_H
 
32
#  include <kopenafs.h>
17
33
# endif
18
34
#elif HAVE_LSETPAG
 
35
# if HAVE_AFS_AFSSYSCALLS_H
 
36
#  include <afs/afssyscalls.h>
 
37
# else
19
38
int lsetpag(void);
 
39
# endif
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)
 
44
int k_hasafs(void);
 
45
int k_setpag(void);
 
46
int k_unlog(void);
22
47
#else
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)
25
51
#endif
26
52
 
 
53
END_DECLS
 
54
 
27
55
#endif /* PORTABLE_KAFS_H */