Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!uunet!auspex!guy From: guy@auspex.auspex.com (Guy Harris) Newsgroups: comp.unix.aix Subject: Re: nits (gethostbyaddr(), alloca()) Message-ID: <3953@auspex.auspex.com> Date: 24 Aug 90 17:51:37 GMT References: <1990Aug24.050106.16560@panews> Distribution: na Organization: Auspex Systems, Santa Clara Lines: 17 > One more time.... alloca is defined by placing a > >#pragma alloca > >in the source file. This is per ANSI C, I believe. If you mean that ANSI C specifies that's the way you get at "alloca()", you believe incorrectly; ANSI C 1) doesn't say what #pragmas exist, much less what they do, and 2) doesn't specify "alloca()". Other vendors have used other techniques to teach the compiler about "alloca()", such as the Sun technique of giving it a funny name "__builtin_alloca"; this also does not violate the ANSI C standard (although Sun's compiler isn't yet an ANSI C compiler). Sun put a "#define of "alloca(x)" as "__builtin_alloca(x)" in "/usr/include/alloca.h"; it might be nice if other vendors put their particular compiler's hacks in a similar include file.