aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-09 19:20:34 +0000
committerRichard M. Stallman1997-07-09 19:20:34 +0000
commit0c76956f837b5ada147e69cda271f1b82f2f8d53 (patch)
treed004f425a6c121b5311fa8ca50248a44d1a58a53 /lib-src
parentb0f661deaa760b748b914498c0a3cdd6892b3665 (diff)
downloademacs-0c76956f837b5ada147e69cda271f1b82f2f8d53.tar.gz
emacs-0c76956f837b5ada147e69cda271f1b82f2f8d53.zip
[C_ALLOCA] (xmalloc): New function.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 2e99e9d34ad..999be2c2a8c 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -137,6 +137,23 @@ quote_file_name (name)
137 137
138 return copy; 138 return copy;
139} 139}
140
141#ifdef C_ALLOCA
142/* Like malloc but get fatal error if memory is exhausted. */
143
144char *
145xmalloc (size)
146 unsigned int size;
147{
148 char *result = (char *) malloc (size);
149 if (result == NULL)
150 {
151 perror ("malloc");
152 exit (1);
153 }
154 return result;
155}
156#endif /* C_ALLOCA */
140 157
141#if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC) 158#if !defined (HAVE_SOCKETS) && !defined (HAVE_SYSVIPC)
142 159