]> sourceware.org Git - newlib-cygwin.git/commit
Cygwin: define FILE as struct __sFILE64, not as __sFILE
authorCorinna Vinschen <corinna@vinschen.de>
Thu, 8 Dec 2022 12:58:37 +0000 (13:58 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 8 Dec 2022 17:53:24 +0000 (18:53 +0100)
commitd59d4877f85983f776b9f49105cc24fb582e97df
tree2158e43ac1ae7e1bba00c97c127b9a7138db6db2
parentb5eba8e972786275c76ea69a7ce6ef8d7c8279c3
Cygwin: define FILE as struct __sFILE64, not as __sFILE

Until Cygwin 3.3.6, we define __LARGE64_FILES unconditionally, so we
were using the type __sFILE64 even for 64 bit.  That was lazy and wrong.
so commit 2902b3a09e0a ("Cygwin: drop requirement to build newlib's
stdio64") tried to fix that.

Unfortunately this patch forgot to take the exposure of the typename
__sFILE64 in userspace into account.  This leads to trouble in C++ due
to name mangling.

Commit 0f376ae22036 tried to fix this by just renaming __sFILE to
__sFILE64 by using a macro.  While __sFILE and __sFILE64 are the same
size, they are not exactly congruent.

To avoid backward compatibility problems, make sure to define FILE
as the  real __sFILE64, and make sure that __sFILE is not defined at
all on Cygwin.

Fixes: 0f376ae22036 ("Cygwin: rename __sFILE to __sFILE64 for backward
compatibility")
Fixes: 2902b3a09e0a ("Cygwin: drop requirement to build newlib's stdio64")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
newlib/libc/include/sys/reent.h
This page took 0.034878 seconds and 5 git commands to generate.