]> jfr.im git - solanum.git/blobdiff - librb/src/win32.c
Create configurations for user-facing messages within registration (#238)
[solanum.git] / librb / src / win32.c
index b43b8f6dafcd2fb5ce049cded49e90d5d74251e8..6120b9069dca2ec83ac5eedc5a2a45cd6d0373f4 100644 (file)
@@ -372,7 +372,7 @@ rb_init_netio_win32(void)
 {
        /* this muchly sucks, but i'm too lazy to do overlapped i/o, maybe someday... -androsyn */
        WNDCLASS wc;
-       static const char *classname = "ircd-ratbox-class";
+       static const char *classname = "solanum-class";
 
        wc.style = 0;
        wc.lpfnWndProc = (WNDPROC) rb_process_events;
@@ -410,22 +410,14 @@ rb_setup_fd_win32(rb_fde_t *F)
                return 0;
 
        SetHandleInformation((HANDLE) F->fd, HANDLE_FLAG_INHERIT, 0);
-       switch (F->type)
-       {
-       case RB_FD_SOCKET:
-               {
-                       u_long nonb = 1;
-                       if(ioctlsocket((SOCKET) F->fd, FIONBIO, &nonb) == -1)
-                       {
-                               rb_get_errno();
-                               return 0;
-                       }
-                       return 1;
+       if (F->type & RB_FD_SOCKET) {
+               unsigned long nonb = 1;
+               if (ioctlsocket((SOCKET) F->fd, FIONBIO, &nonb) == -1) {
+                       rb_get_errno();
+                       return 0;
                }
-       default:
-               return 1;
-
        }
+       return 1;
 }
 
 void
@@ -631,21 +623,21 @@ rb_init_netio_win32(void)
 }
 
 void
-rb_setselect_win32(rb_fde_t *F, unsigned int type, PF * handler, void *client_data)
+rb_setselect_win32(rb_fde_t *F __attribute__((unused)), unsigned int type __attribute__((unused)), PF * handler __attribute__((unused)), void *client_data __attribute__((unused)))
 {
        errno = ENOSYS;
        return;
 }
 
 int
-rb_select_win32(long delay)
+rb_select_win32(long delay __attribute__((unused)))
 {
        errno = ENOSYS;
        return -1;
 }
 
 int
-rb_setup_fd_win32(rb_fde_t *F)
+rb_setup_fd_win32(rb_fde_t *F __attribute__((unused)))
 {
        errno = ENOSYS;
        return -1;