delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= <HBBroeker AT t-online DOT de> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: memory.h |
Date: | Sat, 14 Jan 2017 23:57:28 +0100 |
Lines: | 27 |
Message-ID: | <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> | |
Mime-Version: | 1.0 |
X-Trace: | news.dfncis.de poNr1cS/6R3ebnTLwW+3Gw/OLt7tsjdNQBrjLtaf2RlSn4NDtLAuC7NpKC |
Cancel-Lock: | sha1:W5RZUDn4BjRPrv3tP3mmsbdYdIQ= |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 |
Thunderbird/45.6.0 | |
In-Reply-To: | <CAA2C=vA8sYus1m75UbeBvgJw_QQ-rs=RDc3hmpfSV_+1kYd3ug@mail.gmail.com> |
Bytes: | 2204 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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 |
Am 14.01.2017 um 13:11 schrieb Ozkan Sezer (sezeroz AT gmail DOT com) [via djgpp AT delorie DOT com]: > Problems are not from including stdlib.h but from not including string.h > E.g. cpu.c from flac library includes memory.h possibly to get the proto > for memset(). Their decision might be debatable, That decision is well beyond debatable. It's totally and flat-out wrong. <string.h> has been the header to get memset() from for over 25 years now. It's one thing to #include <memory.h> too, if the system has it. But there's no sane excuse left for _not_ including <string.h> if it exists. >> 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |