On Thu, Feb 21, 2013 at 12:15:45PM +0100, Corinna Vinschen wrote: >On Feb 20 20:14, Christopher Faylor wrote: >> On Wed, Feb 20, 2013 at 03:16:00PM -0600, Yaakov wrote: >> >I have already encountered issues with the lack of leading-underscored >> >exports for symbols declared in <io.h>, as usage thereof often occurs >> >in shared Cygwin/Win32 conditional code, and on Win32 these are >> >underscored. Patch attached for the two symbols I have seen so far, >> >but I wonder if I should just get it over with and add _access as well. >> > >> > >> >Yaakov >> >> >2013-02-20 Yaakov Selkowitz <yselkowitz@...> >> > >> > * cygwin64.din: Restore _get_osfhandle and _setmode. >> >> Ugh. I've been slowly getting rid of some of those inexplicably underscored >> functions now we have to keep the converse around. I wonder if the >> non-underscored >> versions can actually be deleted since they are supposed to exist in the >> userspace >> with an explicit underscore. > >We have to make a tradeoff between backward compatibility and getting >rid of the underscored variants of ANSI function added in the early days >to provide a falsely understood compatibility with MSVCRT. > >I have no problem to keep the underscored _get_osfhandle and _setmode >since these are non-standard entry points anyway, and we also have to >keep some underscored exports for newlib. But we should not add the >MSVCRT ANSI calls back (like _access). That was plainly wrong to begin >with.
I wasn't fulling grokking the fact that Cygwin explicitly defined the get_osfhandle without an underscore in io.h. Sigh. That's probably my fault too. But we definitely shouldn't be going back to adding "_" decorations. I have deleted a few of these and no one has complained. I know that isn't a scientific sampling but it's hard to believe that someone has written code which actually goes out of its way to prepend an underscore in front of a standard UNIX function name, especially since we do not, AFAIK, define these functions in any header file. So, I guess I don't understand why we need to add an underscore now when we have gotten by with the incorrect declaration for get_osfhandle all of these years. cgf