Set FD_CLOEXEC in a little convenience function that does the right thing
[sgt/putty] / windows / windlg.c
index dba4d5f..9d98623 100644 (file)
@@ -1,3 +1,7 @@
+/*
+ * windlg.c - dialogs for PuTTY(tel), including the configuration dialog.
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <limits.h>
@@ -240,11 +244,7 @@ static int SaneDialogBox(HINSTANCE hinst,
     wc.style = CS_DBLCLKS | CS_SAVEBITS | CS_BYTEALIGNWINDOW;
     wc.lpfnWndProc = DefDlgProc;
     wc.cbClsExtra = 0;
-#ifdef LONG_PTR
     wc.cbWndExtra = DLGWINDOWEXTRA + 2*sizeof(LONG_PTR);
-#else
-    wc.cbWndExtra = DLGWINDOWEXTRA + 8;
-#endif
     wc.hInstance = hinst;
     wc.hIcon = NULL;
     wc.hCursor = LoadCursor(NULL, IDC_ARROW);
@@ -653,7 +653,7 @@ int do_config(void)
 
     ctrlbox = ctrl_new_box();
     setup_config_box(ctrlbox, FALSE, 0, 0);
-    win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), FALSE);
+    win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), FALSE, 0);
     dp_init(&dp);
     winctrl_init(&ctrls_base);
     winctrl_init(&ctrls_panel);
@@ -685,7 +685,8 @@ int do_reconfig(HWND hwnd, int protcfginfo)
 
     ctrlbox = ctrl_new_box();
     setup_config_box(ctrlbox, TRUE, cfg.protocol, protcfginfo);
-    win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), TRUE);
+    win_setup_config_box(ctrlbox, &dp.hwnd, (help_path != NULL), TRUE,
+                         cfg.protocol);
     dp_init(&dp);
     winctrl_init(&ctrls_base);
     winctrl_init(&ctrls_panel);