delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2017/01/14/18:47:14

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to
:content-transfer-encoding;
bh=0GC1Om64NWMvK5rZhzSvRnc8cHW5JHc4JplUX/WSf9k=;
b=uJI/LvH2OwFD/JhzCnqkjtNrKTsVBdDxzvJYGlLaZJVb1CUSkhYL6626Sw3YIRGfWJ
8R6Z5ymzFG71ilEqYNTKXeiVvXKnuR6pxxidZMXpkmo6fAvP8eee92yaEJ9Eqcuxte9o
zz8TsyPeEH646BJpaGfdxrrlecMviauC4fFQwDlBlTfq1/H3/D7PjDqXWi99yDqKCMi6
V+WS9VqVmYKxpbMxiLExc9t17uHkaQJecRD2uzBbZMYdAfzSnUljlokeSSgmLgDvrThq
6AuzTmALqaftKJ4fGfZe0wf+912/jpMPv7ft9EWPH+Rb7GOwv0GZ5CC5N56hfaeeQysY
IJnw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to:content-transfer-encoding;
bh=0GC1Om64NWMvK5rZhzSvRnc8cHW5JHc4JplUX/WSf9k=;
b=I8bOV29SsTKI6tEInWlkbfXFcMyXANg4vbbSQ7HT70702GQaFiTm5Q3uvDr6uR4OKZ
v4rkElnEhvbw1xlthy4pwZ9+tUj+DCXt2QbqbJ1s5CNJEU99ayB/ZjK5xb+YARgM1YYk
a+9L/al5XsXk5iUM4AW5dJ3k75nTaOoBFWATx8wihdgHE23wFIVJGUQ0K5G21QdC07PN
hKFgdI2tuirLwZkz5tXX0v2m3JbdPvvsUfvp3CJKSjUh6j/MVzvgQuM7UTM8pYt2CveP
TbsPc7UkYK5oiPLgP2BbP4IBnUy7V6eb3CVpuyab4XMvxpHrxvBKKg+L30uOs2n2r0Du
XwVw==
X-Gm-Message-State: AIkVDXJVD9G8tw1XSSuAoatWTbNHcIkxV3o7sHQLK/hOPt9X1YSl/yFl2O0FXOffpoMvuMf93Xs8IB+mqOkagw==
X-Received: by 10.107.136.40 with SMTP id k40mr13016506iod.99.1484437627452;
Sat, 14 Jan 2017 15:47:07 -0800 (PST)
MIME-Version: 1.0
In-Reply-To: <edvomqFgkgcU1@mid.dfncis.de>
References: <CAA2C=vAxwXB1-nsiDMmKQLt7rmkFHonK-8Cxqx4M_2uKN7ZzPA AT mail DOT gmail DOT com>
<83h951c41o DOT fsf AT gnu DOT org> <CAA2C=vAQsONZ-bG1dnoso3RWno6bDWGeDhnMJk33RypA5JjG=A AT mail DOT gmail DOT com>
<83d1fpc24q DOT fsf AT gnu DOT org> <CAA2C=vA8sYus1m75UbeBvgJw_QQ-rs=RDc3hmpfSV_+1kYd3ug AT mail DOT gmail DOT com>
<edvomqFgkgcU1 AT mid DOT dfncis DOT de>
From: "Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]" <djgpp AT delorie DOT com>
Date: Sun, 15 Jan 2017 02:47:07 +0300
Message-ID: <CAA2C=vD-R6QgSVRBOUBJtzL2y7qtRhWwmfJTPP-xWcZypwrr3w@mail.gmail.com>
Subject: Re: memory.h
To: djgpp AT delorie DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id v0ENl9Sp012394
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On 1/15/17, Hans-Bernhard Bröker <HBBroeker AT t-online DOT de> wrote:
[...]
>>>  Would it be okay to
>>> simply add string.h, without removing stdlib.h?
>
> It would be okay for the user code to do that.
>
> But strictly speaking, system headers are effectively forbidden from
> doing that by the language standard.  Code that doesn't include a
> standard library header is granted license to assume that some things
> from that header are _not_ defined, i.e. that they're free for other use.
>
> Yes, that means the existing #include of <stdlib.h> by <memory.h> also
> not really allowed.

Well, I do suggest making memory.h a copy of mem.h and changing
them to include string.h, but it's not entirely up to me.

$ cat mem.h | sed -e "s|memory|string|"
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
/* DO NOT USE THIS IN NEW CODE.  It is here only
   to allow old code to compile. */

#include <string.h>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019