2016-05-24 7:46 GMT+02:00 Adrien Nader <adr...@notk.org>: > Hi, > > On Mon, May 23, 2016, Nakai Yuta wrote: >> Hi, all >> I attached the patch. >> >> I put ifdef guard for compatibility with MSVC. >> >> default behaviour: same as MSVC >> when defined _GNU_SOURCE: same as glibc(>2.01) > > This is tangential. > > I'm actually a bit worried about such changes in the general case: when > using autoconf, one typically doesn't define _GNU_SOURCE but instead ask > for "extensions" and ./configure decides what to do. It's kind of > automatic. This means that there are many projects (most actually it > seems) which #define _GNU_SOURCE 1 and not only the ones which really > really really want it.
Agreed, that this danger exists. In this special case I wouldn't assume any issues, as the MS interpretation is pretty much compatible to that one of glibc. If a configure script tests for glibc behavior without setting explicit _GNU_SOURCE, then it is IMO broken. But it would be broken anyway. > I don't think this specific patch is wrong or will cause troubles. And > I'm not saying either that projects which ask for non-standard behaviour > that is not clearly defined and guaranteed are right. Instead, I merely > wish to warn for future changes because it's perfectly reasonable to > have code relying on msvcrt-specific behaviour in windows-only codepaths > while also having _GNU_SOURCE. Of course, _GNU_SOURCE gives no guarantee > but we know how things work when it comes to compatibility. Well, I see no other option to express that. So using here _GNU_SOURCE seems to be the best guard. But if you know about something better, please come up with a suggestion. > Also, what is the official stance on msvcrt- vs gnu-specific behaviours > currently? I don't think I've seen it written well anywhere. Well, we support C99, which makes our runtime much more gnu-specific. This is especially true for msvcrt runtime. For more recent universal runtime we might need less extensions, as we need now. > -- > Adrien Nader Kai ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public