Mercurial > hg > octave-lojdl > gnulib-hg
annotate lib/priv-set.h @ 17426:90f3d53e01f5
sig2str: port to C++
* lib/sig2str.h (sig2str, str2sig): Declare as extern "C".
Reported by Daniel J Sebald in
<http://lists.gnu.org/archive/html/bug-gnulib/2013-06/msg00000.html>.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sun, 02 Jun 2013 11:52:41 -0700 |
parents | e542fd46ad6f |
children |
rev | line source |
---|---|
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
1 /* Query, remove, or restore a Solaris privilege. |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
2 |
17249
e542fd46ad6f
maint: update all copyright year number ranges
Eric Blake <eblake@redhat.com>
parents:
17098
diff
changeset
|
3 Copyright (C) 2009-2013 Free Software Foundation, Inc. |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
4 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
5 This program is free software: you can redistribute it and/or modify |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
6 it under the terms of the GNU General Public License as published by |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
7 the Free Software Foundation; either version 3 of the License, or |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
8 (at your option) any later version. |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
9 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
10 This program is distributed in the hope that it will be useful, |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
11 but WITHOUT ANY WARRANTY; without even the implied warranty of |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
13 GNU General Public License for more details. |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
14 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
15 You should have received a copy of the GNU General Public License |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
16 along with this program. If not, see <http://www.gnu.org/licenses/>. |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
17 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
18 Written by David Bartley. */ |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
19 |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
20 _GL_INLINE_HEADER_BEGIN |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
21 #ifndef PRIV_SET_INLINE |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
22 # define PRIV_SET_INLINE _GL_INLINE |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
23 #endif |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
24 |
13422
e81addc3d284
priv-set: Don't assume that priv.h exists merely because getppriv does.
Paul Eggert <eggert@cs.ucla.edu>
parents:
12559
diff
changeset
|
25 #if HAVE_GETPPRIV && HAVE_PRIV_H |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
26 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
27 # include <priv.h> |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
28 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
29 int priv_set_ismember (const char *priv); |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
30 int priv_set_remove (const char *priv); |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
31 int priv_set_restore (const char *priv); |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
32 |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
33 PRIV_SET_INLINE int |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
34 priv_set_remove_linkdir (void) |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
35 { |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
36 return priv_set_remove (PRIV_SYS_LINKDIR); |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
37 } |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
38 |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
39 PRIV_SET_INLINE int |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
40 priv_set_restore_linkdir (void) |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
41 { |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
42 return priv_set_restore (PRIV_SYS_LINKDIR); |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
43 } |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
44 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
45 #else |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
46 |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
47 PRIV_SET_INLINE int |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
48 priv_set_remove_linkdir (void) |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
49 { |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
50 return -1; |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
51 } |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
52 |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
53 PRIV_SET_INLINE int |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
54 priv_set_restore_linkdir (void) |
11538
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
55 { |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
56 return -1; |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
57 } |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
58 |
af683213eeb0
priv-set: new module and accompanying tests; adapt write-any-file
David Bartley <dtbartle@csclub.uwaterloo.ca>
parents:
diff
changeset
|
59 #endif |
17098
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
60 |
16d02df1b46e
acl, mbchar, priv-set: use extern-inline
Paul Eggert <eggert@cs.ucla.edu>
parents:
16201
diff
changeset
|
61 _GL_INLINE_HEADER_END |