Mercurial > hg > octave-shane > gnulib-hg
annotate lib/se-context.in.h @ 15727:144db791c6fa
Ensure EBADF returns for socket functions on mingw.
* lib/accept.c (rpl_accept): Fail with error EBADF if the file
descriptor is invalid.
* lib/bind.c (rpl_bind): Likewise.
* lib/connect.c (rpl_connect): Likewise.
* lib/getpeername.c (rpl_getpeername): Likewise.
* lib/getsockname.c (rpl_getsockname): Likewise.
* lib/getsockopt.c (rpl_getsockopt): Likewise.
* lib/listen.c (rpl_listen): Likewise.
* lib/recv.c (rpl_recv): Likewise.
* lib/recvfrom.c (rpl_recvfrom): Likewise.
* lib/send.c (rpl_send): Likewise.
* lib/sendto.c (rpl_sendto): Likewise.
* lib/setsockopt.c (rpl_setsockopt): Likewise.
* lib/shutdown.c (rpl_shutdown): Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 21 Sep 2011 00:20:59 +0200 |
parents | 92194f05b35f |
children | 661d79eb6d77 |
rev | line source |
---|---|
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
1 #ifndef SELINUX_CONTEXT_H |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
2 # define SELINUX_CONTEXT_H |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
3 |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
4 # include <errno.h> |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
5 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
6 /* The definition of _GL_UNUSED_PARAMETER is copied here. */ |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
7 |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
8 typedef int context_t; |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
9 static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
10 { errno = ENOTSUP; return 0; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
11 static inline char *context_str (context_t con _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
12 { errno = ENOTSUP; return (void *) 0; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
13 static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {} |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
14 |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
15 static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
16 char const *s _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
17 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
18 static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
19 char const *s _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
20 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
21 static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
22 char const *s _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
23 { errno = ENOTSUP; return -1; } |
12503
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
24 static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER, |
92194f05b35f
selinux-h: Make generated .h files standalone.
Bruno Haible <bruno@clisp.org>
parents:
12482
diff
changeset
|
25 char const *s _GL_UNUSED_PARAMETER) |
10694
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
26 { errno = ENOTSUP; return -1; } |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
27 |
b2b4c17db720
selinux-h: new module (from coreutils/gl/)
Jim Meyering <meyering@redhat.com>
parents:
diff
changeset
|
28 #endif |