]> arthur.barton.de Git - netatalk.git/blob - etc/cnid_dbd/usockfd.h
fix a signed/unsigned, 16/32 bits mismatch. from Burkhard Schmidt, bs at cpfs.mpg.de.
[netatalk.git] / etc / cnid_dbd / usockfd.h
1 /*
2  * $Id: usockfd.h,v 1.1.4.5 2004-09-06 07:19:22 didg Exp $
3  *
4  * Copyright (C) Joerg Lenneis 2003
5  * All Rights Reserved.  See COPYING.
6  */
7
8 #ifndef CNID_DBD_USOCKFD_H
9 #define CNID_DBD_USOCKFD_H 1
10
11
12
13 #include <atalk/cnid_dbd_private.h>
14
15
16 extern int      usockfd_create  __P((char *, mode_t, int));
17 extern int      tsockfd_create  __P((char *, u_int16_t, int));
18 extern int      usockfd_check   __P((int, unsigned long));
19
20 #ifndef OSSH_ALIGNBYTES
21 #define OSSH_ALIGNBYTES (sizeof(int) - 1)
22 #endif
23 #ifndef __CMSG_ALIGN
24 #ifndef u_int
25 #define u_int unsigned int
26 #endif
27 #define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
28 #endif
29
30 /* Length of the contents of a control message of length len */
31 #ifndef CMSG_LEN
32 #define CMSG_LEN(len)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
33 #endif
34
35 /* Length of the space taken up by a padded control message of length len */
36 #ifndef CMSG_SPACE
37 #define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
38 #endif
39
40
41
42 #endif /* CNID_DBD_USOCKFD_H */