]> jfr.im git - solanum.git/blobdiff - librb/src/win32.c
[openssl] Forward-port some more cleanups from fixes to 3.5
[solanum.git] / librb / src / win32.c
index b1011a50d43febf6da9fd0b5e19cbcc9b0d2b563..d2f8f312fcd75642d1fed220e2e59f334fd8c154 100644 (file)
@@ -23,7 +23,6 @@
  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
  *  USA
  *
- *  $Id: win32.c 26092 2008-09-19 15:13:52Z androsyn $
  */
 
 #include <librb_config.h>
@@ -373,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 = "charybdis-class";
 
        wc.style = 0;
        wc.lpfnWndProc = (WNDPROC) rb_process_events;
@@ -415,7 +414,7 @@ rb_setup_fd_win32(rb_fde_t *F)
        {
        case RB_FD_SOCKET:
                {
-                       u_long nonb = 1;
+                       unsigned long nonb = 1;
                        if(ioctlsocket((SOCKET) F->fd, FIONBIO, &nonb) == -1)
                        {
                                rb_get_errno();
@@ -614,6 +613,15 @@ rb_strerror(int error)
        rb_strlcpy(buf, _rb_strerror(error), sizeof(buf));
        return buf;
 }
+
+const char *
+rb_path_to_self(void)
+{
+       static char path_buf[MAX_PATH];
+       GetModuleFileName(NULL, path_buf, MAX_PATH);
+       return path_buf;
+}
+
 #else /* win32 not supported */
 int
 rb_init_netio_win32(void)