X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f From: =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= Newsgroups: comp.os.msdos.djgpp Subject: Re: _rdtsc(void) inline function in time.h - cause problem with multiple definition during linking Date: Mon, 31 Oct 2011 00:22:53 +0100 Lines: 20 Message-ID: <9h64ieF40sU1@mid.dfncis.de> References: <4ce51722-c2fd-4fe0-8cb9-ebae498c3271 AT r1g2000yqm DOT googlegroups DOT com> <83k47tc9u2 DOT fsf AT gnu DOT org> <65da0e3d-29ea-46ae-b23d-ae08652594aa AT a17g2000yqj DOT googlegroups DOT com> <0a80c084-8135-4c4d-a25c-b56f3eb41e36 AT y36g2000yqm DOT googlegroups DOT com> <4EA8D10E DOT 8030200 AT iki DOT fi> <851c9b46-4f07-439f-bd59-a3a7c0c00f39 AT a12g2000vbz DOT googlegroups DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.dfncis.de XsFw4dEEbKK8cdn56ysrzgFrRv6Q45Th1jrpK+QRJuTgJqMp/2IzWlyH0F Cancel-Lock: sha1:0UY8/2rzvOP3EfyThAmX9u23Is4= User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: <851c9b46-4f07-439f-bd59-a3a7c0c00f39@a12g2000vbz.googlegroups.com> Bytes: 2590 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 Precedence: bulk On 30.10.2011 21:29, RayeR wrote: > Just a small note to FCNTL.H: > When I compiled a program (for limnux) using function open() it > couldn't find > S_IRUSR and S_IWUSR constants. They are referenced from [...] > so I tried to add > #include > and then it compiled OK. > Wouldn't be better to include sys/stat.h directly from FCNTL.H? May be, but not necessarily. The relevant specification says that _may_ pull in --- but not that it has to. S_IRUSR and S_IWUSR actually belong into . So every program that wants to use these macros actually has to include to be portable. In that sense, having do it might do users a disservice by providing a false feel of correctness --- the author of that Linux code you found apparently fell into that trap already.