X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/82aaf5c3dfdb6b86a089c3ed34f0783b065ce896..8136216bdb02b9f8cc3af159fced247084714536:/timing.c diff --git a/timing.c b/timing.c index a87be897..6dd8aa5e 100644 --- a/timing.c +++ b/timing.c @@ -41,10 +41,21 @@ static int compare_timers(void *av, void *bv) * Failing that, compare on the other two fields, just so that * we don't get unwanted equality. */ +#ifdef __LCC__ + /* lcc won't let us compare function pointers. Legal, but annoying. */ + { + int c = memcmp(&a->fn, &b->fn, sizeof(a->fn)); + if (c < 0) + return -1; + else if (c > 0) + return +1; + } +#else if (a->fn < b->fn) return -1; else if (a->fn > b->fn) return +1; +#endif if (a->ctx < b->ctx) return -1;