* libc/stdio64/local64.h: Delete, move contents to...

* libc/stdio/local.h: ...here.
	* libc/stdio64/fdopen64.c: Update includes.
	* libc/stdio64/fopen64.c: Likewise.
	* libc/stdio64/freopen64.c: Likewise.
	* libc/stdio64/fseeko64.c: Likewise.
	* libc/stdio64/ftello64.c: Likewise.
	* libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
	and stderr with 64-bit offset.
	* libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
	* libc/stdio/makebuf.c (__smakebuf_r): Likewise.
	* libc/stdio/mktemp.c (_gettemp): Likewise.
This commit is contained in:
Eric Blake 2007-05-01 23:03:36 +00:00
parent 2babeb3d94
commit b4f095585f
12 changed files with 70 additions and 45 deletions

View File

@ -1,3 +1,18 @@
2007-05-01 Eric Blake <ebb9@byu.net>
* libc/stdio64/local64.h: Delete, move contents to...
* libc/stdio/local.h: ...here.
* libc/stdio64/fdopen64.c: Update includes.
* libc/stdio64/fopen64.c: Likewise.
* libc/stdio64/freopen64.c: Likewise.
* libc/stdio64/fseeko64.c: Likewise.
* libc/stdio64/ftello64.c: Likewise.
* libc/stdio/findfp.c (std) [__LARGE64_FILES]: Open stdin, stdout,
and stderr with 64-bit offset.
* libc/stdio/fseek.c (_fseek_r): Avoid compile warning.
* libc/stdio/makebuf.c (__smakebuf_r): Likewise.
* libc/stdio/mktemp.c (_gettemp): Likewise.
2007-05-01 Cary R. <cygcary <at> yahoo.com>
* libm/math/e_pow.c: Fix to be consistent with glibc with regards

View File

@ -52,7 +52,13 @@ _DEFUN(std, (ptr, flags, file, data),
ptr->_lbfsize = 0;
ptr->_cookie = ptr;
ptr->_read = __sread;
#ifndef __LARGE64_FILES
ptr->_write = __swrite;
#else /* __LARGE64_FILES */
ptr->_write = __swrite64;
ptr->_seek64 = __sseek64;
ptr->_flags |= __SL64;
#endif /* __LARGE64_FILES */
ptr->_seek = __sseek;
ptr->_close = __sclose;
#if !defined(__SINGLE_THREAD__) && !defined(_REENT_SMALL)

View File

@ -126,7 +126,11 @@ _DEFUN(_fseek_r, (ptr, fp, offset, whence),
_fpos_t target;
_fpos_t curoff = 0;
size_t n;
#ifdef __USE_INTERNAL_STAT64
struct stat64 st;
#else
struct stat st;
#endif
int havepos;
/* Make sure stdio is set up. */

View File

@ -46,6 +46,14 @@ extern int _EXFUN(_fwalk,(struct _reent *, int (*)(FILE *)));
extern int _EXFUN(_fwalk_reent,(struct _reent *, int (*)(struct _reent *, FILE *)));
struct _glue * _EXFUN(__sfmoreglue,(struct _reent *,int n));
#ifdef __LARGE64_FILES
extern _fpos64_t _EXFUN(__sseek64,(void *, _fpos64_t, int));
extern _fpos64_t _EXFUN(__sseek64_r,(struct _reent *, void *, _fpos64_t, int));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(void *, char const *, int));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64_r,(struct _reent *, void *,
char const *, int));
#endif
/* Called by the main entry point fns to ensure stdio has been initialized. */
#ifdef _REENT_SMALL

View File

@ -41,7 +41,11 @@ _DEFUN(__smakebuf_r, (ptr, fp),
{
register size_t size, couldbetty;
register _PTR p;
#ifdef __USE_INTERNAL_STAT64
struct stat64 st;
#else
struct stat st;
#endif
if (fp->_flags & __SNBF)
{

View File

@ -108,7 +108,11 @@ _DEFUN(_gettemp, (ptr, path, doopen),
register int *doopen)
{
register char *start, *trv;
#ifdef __USE_INTERNAL_STAT64
struct stat64 sbuf;
#else
struct stat sbuf;
#endif
unsigned int pid;
pid = _getpid_r (ptr);

View File

@ -28,7 +28,7 @@ File pointer or <<NULL>>, as for <<fopen>>.
#include <stdio.h>
#include <errno.h>
#include "local64.h"
#include "local.h"
#include <_syslist.h>
#include <sys/lock.h>

View File

@ -66,7 +66,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include <stdio.h>
#include <errno.h>
#include "local64.h"
#include "local.h"
#ifdef __CYGWIN__
#include <fcntl.h>
#endif

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1990, 2006 The Regents of the University of California.
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@ -78,7 +78,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#include <fcntl.h>
#include <stdlib.h>
#include <sys/lock.h>
#include "local64.h"
#include "local.h"
/*
* Re-direct an existing, open (probably) file to some other file.

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1990, 2007 The Regents of the University of California.
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
@ -86,7 +86,7 @@ Supporting OS subroutines required: <<close>>, <<fstat64>>, <<isatty>>,
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "local64.h"
#include "local.h"
#define POS_ERR (-(_fpos64_t)1)

View File

@ -80,7 +80,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
#include <stdio.h>
#include <errno.h>
#include "local64.h"
#include "local.h"
#ifdef __LARGE64_FILES

View File

@ -1,16 +0,0 @@
/*
* Information local to this implementation of stdio64,
* in particular, macros and private variables.
*/
#include "local.h"
#ifdef __LARGE64_FILES
extern _fpos64_t _EXFUN(__sseek64,(void *, _fpos64_t, int));
extern _fpos64_t _EXFUN(__sseek64_r,(struct _reent *, void *, _fpos64_t, int));
extern _fpos64_t _EXFUN(__sseek64_error,(void *, _fpos64_t, int));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64,(void *, char const *, int));
extern _READ_WRITE_RETURN_TYPE _EXFUN(__swrite64_r,(struct _reent *, void *,
char const *, int));
#endif