diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2022-12-08 16:03:06 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2022-12-08 17:16:20 +0100 |
commit | 55de3fdd0e850eb4ed708dc8ea8cf1419b89ee03 (patch) | |
tree | a22d045fbd023420eb0d239c576816318d260875 /winsup | |
parent | 6429a7a7f6e6881ae7b81b4b566ac6943aa74f2c (diff) | |
download | newlib-55de3fdd0e850eb4ed708dc8ea8cf1419b89ee03.zip newlib-55de3fdd0e850eb4ed708dc8ea8cf1419b89ee03.tar.gz newlib-55de3fdd0e850eb4ed708dc8ea8cf1419b89ee03.tar.bz2 |
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>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/include/cygwin/config.h | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h index c9c3565..2a70832 100644 --- a/winsup/cygwin/include/cygwin/config.h +++ b/winsup/cygwin/include/cygwin/config.h @@ -49,12 +49,6 @@ extern inline struct _reent *__getreent (void) #define __FILENAME_MAX__ 4096 /* Keep in sync with PATH_MAX in limits.h. */ -/* Unfortunately we defined __LARGE64_FILES until Cygwin 3.3.6, so - FILE was based on `struct __sFILE64'. The name is exposed into - userspace and consequentially used in C++ name mangling. We must - redefine __sFILE as __sFILE64 to stay backward compatible. */ -#define __sFILE __sFILE64 - /* The following block of macros is required to build newlib correctly for Cygwin. Changing them in applications has no or not the desired effect. Just leave them alone. */ |