# HG changeset patch # User Juanma Barranquero # Date 1203938818 0 # Node ID 7bd66631686cff6bd4e9c40a994fbd94c50d9220 # Parent 0ee7002082ab556a4de584469c546a20a9074839 Include malloc.h. (add_registry): Cast return value of alloca. diff -r 0ee7002082ab -r 7bd66631686c nt/addpm.c --- a/nt/addpm.c Mon Feb 25 10:52:57 2008 +0000 +++ b/nt/addpm.c Mon Feb 25 11:26:58 2008 +0000 @@ -32,6 +32,7 @@ #include #include #include +#include HDDEDATA CALLBACK DdeCallback (UINT uType, UINT uFmt, HCONV hconv, @@ -87,7 +88,7 @@ affect the general operation of other installations of Emacs, and we are blindly overwriting the Start Menu entries already. */ - if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_APP_PATH, 0, "", + if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_APP_PATH, 0, "", REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hrootkey, NULL) == ERROR_SUCCESS) { @@ -96,7 +97,7 @@ HKEY gtk_key = NULL; len = strlen (path) + 15; /* \bin\emacs.exe + terminator. */ - emacs_path = alloca (len); + emacs_path = (char *) alloca (len); sprintf (emacs_path, "%s\\bin\\emacs.exe", path); RegSetValueEx (hrootkey, NULL, 0, REG_SZ, emacs_path, len);