mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-15 20:21:19 +08:00
Update to FreeBSD head 2017-08-01
Git mirror commit f5002f5e5f78cae9f0269d812dc0aedb0339312c. Update #3472.
This commit is contained in:
@@ -38,6 +38,9 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
#ifndef _STDIO_LOCAL_H
|
||||
#define _STDIO_LOCAL_H
|
||||
|
||||
#include <sys/types.h> /* for off_t */
|
||||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
@@ -65,7 +68,7 @@ extern FILE *__sfp(void);
|
||||
extern int __slbexpand(FILE *, size_t);
|
||||
#ifndef __rtems__
|
||||
extern int __srefill(FILE *);
|
||||
#else
|
||||
#else /* __rtems__ */
|
||||
/*
|
||||
* __srefill is used by fgetln(). The method is in newlib but the
|
||||
* prototype is in a private .h which is not installed.
|
||||
@@ -74,7 +77,7 @@ extern int __srefill(FILE *);
|
||||
extern int __srefill_r(struct _reent *,FILE *);
|
||||
|
||||
#define __srefill(_x) __srefill_r(__getreent(), _x)
|
||||
#endif
|
||||
#endif /* __rtems__ */
|
||||
extern int __sread(void *, char *, int);
|
||||
extern int __swrite(void *, char const *, int);
|
||||
extern fpos_t __sseek(void *, fpos_t, int);
|
||||
@@ -155,9 +158,32 @@ __fgetwc(FILE *fp, locale_t locale)
|
||||
*/
|
||||
#ifdef __rtems__
|
||||
#define ORIENT(fp, o)
|
||||
#else
|
||||
#else /* __rtems__ */
|
||||
#define ORIENT(fp, o) do { \
|
||||
if ((fp)->_orientation == 0) \
|
||||
(fp)->_orientation = (o); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
void __stdio_cancel_cleanup(void *);
|
||||
#define FLOCKFILE_CANCELSAFE(fp) \
|
||||
{ \
|
||||
struct _pthread_cleanup_info __cleanup_info__; \
|
||||
if (__isthreaded) { \
|
||||
_FLOCKFILE(fp); \
|
||||
___pthread_cleanup_push_imp( \
|
||||
__stdio_cancel_cleanup, (fp), \
|
||||
&__cleanup_info__); \
|
||||
} else { \
|
||||
___pthread_cleanup_push_imp( \
|
||||
__stdio_cancel_cleanup, NULL, \
|
||||
&__cleanup_info__); \
|
||||
} \
|
||||
{
|
||||
#define FUNLOCKFILE_CANCELSAFE() \
|
||||
(void)0; \
|
||||
} \
|
||||
___pthread_cleanup_pop_imp(1); \
|
||||
}
|
||||
|
||||
#endif /* __rtems__ */
|
||||
#endif /* _STDIO_LOCAL_H */
|
||||
|
Reference in New Issue
Block a user