Unbreak build: gnu sort has been configured to grope inside struct

__sFILE. It's opaque now, so add a function that returns the pending
output bytes.

Pointy hat: jhb
This commit is contained in:
Marcel Moolenaar 2008-05-03 23:36:00 +00:00
parent e1e27ead34
commit 0aca787a7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=178755
3 changed files with 11 additions and 1 deletions

View file

@ -1240,7 +1240,7 @@
#define PACKAGE_VERSION "5.3.0-20040812-FreeBSD"
/* the number of pending output bytes on stream `fp' */
#define PENDING_OUTPUT_N_BYTES fp->_p - fp->_bf._base
#define PENDING_OUTPUT_N_BYTES __fgetpendout(fp)
/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
/* #undef PRI_MACROS_BROKEN */

View file

@ -249,8 +249,11 @@ int setlinebuf(FILE *);
int vasprintf(char **, const char *, __va_list)
__printflike(2, 0);
/* XXX used by libftpio */
void *__fgetcookie(FILE *);
void __fsetfileno(FILE *, int);
/* XXX used by sort */
size_t __fgetpendout(FILE *);
/*
* The system error table contains messages for the first sys_nerr

View file

@ -53,6 +53,13 @@ __fgetcookie(FILE *fp)
return (fp->_cookie);
}
size_t
__fgetpendout(FILE *fp)
{
return (fp->_p - fp->_bf._base);
}
void
__fsetfileno(FILE *fp, int fd)
{