aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1994-01-06 03:57:28 +0000
committerRichard M. Stallman1994-01-06 03:57:28 +0000
commit91cf09ac120fe2b0cf1d41adad1cba238564f679 (patch)
tree0846175c179a2d8764f430dd436425bf1d0f0613 /lib-src
parent20333561440df66d09615f7abb07d86519207a30 (diff)
downloademacs-91cf09ac120fe2b0cf1d41adad1cba238564f679.tar.gz
emacs-91cf09ac120fe2b0cf1d41adad1cba238564f679.zip
(malloc): Don't declare it.
(xmalloc): Cast result of malloc. (strcpy): Don't declare it. [MSDOS]: #undef `access'.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 98134746e61..eda7767d92e 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -56,6 +56,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
56#include <../src/config.h> 56#include <../src/config.h>
57#include <../src/syswait.h> 57#include <../src/syswait.h>
58 58
59#ifdef MSDOS
60#undef access
61#endif /* MSDOS */
62
59#ifdef USG 63#ifdef USG
60#include <fcntl.h> 64#include <fcntl.h>
61#include <unistd.h> 65#include <unistd.h>
@@ -81,8 +85,6 @@ extern int lk_open (), lk_close ();
81#undef write 85#undef write
82#undef close 86#undef close
83 87
84char *malloc ();
85char *strcpy ();
86char *concat (); 88char *concat ();
87char *xmalloc (); 89char *xmalloc ();
88#ifndef errno 90#ifndef errno
@@ -128,7 +130,7 @@ main (argc, argv)
128 130
129 /* Also check that outname's directory is writeable to the real uid. */ 131 /* Also check that outname's directory is writeable to the real uid. */
130 { 132 {
131 char *buf = (char *) malloc (strlen (outname) + 1); 133 char *buf = (char *) xmalloc (strlen (outname) + 1);
132 char *p, q; 134 char *p, q;
133 strcpy (buf, outname); 135 strcpy (buf, outname);
134 p = buf + strlen (buf); 136 p = buf + strlen (buf);
@@ -399,7 +401,7 @@ char *
399xmalloc (size) 401xmalloc (size)
400 unsigned size; 402 unsigned size;
401{ 403{
402 char *result = malloc (size); 404 char *result = (char *) malloc (size);
403 if (!result) 405 if (!result)
404 fatal ("virtual memory exhausted", 0); 406 fatal ("virtual memory exhausted", 0);
405 return result; 407 return result;