changeset 92206:7bd66631686c

Include malloc.h. (add_registry): Cast return value of alloca.
author Juanma Barranquero <lekktu@gmail.com>
date Mon, 25 Feb 2008 11:26:58 +0000
parents 0ee7002082ab
children d12d3e6a5f77
files nt/addpm.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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 <ddeml.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <malloc.h>
 
 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);