diff options
author | Dave Love <fx@gnu.org> | 2003-05-22 20:01:19 +0000 |
---|---|---|
committer | Dave Love <fx@gnu.org> | 2003-05-22 20:01:19 +0000 |
commit | 1d28afaf2714e29e6c2ffe6f0b6a8e54e2844ed7 (patch) | |
tree | 852ef3f66f0b4729f477669498a645cf2664c521 /lib-src/update-game-score.c | |
parent | 99ffa7daf70e941e4282db147c2d73fb2a71ca79 (diff) | |
download | emacs-1d28afaf2714e29e6c2ffe6f0b6a8e54e2844ed7.tar.gz |
(difftime) [!HAVE_DIFFTIME]: Define.
(strerror) [!HAVE_STRERROR && !WINDOWSNT]: New.
Diffstat (limited to 'lib-src/update-game-score.c')
-rw-r--r-- | lib-src/update-game-score.c | 24 |
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 @@ /* update-game-score.c --- Update a score file - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -68,6 +68,11 @@ extern int optind, opterr; #define P_(proto) () #endif +#ifndef HAVE_DIFFTIME +/* OK on POSIX (time_t is arithmetic type) modulo overflow in subtraction. */ +#define difftime(t1, t0) (double)((t1) - (t0)) +#endif + int usage (err) int err; @@ -111,6 +116,23 @@ lose (msg) void lose_syserr P_ ((const char *msg)) NO_RETURN; +/* Taken from sysdep.c. */ +#ifndef HAVE_STRERROR +#ifndef WINDOWSNT +char * +strerror (errnum) + int errnum; +{ + extern char *sys_errlist[]; + extern int sys_nerr; + + if (errnum >= 0 && errnum < sys_nerr) + return sys_errlist[errnum]; + return (char *) "Unknown error"; +} +#endif /* not WINDOWSNT */ +#endif /* ! HAVE_STRERROR */ + void lose_syserr (msg) const char *msg; |