From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "AMSRL-CI-CN" Message-ID: References: Subject: Re: [9fans] strdup() Date: Wed, 10 Apr 2002 15:19:16 +0000 Topicbox-Message-UUID: 756766da-eaca-11e9-9e20-41e7f4b1d025 "rob pike, esq." wrote... > Yes. For reasons I can't fathom, strdup is not in the ANSI C definition. > I hope C9X fixes this oversight. We tried to include it, but there was not consensus to do so, the primary objection being to system libraries allocating storage that the application would be responsible for later deallocating. I didn't think it was a good objection, and as a widely-used extension with an easy portable definition it certainly is in need of standardization, just as gets was in the 1980s. At least C99 added snprintf.