From: ben Date: Tue, 10 Dec 2002 01:11:40 +0000 (+0000) Subject: Since PuTTY depends on lots of features of System 7, have it bale out if X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/56ed4cf7fdc391717c35bd1d71520daaff01eb1b Since PuTTY depends on lots of features of System 7, have it bale out if it finds itself running on anything older. This is better than killing the whole system with an umimplemented trap. git-svn-id: svn://svn.tartarus.org/sgt/putty@2300 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/mac/mac.c b/mac/mac.c index f931faf2..5083cdd9 100644 --- a/mac/mac.c +++ b/mac/mac.c @@ -1,4 +1,4 @@ -/* $Id: mac.c,v 1.5 2002/12/06 00:09:34 ben Exp $ */ +/* $Id: mac.c,v 1.6 2002/12/10 01:11:40 ben Exp $ */ /* * Copyright (c) 1999 Ben Harris * All rights reserved. @@ -117,6 +117,11 @@ static void mac_startup(void) { InitDialogs(nil); cold = 0; + /* Get base system version (only used if there's no better selector) */ + if (Gestalt(gestaltSystemVersion, &mac_gestalts.sysvers) != noErr || + (mac_gestalts.sysvers & 0xffff) < 0x700) + fatalbox("PuTTY requires System 7 or newer"); + mac_gestalts.sysvers &= 0xffff; /* Find out if we've got Color Quickdraw */ if (Gestalt(gestaltQuickdrawVersion, &mac_gestalts.qdvers) != noErr) mac_gestalts.qdvers = gestaltOriginalQD; diff --git a/mac/mac.h b/mac/mac.h index 85540210..2e4c267d 100644 --- a/mac/mac.h +++ b/mac/mac.h @@ -12,6 +12,7 @@ #include struct mac_gestalts { + long sysvers; long qdvers; long apprvers; long cntlattr;