Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site sdcsvax.UUCP Path: utzoo!linus!philabs!sdcsvax!laman From: laman@sdcsvax.UUCP (Mike Laman) Newsgroups: net.lang.c Subject: A tuff question about strings Message-ID: <3648@sdcsvax.UUCP> Date: Sat, 13-Aug-83 14:12:26 EDT Article-I.D.: sdcsvax.3648 Posted: Sat Aug 13 14:12:26 1983 Date-Received: Tue, 16-Aug-83 00:32:50 EDT Organization: U.C. San Diego, CS Dept Lines: 23 I don't think this got off this system, so I am resubmitting it. There is a line in the System III source of "ed", that is like: p = mktemp("/tmp/edXXXXXX"); Now as you may know "mktemp()" writes on the given argument. I came across a compiler that mapped strings into the linkage section. Obviously, when "mktemp()" tried to write on the string, the program died since the linkage section was write protected. My question is this: What does "The C Programming Language" say about this problem? Was the compiler incorrect according to Kerningham and Ritchie? I am NOT asking if people SHOULD do it or not. That will be as interesting a discussion as where people put their curly braces. I just want to find what is correct. You might as well submit it to the net; this could be interesting. I can't find the answer in the book. Mike Laman UUCP: {ucbvax,philabs,sdccsu3}!sdcsvax!laman ARPA: mike@NPRDC