public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org, newlib-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: drop requirement to build newlib's stdio64 Date: Wed, 3 Aug 2022 11:41:50 +0000 (GMT) [thread overview] Message-ID: <20220803114150.224183858400@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=2902b3a09e0a45c4971b59f78ab175b71b3c755e commit 2902b3a09e0a45c4971b59f78ab175b71b3c755e Author: Corinna Vinschen <corinna@vinschen.de> Date: Wed Aug 3 13:41:35 2022 +0200 Cygwin: drop requirement to build newlib's stdio64 Given that 64 bit Cygwin defines all file access types (off_t, fpos_t, and derived types) as 64 bit anyway, there's no reason left to rely on the stdio64 part of newlib. Use base functions and base types. Signed-off-by: Corinna Vinschen <corinna@vinschen.de> Diff: --- newlib/configure.host | 1 - newlib/libc/include/stdio.h | 4 ---- winsup/cygwin/include/cygwin/config.h | 2 -- winsup/cygwin/syscalls.cc | 4 ++-- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/newlib/configure.host b/newlib/configure.host index 3cfed4ccf..98ce07d82 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -420,7 +420,6 @@ fi case "${host}" in *-*-cygwin*) posix_dir=posix - stdio64_dir=stdio64 xdr_dir=xdr ;; *-*-netware*) diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index c75e48125..ea4ddf329 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -67,14 +67,10 @@ typedef __FILE FILE; # define __FILE_defined #endif -#ifdef __CYGWIN__ -typedef _fpos64_t fpos_t; -#else typedef _fpos_t fpos_t; #ifdef __LARGE64_FILES typedef _fpos64_t fpos64_t; #endif -#endif /* !__CYGWIN__ */ #ifndef _OFF_T_DECLARED typedef __off_t off_t; diff --git a/winsup/cygwin/include/cygwin/config.h b/winsup/cygwin/include/cygwin/config.h index 1d515a6f5..2a7083278 100644 --- a/winsup/cygwin/include/cygwin/config.h +++ b/winsup/cygwin/include/cygwin/config.h @@ -54,8 +54,6 @@ extern inline struct _reent *__getreent (void) Just leave them alone. */ #define _READ_WRITE_RETURN_TYPE _ssize_t #define _READ_WRITE_BUFSIZE_TYPE size_t -#define __LARGE64_FILES 1 -#define __USE_INTERNAL_STAT64 1 #define __LINUX_ERRNO_EXTENSIONS__ 1 #define _MB_EXTENDED_CHARSETS_ALL 1 #define __HAVE_LOCALE_INFO__ 1 diff --git a/winsup/cygwin/syscalls.cc b/winsup/cygwin/syscalls.cc index 6455f25ab..a92948fba 100644 --- a/winsup/cygwin/syscalls.cc +++ b/winsup/cygwin/syscalls.cc @@ -4191,7 +4191,7 @@ gethostid (void) #define ETC_SHELLS "/etc/shells" static int shell_index; -static struct __sFILE64 *shell_fp; +static FILE *shell_fp; extern "C" char * getusershell () @@ -4210,7 +4210,7 @@ getusershell () static char buf[PATH_MAX]; int ch, buf_idx; - if (!shell_fp && !(shell_fp = fopen64 (ETC_SHELLS, "rt"))) + if (!shell_fp && !(shell_fp = fopen (ETC_SHELLS, "rt"))) { if (def_shells[shell_index]) return strcpy (buf, def_shells[shell_index++]);
reply other threads:[~2022-08-03 11:41 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220803114150.224183858400@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ --cc=newlib-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).