Date: Wed, 14 Feb 1996 12:30:07 -0800 (PST) From: kline@tera.com (Gary Kline) To: nate@sri.MT.net (Nate Williams) Cc: kline@ns3.noc.netcom.net, questions@freebsd.org Subject: Re: mktemp() Message-ID: <9602142029.AA20180@tera.com> In-Reply-To: <199602142016.NAA27009@rocky.sri.MT.net> from "Nate Williams" at Feb 14, 96 01:16:24 pm
next in thread | previous in thread | raw e-mail | index | archive | help
According to Nate Williams: > > > The libc call mktemp() (along with strtok() and strsep(), by the way) > > causes a coredump when I use it with gcc. This from v 2.0.5. > > Are you calling mktemp() with memory that is writeable? By default, > strings are constants and un-writeable. > > > On the Suns at work, strtok and strsep both bomb with gcc v2.3.3 > > and both work with the standard Sun CC. > > Try adding -fwriteable-strings and I'll bet it will work. > > Thanks to everyone who wrote and clued me in. Part of me is back in the warm&fuzzy days when I'd use K&R and things would just work. Also too often I would royally screw myself through quick-and-dirty hacks. gcc still get 5 stars; its warning messages have made me go back and look at//fix quick hacks and downright programming errors. Yes, people, there is a real diff between char *s and char s[]. gary PS: A ``NOTE'' in the appropriate man pages wouldn't hurt, indicentally.... >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9602142029.AA20180>