From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 43519 invoked by alias); 4 Jul 2019 22:16:00 -0000 Mailing-List: contact bzip2-devel-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Id: Sender: bzip2-devel-owner@sourceware.org Received: (qmail 43500 invoked by uid 89); 4 Jul 2019 22:16:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy=unc, 1998, UNC, emails X-Spam-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: gnu.wildebeest.org Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Mark Wielaard To: Joshua Watt Cc: bzip2-devel@sourceware.org Subject: Re: [PATCH] Fix include path separator Message-ID: <20190704221554.GB4777@wildebeest.org> References: <20190702200544.27137-1-JPEW.hacker@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Flag: NO X-SW-Source: 2019-q3/txt/msg00013.txt.bz2 Hi Joshua, [Note that the mailinglist doesn't accept HTML emails, so you message isn't in the archives.] On Wed, Jul 03, 2019 at 03:49:45PM -0500, Joshua Watt wrote: > On Wed, Jul 3, 2019, 2:04 PM Mark Wielaard wrote: > > I think this makes total sense. And I see something similar is already > > on the 1.1.x branch. But I am slightly hesitant making any build > > changes. Especially since we don't have any buildbots for Windows. And > > I personally don't have any access to Windows. > > > > I did tests with msvc 18.0 (visual studio 2013), and I can probably get > some newer versions if you want. I can also try with mingw gcc (on Windows; > already verified on Linux) if you like... I'm not sure what else would be a > relevant test Newer compiler are likely to accept it if older ones did. It has been there since almost the beginning, bzip2-0.9.0c, 1998. So maybe at some time there were compilers that needed the backslash? > > Are you sure all Windows compilers accept the forward instead of > > backwards slash for standard include statements? > > Is there anything in the C standard that say a forward (or backwards) > > slash should be accepted? > > > > Not AFAIK. FWIW, windows itself doesn't care about the slash direction for > anything except UNC paths, so unless the compilers have really bad path > parsing logic, it shouldn't matter. Actually I found the following in the C89 standard about #include directive parsing: If the characters ', \ , , or /* occur in the sequence between the < and > delimiters, the behavior is undefined. So, it seems accepting \ instead of / is actually an extension. > > Sorry for being a little pedantic when it comes to build changes. > > > > It's understandable :) Maybe a little too pedantic. I cannot really find any references for sys\stat.h except where sys/stat.h is also accepted. The code mentions the lcc compiler and MS Visual C compiler. As far as I can see (quickly reading the documentation) the lcc compile accepts sys/stat.h. And you tested the Microsoft visual C compiler (and MINGW). It also moves us closer to the experimental 1.1.x branch. So lets just accept it. Pushed. Thanks, Mark