This is the mail archive of the
elfutils-devel@sourceware.org
mailing list for the elfutils project.
Re: windows patches
- From: Ulf Hermann <ulf dot hermann at qt dot io>
- To: Mark Wielaard <mark at klomp dot org>
- Cc: <elfutils-devel at sourceware dot org>
- Date: Mon, 8 May 2017 10:48:05 +0200
- Subject: Re: windows patches
- Authentication-results: sourceware.org; auth=none
- Authentication-results: sourceware.org; dkim=none (message not signed) header.d=none;sourceware.org; dmarc=none action=none header.from=qt.io;
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qtcompany.onmicrosoft.com; s=selector1-qt-io; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=q7y1buCkye8P/vQgERt3xmaZTuGOv7XOaDbfX5/Y2+Q=; b=fqAahapbCLA5msqNBy21F5Ln4mIWjQV7tsz203596LskTKGwfvYfCh+Qmn+jRdhFFYbnOprYu2Ti93ERlUJzKkHAutBNUchTSeR7YGCWAE6/Pa/7mR3qMT/GUckpP5oJLMoNVIF8Qxv0hnDa1OMja9bKplpNcEwuhB+fL+jBkt0=
- References: <3a63ca5e-0e5e-23e5-5717-06b8f1fc300f@qt.io> <1493991449.31726.313.camel@klomp.org>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Hi Mark,
> Thanks a lot for all your work and posting the patches.
> I will go through them next week.
Thanks for reviewing them. The ones that got accepted will already make my life easier.
> I quickly scanned some just now. Some seem fine to go in. But others are
> a bit more iffy. I think some should really go towards gnulib if we are
> going to use that anyway so other projects get the same portability
> benefits.
Let's do the easy ones first. I will handle the gnulib and glibc material when I get back in fall.
> And I do worry a bit about others, like the O_BINARY one for
> example that patches every open call. That seems impossible to properly
> maintain and is clearly intended for a platform that is really not even
> POSIX/Unix-like.
If we want elfutils to work on windows, we need to take care of the text vs. binary issue somehow. If you open a file in text mode, any "\n" not prefixed by "\r" will be replaced with "\r\n" when reading or writing. This is quite disastrous. I couldn't come up with anything better than just adding O_BINARY everywhere. If there is a better way, I'll be happy to change the code.
cheers,
Ulf