]> arthur.barton.de Git - netatalk.git/blobdiff - 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
index eeb2b2c5f352c7ca51fa4f3cce0f8ecf17db6e44..03485b1e310cccdce1230bc1f0488a79d458e5f1 100644 (file)
@@ -1,8 +1,8 @@
 /*
- * $Id: usockfd.h,v 1.1.4.1 2003-09-09 16:42:20 didg Exp $
+ * $Id: usockfd.h,v 1.1.4.5 2004-09-06 07:19:22 didg Exp $
  *
  * Copyright (C) Joerg Lenneis 2003
- * All Rights Reserved.  See COPYRIGHT.
+ * All Rights Reserved.  See COPYING.
  */
 
 #ifndef CNID_DBD_USOCKFD_H
 
 
 extern int      usockfd_create  __P((char *, mode_t, int));
-extern int      tsockfd_create  __P((char *, int, int));
+extern int      tsockfd_create  __P((char *, u_int16_t, int));
 extern int      usockfd_check   __P((int, unsigned long));
 
+#ifndef OSSH_ALIGNBYTES
+#define OSSH_ALIGNBYTES (sizeof(int) - 1)
+#endif
+#ifndef __CMSG_ALIGN
+#ifndef u_int
+#define u_int unsigned int
+#endif
+#define __CMSG_ALIGN(p) (((u_int)(p) + OSSH_ALIGNBYTES) &~ OSSH_ALIGNBYTES)
+#endif
+
+/* Length of the contents of a control message of length len */
+#ifndef CMSG_LEN
+#define CMSG_LEN(len)   (__CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
+#endif
+
+/* Length of the space taken up by a padded control message of length len */
+#ifndef CMSG_SPACE
+#define CMSG_SPACE(len) (__CMSG_ALIGN(sizeof(struct cmsghdr)) + __CMSG_ALIGN(len))
+#endif
+
+
 
 #endif /* CNID_DBD_USOCKFD_H */