diff options
| author | Juanma Barranquero | 2008-02-25 11:28:07 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2008-02-25 11:28:07 +0000 |
| commit | c44b4b4643c032353b9188282e2204746e4be68f (patch) | |
| tree | 24035041213505325c79970107c983134a8667f9 | |
| parent | 38cd9f1734136fd33fc5bb050fe8085377850c4d (diff) | |
| download | emacs-c44b4b4643c032353b9188282e2204746e4be68f.tar.gz emacs-c44b4b4643c032353b9188282e2204746e4be68f.zip | |
Include malloc.h.
(add_registry): Cast return value of alloca.
| -rw-r--r-- | nt/ChangeLog | 5 | ||||
| -rw-r--r-- | nt/addpm.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog index 3a4e09ff528..5d114383a8b 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2008-02-25 Juanma Barranquero <lekktu@gmail.com> | ||
| 2 | |||
| 3 | * addpm.c: Include malloc.h. | ||
| 4 | (add_registry): Cast return value of alloca. | ||
| 5 | |||
| 1 | 2008-02-24 Dan Nicolaescu <dann@ics.uci.edu> | 6 | 2008-02-24 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 7 | ||
| 3 | * config.nt (SHORTNAMES): Remove reference to obsolete variable. | 8 | * config.nt (SHORTNAMES): Remove reference to obsolete variable. |
diff --git a/nt/addpm.c b/nt/addpm.c index 297fc4c5e81..b05494a4678 100644 --- a/nt/addpm.c +++ b/nt/addpm.c | |||
| @@ -32,6 +32,7 @@ Boston, MA 02110-1301, USA. */ | |||
| 32 | #include <ddeml.h> | 32 | #include <ddeml.h> |
| 33 | #include <stdlib.h> | 33 | #include <stdlib.h> |
| 34 | #include <stdio.h> | 34 | #include <stdio.h> |
| 35 | #include <malloc.h> | ||
| 35 | 36 | ||
| 36 | HDDEDATA CALLBACK | 37 | HDDEDATA CALLBACK |
| 37 | DdeCallback (UINT uType, UINT uFmt, HCONV hconv, | 38 | DdeCallback (UINT uType, UINT uFmt, HCONV hconv, |
| @@ -87,7 +88,7 @@ add_registry (path) | |||
| 87 | affect the general operation of other installations of Emacs, and we | 88 | affect the general operation of other installations of Emacs, and we |
| 88 | are blindly overwriting the Start Menu entries already. | 89 | are blindly overwriting the Start Menu entries already. |
| 89 | */ | 90 | */ |
| 90 | if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_APP_PATH, 0, "", | 91 | if (RegCreateKeyEx (HKEY_LOCAL_MACHINE, REG_APP_PATH, 0, "", |
| 91 | REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, | 92 | REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, |
| 92 | &hrootkey, NULL) == ERROR_SUCCESS) | 93 | &hrootkey, NULL) == ERROR_SUCCESS) |
| 93 | { | 94 | { |
| @@ -96,7 +97,7 @@ add_registry (path) | |||
| 96 | HKEY gtk_key = NULL; | 97 | HKEY gtk_key = NULL; |
| 97 | 98 | ||
| 98 | len = strlen (path) + 15; /* \bin\emacs.exe + terminator. */ | 99 | len = strlen (path) + 15; /* \bin\emacs.exe + terminator. */ |
| 99 | emacs_path = alloca (len); | 100 | emacs_path = (char *) alloca (len); |
| 100 | sprintf (emacs_path, "%s\\bin\\emacs.exe", path); | 101 | sprintf (emacs_path, "%s\\bin\\emacs.exe", path); |
| 101 | 102 | ||
| 102 | RegSetValueEx (hrootkey, NULL, 0, REG_SZ, emacs_path, len); | 103 | RegSetValueEx (hrootkey, NULL, 0, REG_SZ, emacs_path, len); |