aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorRoland McGrath1994-01-09 01:00:04 +0000
committerRoland McGrath1994-01-09 01:00:04 +0000
commite5f7ea68581373e515031efdb2a312c60738a601 (patch)
tree0ea3e9a814e5f18457869086d9fa77e040470ee3 /lib-src
parent47241a651a751dc19453af79cf5ab5a35aa385f9 (diff)
downloademacs-e5f7ea68581373e515031efdb2a312c60738a601.tar.gz
emacs-e5f7ea68581373e515031efdb2a312c60738a601.zip
[! HAVE_STRERROR] (strerror): Define the function.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/movemail.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index 0b4163e0234..67dca3ad6a9 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -303,13 +303,15 @@ main (argc, argv)
303#endif 303#endif
304 304
305#ifndef MAIL_USE_FLOCK 305#ifndef MAIL_USE_FLOCK
306 /* Delete the input file; if we can't, at least get rid of its contents. */ 306 /* Delete the input file; if we can't, at least get rid of its
307 contents. */
307#ifdef MAIL_UNLINK_SPOOL 308#ifdef MAIL_UNLINK_SPOOL
308 /* This is generally bad to do, because it destroys the permissions 309 /* This is generally bad to do, because it destroys the permissions
309 that were set on the file. Better to just empty the file. */ 310 that were set on the file. Better to just empty the file. */
310 if (unlink (inname) < 0 && errno != ENOENT) 311 if (unlink (inname) < 0 && errno != ENOENT)
311#endif /* MAIL_UNLINK_SPOOL */ 312#endif /* MAIL_UNLINK_SPOOL */
312 creat (inname, 0600); 313 creat (inname, 0600);
314#endif /* not MAIL_USE_FLOCK */
313 315
314 exit (0); 316 exit (0);
315 } 317 }
@@ -320,10 +322,9 @@ main (argc, argv)
320 else if (WRETCODE (status) != 0) 322 else if (WRETCODE (status) != 0)
321 exit (WRETCODE (status)); 323 exit (WRETCODE (status));
322 324
323#ifndef MAIL_USE_MMDF 325#if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_FLOCK)
324 unlink (lockname); 326 unlink (lockname);
325#endif /* not MAIL_USE_MMDF */ 327#endif /* not MAIL_USE_MMDF and not MAIL_USE_FLOCK */
326#endif /* not MAIL_USE_FLOCK */
327 exit (0); 328 exit (0);
328} 329}
329 330
@@ -769,3 +770,18 @@ mbx_delimit_end (mbf)
769} 770}
770 771
771#endif /* MAIL_USE_POP */ 772#endif /* MAIL_USE_POP */
773
774#ifndef HAVE_STRERROR
775char *
776strerror (errnum)
777 int errnum;
778{
779 extern char *sys_errlist[];
780 extern int sys_nerr;
781
782 if (errnum >= 0 && errnum < sys_nerr)
783 return sys_errlist[errnum];
784 return (char *) "Unknown error";
785}
786
787#endif /* ! HAVE_STRERROR */