]> jfr.im git - solanum.git/blobdiff - librb/include/commio-int.h
MbedTLS: Adjust ciphersuite order and update documentation
[solanum.git] / librb / include / commio-int.h
index 90cdf2fb69ef6fe037ecee95a1b08b6f61e91f2e..cd573fef207c85eb1f2dab7ad45d7955ab310683 100644 (file)
@@ -21,7 +21,6 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
  *  USA
  *
- *  $Id: commio.h 24059 2007-07-24 17:25:41Z androsyn $
  */
 
 #ifndef _COMMIO_INT_H
 
 #define FD_DESC_SZ 128         /* hostlen + comment */
 
-
-#ifdef _WIN32
-#define rb_get_errno() do { errno = WSAGetLastError(); WSASetLastError(errno); } while(0)
-#else
-#define rb_get_errno()
-#endif
-
 #define rb_hash_fd(x) ((x ^ (x >> RB_FD_HASH_BITS) ^ (x >> (RB_FD_HASH_BITS * 2))) & RB_FD_HASH_MASK)
 
 #ifdef HAVE_WRITEV
@@ -95,6 +87,9 @@ struct acceptdata
 #define SetFDOpen(F)   (F->flags |= FLAG_OPEN)
 #define ClearFDOpen(F) (F->flags &= ~FLAG_OPEN)
 
+#if !defined(SHUT_RDWR) && defined(_WIN32)
+# define SHUT_RDWR SD_BOTH
+#endif
 
 struct _fde
 {
@@ -104,7 +99,7 @@ struct _fde
         * filedescriptor. Think though: when do you think we'll need more?
         */
        rb_dlink_node node;
-       int fd;                 /* So we can use the rb_fde_t as a callback ptr */
+       rb_platform_fd_t fd;                    /* So we can use the rb_fde_t as a callback ptr */
        uint8_t flags;
        uint8_t type;
        int pflags;
@@ -136,7 +131,7 @@ typedef struct timer_data
 extern rb_dlink_list *rb_fd_table;
 
 static inline rb_fde_t *
-rb_find_fd(int fd)
+rb_find_fd(rb_platform_fd_t fd)
 {
        rb_dlink_list *hlist;
        rb_dlink_node *ptr;