Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!daver!bungi.com!news From: ian@sibyl.eleceng.ua.oz.au Newsgroups: comp.sys.nsc.32k Subject: Re: a first time for everything Message-ID: <9009041739.4475@munnari.oz.au> Date: 4 Sep 90 00:09:40 GMT References: <<9009022058.AA13234@ditka.UUCP>> Sender: news@daver.bungi.com Lines: 18 Approved: news@daver.bungi.com Karl Swartz writes: > I also had a problem with the following: > > static char *tempname = "/tmp/fooXXXXXX"; > ... > mktemp(tempname); > > GCC makes the string in read-only, which led to a "bus error". When I > changed the declaration to > > static char tempname[] = "/tmp/fooXXXXXX"; > > everybody was happy. Well, that is the "correct" declaration. You could have also used the "-fwritable-strings" option. Ian Dall