aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorDave Love2003-05-22 20:01:19 +0000
committerDave Love2003-05-22 20:01:19 +0000
commit1d28afaf2714e29e6c2ffe6f0b6a8e54e2844ed7 (patch)
tree852ef3f66f0b4729f477669498a645cf2664c521 /lib-src
parent99ffa7daf70e941e4282db147c2d73fb2a71ca79 (diff)
downloademacs-1d28afaf2714e29e6c2ffe6f0b6a8e54e2844ed7.tar.gz
emacs-1d28afaf2714e29e6c2ffe6f0b6a8e54e2844ed7.zip
(difftime) [!HAVE_DIFFTIME]: Define.
(strerror) [!HAVE_STRERROR && !WINDOWSNT]: New.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/update-game-score.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c
index 2a699b2550d..af691d394a6 100644
--- a/lib-src/update-game-score.c
+++ b/lib-src/update-game-score.c
@@ -1,5 +1,5 @@
1/* update-game-score.c --- Update a score file 1/* update-game-score.c --- Update a score file
2 Copyright (C) 2002 Free Software Foundation, Inc. 2 Copyright (C) 2002, 2003 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -68,6 +68,11 @@ extern int optind, opterr;
68#define P_(proto) () 68#define P_(proto) ()
69#endif 69#endif
70 70
71#ifndef HAVE_DIFFTIME
72/* OK on POSIX (time_t is arithmetic type) modulo overflow in subtraction. */
73#define difftime(t1, t0) (double)((t1) - (t0))
74#endif
75
71int 76int
72usage (err) 77usage (err)
73 int err; 78 int err;
@@ -111,6 +116,23 @@ lose (msg)
111 116
112void lose_syserr P_ ((const char *msg)) NO_RETURN; 117void lose_syserr P_ ((const char *msg)) NO_RETURN;
113 118
119/* Taken from sysdep.c. */
120#ifndef HAVE_STRERROR
121#ifndef WINDOWSNT
122char *
123strerror (errnum)
124 int errnum;
125{
126 extern char *sys_errlist[];
127 extern int sys_nerr;
128
129 if (errnum >= 0 && errnum < sys_nerr)
130 return sys_errlist[errnum];
131 return (char *) "Unknown error";
132}
133#endif /* not WINDOWSNT */
134#endif /* ! HAVE_STRERROR */
135
114void 136void
115lose_syserr (msg) 137lose_syserr (msg)
116 const char *msg; 138 const char *msg;