Xref: utzoo comp.os.msdos.programmer:2149 comp.os.msdos.misc:683 comp.os.msdos.apps:688 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!newstop!texsun!digi.lonestar.org!kgallagh From: kgallagh@digi.lonestar.org (Kevin Gallagher) Newsgroups: comp.os.msdos.programmer,comp.os.msdos.misc,comp.os.msdos.apps Subject: Re: alloca for TC 2.0 : Where and How ? Keywords: alloca, bison, where Message-ID: <1292@digi.lonestar.org> Date: 26 Nov 90 06:15:43 GMT References: <126@metapyr.UUCP> <0093FFFD.51B399C0@router.jhuapl.edu> <11798@spool.cs.wisc.edu> Followup-To: comp.os.msdos.programmer Distribution: na Organization: DSC Communications, Plano Tx. Lines: 19 In article <11798@spool.cs.wisc.edu> aboulene@cheddar.cs.wisc.edu (Nagi M. Aboulenein) writes: >I am trying to get the MS-DOS version of the parser generator bison to work >under Turbo C 2.0, but I need a routine called alloca. Does anyone know where >and how I can get a hold of that routine ? The function alloca is found in BSD Unix. The BSD man page states it allocates the specified number of bytes of space in the stack frame of the caller, which is released upon exit. Later on it gives the following warning: "alloca is machine dependent, its use is discouraged." No MS-DOS C compiler I am aware of supports alloca. So, you have two choices: roll your own version of alloca OR change the bison code to get its temporary memory allocations another way. -- ---------------------------------------------------------------------------- Kevin Gallagher kgallagh@digi.lonestar.org OR ...!uunet!digi!kgallagh DSC Communications OR apcihq!apcidfw!digi!kgallagh ----------------------------------------------------------------------------