From owner-freebsd-questions Wed Feb 14 12:30:54 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id MAA11047 for questions-outgoing; Wed, 14 Feb 1996 12:30:54 -0800 (PST) Received: from ns3.noc.netcom.net (ns3.noc.netcom.net [204.31.1.3]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA11036 for ; Wed, 14 Feb 1996 12:30:50 -0800 (PST) Received: from tera.com (tera.tera.com [206.215.142.10]) by ns3.noc.netcom.net (8.6.12/8.6.12) with SMTP id MAA03929; Wed, 14 Feb 1996 12:30:19 -0800 Received: from athena.tera.com by tera.com (4.1/SMI-4.0-206) id AA20180; Wed, 14 Feb 96 12:29:54 PST From: kline@tera.com (Gary Kline) Message-Id: <9602142029.AA20180@tera.com> Subject: Re: mktemp() To: nate@sri.MT.net (Nate Williams) Date: Wed, 14 Feb 1996 12:30:07 -0800 (PST) Cc: kline@ns3.noc.netcom.net, questions@freebsd.org In-Reply-To: <199602142016.NAA27009@rocky.sri.MT.net> from "Nate Williams" at Feb 14, 96 01:16:24 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-questions@freebsd.org Precedence: bulk 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.... >