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>
This commit is contained in:
parent
8b502d8635
commit
2902b3a09e
|
@ -420,7 +420,6 @@ fi
|
||||||
case "${host}" in
|
case "${host}" in
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
posix_dir=posix
|
posix_dir=posix
|
||||||
stdio64_dir=stdio64
|
|
||||||
xdr_dir=xdr
|
xdr_dir=xdr
|
||||||
;;
|
;;
|
||||||
*-*-netware*)
|
*-*-netware*)
|
||||||
|
|
|
@ -67,14 +67,10 @@ typedef __FILE FILE;
|
||||||
# define __FILE_defined
|
# define __FILE_defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
typedef _fpos64_t fpos_t;
|
|
||||||
#else
|
|
||||||
typedef _fpos_t fpos_t;
|
typedef _fpos_t fpos_t;
|
||||||
#ifdef __LARGE64_FILES
|
#ifdef __LARGE64_FILES
|
||||||
typedef _fpos64_t fpos64_t;
|
typedef _fpos64_t fpos64_t;
|
||||||
#endif
|
#endif
|
||||||
#endif /* !__CYGWIN__ */
|
|
||||||
|
|
||||||
#ifndef _OFF_T_DECLARED
|
#ifndef _OFF_T_DECLARED
|
||||||
typedef __off_t off_t;
|
typedef __off_t off_t;
|
||||||
|
|
|
@ -54,8 +54,6 @@ extern inline struct _reent *__getreent (void)
|
||||||
Just leave them alone. */
|
Just leave them alone. */
|
||||||
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
#define _READ_WRITE_RETURN_TYPE _ssize_t
|
||||||
#define _READ_WRITE_BUFSIZE_TYPE size_t
|
#define _READ_WRITE_BUFSIZE_TYPE size_t
|
||||||
#define __LARGE64_FILES 1
|
|
||||||
#define __USE_INTERNAL_STAT64 1
|
|
||||||
#define __LINUX_ERRNO_EXTENSIONS__ 1
|
#define __LINUX_ERRNO_EXTENSIONS__ 1
|
||||||
#define _MB_EXTENDED_CHARSETS_ALL 1
|
#define _MB_EXTENDED_CHARSETS_ALL 1
|
||||||
#define __HAVE_LOCALE_INFO__ 1
|
#define __HAVE_LOCALE_INFO__ 1
|
||||||
|
|
|
@ -4191,7 +4191,7 @@ gethostid (void)
|
||||||
|
|
||||||
#define ETC_SHELLS "/etc/shells"
|
#define ETC_SHELLS "/etc/shells"
|
||||||
static int shell_index;
|
static int shell_index;
|
||||||
static struct __sFILE64 *shell_fp;
|
static FILE *shell_fp;
|
||||||
|
|
||||||
extern "C" char *
|
extern "C" char *
|
||||||
getusershell ()
|
getusershell ()
|
||||||
|
@ -4210,7 +4210,7 @@ getusershell ()
|
||||||
static char buf[PATH_MAX];
|
static char buf[PATH_MAX];
|
||||||
int ch, buf_idx;
|
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])
|
if (def_shells[shell_index])
|
||||||
return strcpy (buf, def_shells[shell_index++]);
|
return strcpy (buf, def_shells[shell_index++]);
|
||||||
|
|
Loading…
Reference in New Issue