mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-30 02:50:25 +08:00
ansification: remove _PTR
Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
parent
0403b9c8c4
commit
e6321aa6a6
@ -47,7 +47,6 @@
|
||||
#endif
|
||||
|
||||
#ifdef _HAVE_STDC
|
||||
#define _PTR void *
|
||||
#define _VOLATILE volatile
|
||||
#define _SIGNED signed
|
||||
#define _VOID void
|
||||
@ -69,7 +68,6 @@
|
||||
#define _LONG_DOUBLE long double
|
||||
#endif
|
||||
#else
|
||||
#define _PTR char *
|
||||
#define _VOLATILE
|
||||
#define _SIGNED
|
||||
#define _VOID void
|
||||
|
@ -34,44 +34,44 @@ struct mallinfo {
|
||||
|
||||
/* The routines. */
|
||||
|
||||
extern _PTR malloc (size_t);
|
||||
extern void *malloc (size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _malloc_r
|
||||
#define _malloc_r(r, s) malloc (s)
|
||||
#else
|
||||
extern _PTR _malloc_r (struct _reent *, size_t);
|
||||
extern void *_malloc_r (struct _reent *, size_t);
|
||||
#endif
|
||||
|
||||
extern _VOID free (_PTR);
|
||||
extern _VOID free (void *);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _free_r
|
||||
#define _free_r(r, p) free (p)
|
||||
#else
|
||||
extern _VOID _free_r (struct _reent *, _PTR);
|
||||
extern _VOID _free_r (struct _reent *, void *);
|
||||
#endif
|
||||
|
||||
extern _PTR realloc (_PTR, size_t);
|
||||
extern void *realloc (void *, size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _realloc_r
|
||||
#define _realloc_r(r, p, s) realloc (p, s)
|
||||
#else
|
||||
extern _PTR _realloc_r (struct _reent *, _PTR, size_t);
|
||||
extern void *_realloc_r (struct _reent *, void *, size_t);
|
||||
#endif
|
||||
|
||||
extern _PTR calloc (size_t, size_t);
|
||||
extern void *calloc (size_t, size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _calloc_r
|
||||
#define _calloc_r(r, s1, s2) calloc (s1, s2);
|
||||
#else
|
||||
extern _PTR _calloc_r (struct _reent *, size_t, size_t);
|
||||
extern void *_calloc_r (struct _reent *, size_t, size_t);
|
||||
#endif
|
||||
|
||||
extern _PTR memalign (size_t, size_t);
|
||||
extern void *memalign (size_t, size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _memalign_r
|
||||
#define _memalign_r(r, s1, s2) memalign (s1, s2);
|
||||
#else
|
||||
extern _PTR _memalign_r (struct _reent *, size_t, size_t);
|
||||
extern void *_memalign_r (struct _reent *, size_t, size_t);
|
||||
#endif
|
||||
|
||||
extern struct mallinfo mallinfo (void);
|
||||
@ -98,31 +98,31 @@ extern int mallopt (int, int);
|
||||
extern int _mallopt_r (struct _reent *, int, int);
|
||||
#endif
|
||||
|
||||
extern size_t malloc_usable_size (_PTR);
|
||||
extern size_t malloc_usable_size (void *);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _malloc_usable_size_r
|
||||
#define _malloc_usable_size_r(r, p) malloc_usable_size (p)
|
||||
#else
|
||||
extern size_t _malloc_usable_size_r (struct _reent *, _PTR);
|
||||
extern size_t _malloc_usable_size_r (struct _reent *, void *);
|
||||
#endif
|
||||
|
||||
/* These aren't too useful on an embedded system, but we define them
|
||||
anyhow. */
|
||||
|
||||
extern _PTR valloc (size_t);
|
||||
extern void *valloc (size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _valloc_r
|
||||
#define _valloc_r(r, s) valloc (s)
|
||||
#else
|
||||
extern _PTR _valloc_r (struct _reent *, size_t);
|
||||
extern void *_valloc_r (struct _reent *, size_t);
|
||||
#endif
|
||||
|
||||
extern _PTR pvalloc (size_t);
|
||||
extern void *pvalloc (size_t);
|
||||
#ifdef __CYGWIN__
|
||||
#undef _pvalloc_r
|
||||
#define _pvalloc_r(r, s) pvalloc (s)
|
||||
#else
|
||||
extern _PTR _pvalloc_r (struct _reent *, size_t);
|
||||
extern void *_pvalloc_r (struct _reent *, size_t);
|
||||
#endif
|
||||
|
||||
extern int malloc_trim (size_t);
|
||||
@ -159,7 +159,7 @@ extern _VOID _mstats_r (struct _reent *, char *);
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
/* Some systems provide this, so do too for compatibility. */
|
||||
extern void cfree (_PTR);
|
||||
extern void cfree (void *);
|
||||
#endif /* __CYGWIN__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -220,8 +220,8 @@ int _EXFUN(putc, (int, FILE *));
|
||||
int _EXFUN(putchar, (int));
|
||||
int _EXFUN(puts, (const char *));
|
||||
int _EXFUN(ungetc, (int, FILE *));
|
||||
size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(fwrite, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
|
||||
size_t _EXFUN(fread, (void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(fwrite, (const void *__restrict , size_t _size, size_t _n, FILE *));
|
||||
#ifdef _COMPILING_NEWLIB
|
||||
int _EXFUN(fgetpos, (FILE *, _fpos_t *));
|
||||
#else
|
||||
@ -434,8 +434,8 @@ int _EXFUN(_fputc_r, (struct _reent *, int, FILE *));
|
||||
int _EXFUN(_fputc_unlocked_r, (struct _reent *, int, FILE *));
|
||||
int _EXFUN(_fputs_r, (struct _reent *, const char *__restrict, FILE *__restrict));
|
||||
int _EXFUN(_fputs_unlocked_r, (struct _reent *, const char *__restrict, FILE *__restrict));
|
||||
size_t _EXFUN(_fread_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fread_unlocked_r, (struct _reent *, _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fread_r, (struct _reent *, void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fread_unlocked_r, (struct _reent *, void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...)
|
||||
_ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
|
||||
int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int));
|
||||
@ -443,8 +443,8 @@ int _EXFUN(_fseeko_r,(struct _reent *, FILE *, _off_t, int));
|
||||
long _EXFUN(_ftell_r, (struct _reent *, FILE *));
|
||||
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *));
|
||||
void _EXFUN(_rewind_r, (struct _reent *, FILE *));
|
||||
size_t _EXFUN(_fwrite_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fwrite_unlocked_r, (struct _reent *, const _PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fwrite_r, (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(_fwrite_unlocked_r, (struct _reent *, const void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
int _EXFUN(_getc_r, (struct _reent *, FILE *));
|
||||
int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *));
|
||||
int _EXFUN(_getchar_r, (struct _reent *));
|
||||
@ -539,8 +539,8 @@ int _EXFUN(fileno_unlocked, (FILE *));
|
||||
int _EXFUN(fflush_unlocked, (FILE *));
|
||||
int _EXFUN(fgetc_unlocked, (FILE *));
|
||||
int _EXFUN(fputc_unlocked, (int, FILE *));
|
||||
size_t _EXFUN(fread_unlocked, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(fwrite_unlocked, (const _PTR __restrict , size_t _size, size_t _n, FILE *));
|
||||
size_t _EXFUN(fread_unlocked, (void *__restrict, size_t _size, size_t _n, FILE *__restrict));
|
||||
size_t _EXFUN(fwrite_unlocked, (const void *__restrict , size_t _size, size_t _n, FILE *));
|
||||
#endif
|
||||
|
||||
#if __GNU_VISIBLE
|
||||
@ -583,35 +583,35 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *));
|
||||
|
||||
#if __BSD_VISIBLE
|
||||
# ifdef __LARGE64_FILES
|
||||
FILE *_EXFUN(funopen,(const _PTR __cookie,
|
||||
int (*__readfn)(_PTR __c, char *__buf,
|
||||
FILE *_EXFUN(funopen,(const void *__cookie,
|
||||
int (*__readfn)(void *__c, char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
int (*__writefn)(_PTR __c, const char *__buf,
|
||||
int (*__writefn)(void *__c, const char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence),
|
||||
int (*__closefn)(_PTR __c)));
|
||||
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie,
|
||||
int (*__readfn)(_PTR __c, char *__buf,
|
||||
_fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
|
||||
int (*__closefn)(void *__c)));
|
||||
FILE *_EXFUN(_funopen_r,(struct _reent *, const void *__cookie,
|
||||
int (*__readfn)(void *__c, char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
int (*__writefn)(_PTR __c, const char *__buf,
|
||||
int (*__writefn)(void *__c, const char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence),
|
||||
int (*__closefn)(_PTR __c)));
|
||||
_fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
|
||||
int (*__closefn)(void *__c)));
|
||||
# else
|
||||
FILE *_EXFUN(funopen,(const _PTR __cookie,
|
||||
int (*__readfn)(_PTR __cookie, char *__buf,
|
||||
FILE *_EXFUN(funopen,(const void *__cookie,
|
||||
int (*__readfn)(void *__cookie, char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
int (*__writefn)(_PTR __cookie, const char *__buf,
|
||||
int (*__writefn)(void *__cookie, const char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence),
|
||||
int (*__closefn)(_PTR __cookie)));
|
||||
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie,
|
||||
int (*__readfn)(_PTR __cookie, char *__buf,
|
||||
fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
|
||||
int (*__closefn)(void *__cookie)));
|
||||
FILE *_EXFUN(_funopen_r,(struct _reent *, const void *__cookie,
|
||||
int (*__readfn)(void *__cookie, char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
int (*__writefn)(_PTR __cookie, const char *__buf,
|
||||
int (*__writefn)(void *__cookie, const char *__buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE __n),
|
||||
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence),
|
||||
int (*__closefn)(_PTR __cookie)));
|
||||
fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
|
||||
int (*__closefn)(void *__cookie)));
|
||||
# endif /* !__LARGE64_FILES */
|
||||
|
||||
# define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \
|
||||
|
@ -54,7 +54,7 @@ typedef struct
|
||||
|
||||
#ifndef __compar_fn_t_defined
|
||||
#define __compar_fn_t_defined
|
||||
typedef int (*__compar_fn_t) (const _PTR, const _PTR);
|
||||
typedef int (*__compar_fn_t) (const void *, const void *);
|
||||
#endif
|
||||
|
||||
#define EXIT_FAILURE 1
|
||||
@ -82,15 +82,15 @@ int _EXFUN(atoi,(const char *__nptr));
|
||||
int _EXFUN(_atoi_r,(struct _reent *, const char *__nptr));
|
||||
long _EXFUN(atol,(const char *__nptr));
|
||||
long _EXFUN(_atol_r,(struct _reent *, const char *__nptr));
|
||||
_PTR _EXFUN(bsearch,(const _PTR __key,
|
||||
const _PTR __base,
|
||||
void * _EXFUN(bsearch,(const void *__key,
|
||||
const void *__base,
|
||||
size_t __nmemb,
|
||||
size_t __size,
|
||||
__compar_fn_t _compar));
|
||||
_PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
|
||||
void * _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size));
|
||||
div_t _EXFUN(div,(int __numer, int __denom));
|
||||
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__)));
|
||||
_VOID _EXFUN_NOTHROW(free,(_PTR));
|
||||
_VOID _EXFUN_NOTHROW(free,(void *));
|
||||
char * _EXFUN(getenv,(const char *__string));
|
||||
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
|
||||
char * _EXFUN(_findenv,(const char *, int *));
|
||||
@ -101,7 +101,7 @@ int _EXFUN(getsubopt,(char **, char * const *, char **));
|
||||
#endif
|
||||
long _EXFUN(labs,(long));
|
||||
ldiv_t _EXFUN(ldiv,(long __numer, long __denom));
|
||||
_PTR _EXFUN_NOTHROW(malloc,(size_t __size));
|
||||
void * _EXFUN_NOTHROW(malloc,(size_t __size));
|
||||
int _EXFUN(mblen,(const char *, size_t));
|
||||
int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
|
||||
int _EXFUN(mbtowc,(wchar_t *__restrict, const char *__restrict, size_t));
|
||||
@ -136,13 +136,13 @@ int _EXFUN(_mkostemps_r, (struct _reent *, char *, int, int));
|
||||
int _EXFUN(_mkstemp_r, (struct _reent *, char *));
|
||||
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int));
|
||||
char * _EXFUN(_mktemp_r, (struct _reent *, char *) _ATTRIBUTE ((__deprecated__("the use of `mktemp' is dangerous; use `mkstemp' instead"))));
|
||||
_VOID _EXFUN(qsort,(_PTR __base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
|
||||
_VOID _EXFUN(qsort,(void *__base, size_t __nmemb, size_t __size, __compar_fn_t _compar));
|
||||
int _EXFUN(rand,(_VOID));
|
||||
_PTR _EXFUN_NOTHROW(realloc,(_PTR __r, size_t __size));
|
||||
void * _EXFUN_NOTHROW(realloc,(void *__r, size_t __size));
|
||||
#if __BSD_VISIBLE
|
||||
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
|
||||
__alloc_size(3);
|
||||
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size));
|
||||
void * _EXFUN(reallocf,(void *__r, size_t __size));
|
||||
#endif
|
||||
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4
|
||||
char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path));
|
||||
@ -193,7 +193,7 @@ char * _EXFUN(l64a,(long __input));
|
||||
char * _EXFUN(_l64a_r,(struct _reent *,long __input));
|
||||
#endif
|
||||
#if __MISC_VISIBLE
|
||||
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg));
|
||||
int _EXFUN(on_exit,(_VOID (*__func)(int, void *),void *__arg));
|
||||
#endif
|
||||
#if __ISO_C_VISIBLE >= 1999
|
||||
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
|
||||
@ -202,7 +202,7 @@ _VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
|
||||
int _EXFUN(putenv,(char *__string));
|
||||
#endif
|
||||
int _EXFUN(_putenv_r,(struct _reent *, char *__string));
|
||||
_PTR _EXFUN(_reallocf_r,(struct _reent *, _PTR, size_t));
|
||||
void * _EXFUN(_reallocf_r,(struct _reent *, void *, size_t));
|
||||
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
|
||||
int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
|
||||
#endif
|
||||
@ -273,7 +273,7 @@ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict _
|
||||
|
||||
#ifndef __CYGWIN__
|
||||
#if __MISC_VISIBLE
|
||||
_VOID _EXFUN(cfree,(_PTR));
|
||||
_VOID _EXFUN(cfree,(void *));
|
||||
#endif
|
||||
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
|
||||
int _EXFUN(unsetenv,(const char *__string));
|
||||
@ -287,10 +287,10 @@ int _EXFUN(__nonnull ((1)) posix_memalign,(void **, size_t, size_t));
|
||||
|
||||
char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
|
||||
#ifndef __CYGWIN__
|
||||
_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
|
||||
_PTR _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t));
|
||||
_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, _PTR));
|
||||
_PTR _EXFUN_NOTHROW(_realloc_r,(struct _reent *, _PTR, size_t));
|
||||
void * _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
|
||||
void * _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t));
|
||||
_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, void *));
|
||||
void * _EXFUN_NOTHROW(_realloc_r,(struct _reent *, void *, size_t));
|
||||
_VOID _EXFUN(_mstats_r,(struct _reent *, char *));
|
||||
#endif
|
||||
int _EXFUN(_system_r,(struct _reent *, const char *));
|
||||
@ -302,13 +302,13 @@ _VOID _EXFUN(__eprintf,(const char *, const char *, unsigned int, const char *))
|
||||
version. We want that #undef qsort_r will still let you
|
||||
invoke the underlying function, but that requires gcc support. */
|
||||
#if __GNU_VISIBLE
|
||||
_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, int (*_compar)(const _PTR, const _PTR, _PTR), _PTR __thunk));
|
||||
_VOID _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, int (*_compar)(const void *, const void *, void *), void *__thunk));
|
||||
#elif __BSD_VISIBLE
|
||||
# ifdef __GNUC__
|
||||
_VOID _EXFUN(qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)))
|
||||
_VOID _EXFUN(qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)))
|
||||
__asm__ (__ASMNAME ("__bsd_qsort_r"));
|
||||
# else
|
||||
_VOID _EXFUN(__bsd_qsort_r,(_PTR __base, size_t __nmemb, size_t __size, _PTR __thunk, int (*_compar)(_PTR, const _PTR, const _PTR)));
|
||||
_VOID _EXFUN(__bsd_qsort_r,(void *__base, size_t __nmemb, size_t __size, void *__thunk, int (*_compar)(void *, const void *, const void *)));
|
||||
# define qsort_r __bsd_qsort_r
|
||||
# endif
|
||||
#endif
|
||||
|
@ -26,11 +26,11 @@
|
||||
|
||||
_BEGIN_STD_C
|
||||
|
||||
_PTR _EXFUN(memchr,(const _PTR, int, size_t));
|
||||
int _EXFUN(memcmp,(const _PTR, const _PTR, size_t));
|
||||
_PTR _EXFUN(memcpy,(_PTR __restrict, const _PTR __restrict, size_t));
|
||||
_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t));
|
||||
_PTR _EXFUN(memset,(_PTR, int, size_t));
|
||||
void * _EXFUN(memchr,(const void *, int, size_t));
|
||||
int _EXFUN(memcmp,(const void *, const void *, size_t));
|
||||
void * _EXFUN(memcpy,(void *__restrict, const void *__restrict, size_t));
|
||||
void * _EXFUN(memmove,(void *, const void *, size_t));
|
||||
void * _EXFUN(memset,(void *, int, size_t));
|
||||
char *_EXFUN(strcat,(char *__restrict, const char *__restrict));
|
||||
char *_EXFUN(strchr,(const char *, int));
|
||||
int _EXFUN(strcmp,(const char *, const char *));
|
||||
@ -64,13 +64,13 @@ int _EXFUN(timingsafe_bcmp,(const void *, const void *, size_t));
|
||||
int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t));
|
||||
#endif
|
||||
#if __MISC_VISIBLE || __POSIX_VISIBLE
|
||||
_PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t));
|
||||
void * _EXFUN(memccpy,(void *__restrict, const void *__restrict, int, size_t));
|
||||
#endif
|
||||
#if __GNU_VISIBLE
|
||||
_PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t));
|
||||
_PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t));
|
||||
_PTR _EXFUN(memrchr,(const _PTR, int, size_t));
|
||||
_PTR _EXFUN(rawmemchr,(const _PTR, int));
|
||||
void * _EXFUN(mempcpy,(void *, const void *, size_t));
|
||||
void * _EXFUN(memmem, (const void *, size_t, const void *, size_t));
|
||||
void * _EXFUN(memrchr,(const void *, int, size_t));
|
||||
void * _EXFUN(rawmemchr,(const void *, int));
|
||||
#endif
|
||||
#if __POSIX_VISIBLE >= 200809
|
||||
char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict));
|
||||
|
@ -192,15 +192,15 @@ struct __sFILE {
|
||||
#endif
|
||||
|
||||
/* operations */
|
||||
_PTR _cookie; /* cookie passed to io functions */
|
||||
void * _cookie; /* cookie passed to io functions */
|
||||
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, void *,
|
||||
char *, _READ_WRITE_BUFSIZE_TYPE));
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, void *,
|
||||
const char *,
|
||||
_READ_WRITE_BUFSIZE_TYPE));
|
||||
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
|
||||
int _EXFNPTR(_close, (struct _reent *, _PTR));
|
||||
_fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int));
|
||||
int _EXFNPTR(_close, (struct _reent *, void *));
|
||||
|
||||
/* separate buffer for long sequences of ungetc() */
|
||||
struct __sbuf _ub; /* ungetc buffer */
|
||||
@ -248,15 +248,15 @@ struct __sFILE64 {
|
||||
struct _reent *_data;
|
||||
|
||||
/* operations */
|
||||
_PTR _cookie; /* cookie passed to io functions */
|
||||
void * _cookie; /* cookie passed to io functions */
|
||||
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR,
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, void *,
|
||||
char *, _READ_WRITE_BUFSIZE_TYPE));
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR,
|
||||
_READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, void *,
|
||||
const char *,
|
||||
_READ_WRITE_BUFSIZE_TYPE));
|
||||
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int));
|
||||
int _EXFNPTR(_close, (struct _reent *, _PTR));
|
||||
_fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int));
|
||||
int _EXFNPTR(_close, (struct _reent *, void *));
|
||||
|
||||
/* separate buffer for long sequences of ungetc() */
|
||||
struct __sbuf _ub; /* ungetc buffer */
|
||||
@ -275,7 +275,7 @@ struct __sFILE64 {
|
||||
int _flags2; /* for future use */
|
||||
|
||||
_off64_t _offset; /* current lseek offset */
|
||||
_fpos64_t _EXFNPTR(_seek64, (struct _reent *, _PTR, _fpos64_t, int));
|
||||
_fpos64_t _EXFNPTR(_seek64, (struct _reent *, void *, _fpos64_t, int));
|
||||
|
||||
#ifndef __SINGLE_THREAD__
|
||||
_flock_t _lock; /* for thread-safety locking */
|
||||
|
@ -3,14 +3,14 @@
|
||||
|
||||
# if defined(__ALTIVEC__)
|
||||
|
||||
_PTR _EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
|
||||
_PTR _EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
|
||||
_VOID _EXFUN(vec_free,(_PTR));
|
||||
void *_EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
|
||||
void *_EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
|
||||
_VOID _EXFUN(vec_free,(void *));
|
||||
#define _vec_freer _freer
|
||||
_PTR _EXFUN(vec_malloc,(size_t __size));
|
||||
void *_EXFUN(vec_malloc,(size_t __size));
|
||||
#define _vec_mallocr _memalign_r
|
||||
_PTR _EXFUN(vec_realloc,(_PTR __r, size_t __size));
|
||||
_PTR _EXFUN(_vec_realloc_r,(struct _reent *, _PTR __r, size_t __size));
|
||||
void *_EXFUN(vec_realloc,(void *__r, size_t __size));
|
||||
void *_EXFUN(_vec_realloc_r,(struct _reent *, void *__r, size_t __size));
|
||||
|
||||
# endif /* __ALTIVEC__ */
|
||||
|
||||
|
@ -5,14 +5,14 @@
|
||||
|
||||
# if defined(__ALTIVEC__)
|
||||
|
||||
_PTR _EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
|
||||
_PTR _EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
|
||||
_VOID _EXFUN(vec_free,(_PTR));
|
||||
void *_EXFUN(vec_calloc,(size_t __nmemb, size_t __size));
|
||||
void *_EXFUN(_vec_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
|
||||
_VOID _EXFUN(vec_free,(void *));
|
||||
#define _vec_freer _freer
|
||||
_PTR _EXFUN(vec_malloc,(size_t __size));
|
||||
void *_EXFUN(vec_malloc,(size_t __size));
|
||||
#define _vec_mallocr _memalign_r
|
||||
_PTR _EXFUN(vec_realloc,(_PTR __r, size_t __size));
|
||||
_PTR _EXFUN(_vec_realloc_r,(struct _reent *, _PTR __r, size_t __size));
|
||||
void *_EXFUN(vec_realloc,(void *__r, size_t __size));
|
||||
void *_EXFUN(_vec_realloc_r,(struct _reent *, void *__r, size_t __size));
|
||||
|
||||
# endif /* __ALTIVEC__ */
|
||||
|
||||
|
@ -43,7 +43,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (vec_calloc, (n, size),
|
||||
size_t n,
|
||||
size_t size)
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
void
|
||||
_DEFUN (vec_free, (aptr),
|
||||
_PTR aptr)
|
||||
void *aptr)
|
||||
{
|
||||
_free_r (_REENT, aptr);
|
||||
}
|
||||
|
@ -95,7 +95,7 @@ Supporting OS subroutines required: <<sbrk>>. */
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (vec_malloc, (nbytes),
|
||||
size_t nbytes) /* get a block */
|
||||
{
|
||||
|
@ -6,9 +6,9 @@
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (vec_realloc, (ap, nbytes),
|
||||
_PTR ap,
|
||||
void *ap,
|
||||
size_t nbytes)
|
||||
{
|
||||
return _vec_realloc_r (_REENT, ap, nbytes);
|
||||
|
@ -928,7 +928,7 @@ __svfscanf_r (rptr, fp, fmt0, ap)
|
||||
*p = 0;
|
||||
res = (*ccfn) (rptr, buf, (char **) NULL, base);
|
||||
if ((flags & POINTER) && !(flags & VECTOR))
|
||||
*(va_arg (ap, _PTR *)) = (_PTR) (unsigned _POINTER_INT) res;
|
||||
*(va_arg (ap, void **)) = (void *) (unsigned _POINTER_INT) res;
|
||||
else if (flags & SHORT)
|
||||
{
|
||||
if (!(flags & VECTOR))
|
||||
|
@ -50,7 +50,7 @@ typedef struct
|
||||
|
||||
size_t
|
||||
_DEFUN (fread, (buf, size, count, fp),
|
||||
_PTR __restrict buf,
|
||||
void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE *__restrict fp)
|
||||
|
@ -50,7 +50,7 @@ typedef struct
|
||||
|
||||
size_t
|
||||
_DEFUN (fwrite, (buf, size, count, fp),
|
||||
const _PTR __restrict buf,
|
||||
const void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE * fp)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#include <malloc.h>
|
||||
|
||||
#ifdef DEFINE_MALLOC
|
||||
_PTR
|
||||
void *
|
||||
_malloc_r (struct _reent *r, size_t sz)
|
||||
{
|
||||
return malloc (sz);
|
||||
@ -9,7 +9,7 @@ _malloc_r (struct _reent *r, size_t sz)
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_CALLOC
|
||||
_PTR
|
||||
void *
|
||||
_calloc_r (struct _reent *r, size_t a, size_t b)
|
||||
{
|
||||
return calloc (a, b);
|
||||
@ -18,15 +18,15 @@ _calloc_r (struct _reent *r, size_t a, size_t b)
|
||||
|
||||
#ifdef DEFINE_FREE
|
||||
void
|
||||
_free_r (struct _reent *r, _PTR x)
|
||||
_free_r (struct _reent *r, void *x)
|
||||
{
|
||||
free (x);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEFINE_REALLOC
|
||||
_PTR
|
||||
_realloc_r (struct _reent *r, _PTR x, size_t sz)
|
||||
void *
|
||||
_realloc_r (struct _reent *r, void *x, size_t sz)
|
||||
{
|
||||
return realloc (x, sz);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ _ssize_t
|
||||
_DEFUN (_read_r, (ptr, fd, buf, cnt),
|
||||
struct _reent *ptr,
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t cnt)
|
||||
{
|
||||
_ssize_t ret;
|
||||
|
@ -41,7 +41,7 @@ _ssize_t
|
||||
_DEFUN (_write_r, (ptr, fd, buf, cnt),
|
||||
struct _reent *ptr,
|
||||
int fd,
|
||||
const _PTR buf,
|
||||
const void *buf,
|
||||
size_t cnt)
|
||||
{
|
||||
_ssize_t ret;
|
||||
|
@ -55,15 +55,15 @@ No supporting OS subroutines are required.
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (bsearch, (key, base, nmemb, size, compar),
|
||||
const _PTR key,
|
||||
const _PTR base,
|
||||
const void *key,
|
||||
const void *base,
|
||||
size_t nmemb,
|
||||
size_t size,
|
||||
int _EXFNPTR(compar, (const _PTR, const _PTR)))
|
||||
int _EXFNPTR(compar, (const void *, const void *)))
|
||||
{
|
||||
_PTR current;
|
||||
void *current;
|
||||
size_t lower = 0;
|
||||
size_t upper = nmemb;
|
||||
size_t index;
|
||||
@ -75,7 +75,7 @@ _DEFUN (bsearch, (key, base, nmemb, size, compar),
|
||||
while (lower < upper)
|
||||
{
|
||||
index = (lower + upper) / 2;
|
||||
current = (_PTR) (((char *) base) + (index * size));
|
||||
current = (void *) (((char *) base) + (index * size));
|
||||
|
||||
result = compar (key, current);
|
||||
|
||||
|
@ -94,7 +94,7 @@ _DEFUN(_fdopen_r, (ptr, fd, mode),
|
||||
_fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND);
|
||||
#endif
|
||||
fp->_file = fd;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
|
||||
#undef _read
|
||||
#undef _write
|
||||
|
@ -164,20 +164,20 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
|
||||
*/
|
||||
if (len > n)
|
||||
len = n;
|
||||
t = (unsigned char *) memchr ((_PTR) p, '\n', len);
|
||||
t = (unsigned char *) memchr ((void *) p, '\n', len);
|
||||
if (t != 0)
|
||||
{
|
||||
len = ++t - p;
|
||||
fp->_r -= len;
|
||||
fp->_p = t;
|
||||
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len);
|
||||
_CAST_VOID memcpy ((void *) s, (void *) p, len);
|
||||
s[len] = 0;
|
||||
_newlib_flockfile_exit (fp);
|
||||
return (buf);
|
||||
}
|
||||
fp->_r -= len;
|
||||
fp->_p += len;
|
||||
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len);
|
||||
_CAST_VOID memcpy ((void *) s, (void *) p, len);
|
||||
s += len;
|
||||
}
|
||||
while ((n -= len) != 0);
|
||||
|
@ -142,7 +142,7 @@ _DEFUN(_fopen_r, (ptr, file, mode),
|
||||
|
||||
fp->_file = f;
|
||||
fp->_flags = flags;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
fp->_read = __sread;
|
||||
fp->_write = __swrite;
|
||||
fp->_seek = __sseek;
|
||||
|
@ -144,7 +144,7 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof),
|
||||
size_t
|
||||
_DEFUN(_fread_r, (ptr, buf, size, count, fp),
|
||||
struct _reent * ptr,
|
||||
_PTR __restrict buf,
|
||||
void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE * __restrict fp)
|
||||
@ -173,7 +173,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
|
||||
{
|
||||
/* First copy any available characters from ungetc buffer. */
|
||||
int copy_size = resid > fp->_r ? fp->_r : resid;
|
||||
_CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) copy_size);
|
||||
_CAST_VOID memcpy ((void *) p, (void *) fp->_p, (size_t) copy_size);
|
||||
fp->_p += copy_size;
|
||||
fp->_r -= copy_size;
|
||||
p += copy_size;
|
||||
@ -222,7 +222,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
|
||||
{
|
||||
while (resid > (r = fp->_r))
|
||||
{
|
||||
_CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) r);
|
||||
_CAST_VOID memcpy ((void *) p, (void *) fp->_p, (size_t) r);
|
||||
fp->_p += r;
|
||||
/* fp->_r = 0 ... done in __srefill */
|
||||
p += r;
|
||||
@ -241,7 +241,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
|
||||
return (total - resid) / size;
|
||||
}
|
||||
}
|
||||
_CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, resid);
|
||||
_CAST_VOID memcpy ((void *) p, (void *) fp->_p, resid);
|
||||
fp->_r -= resid;
|
||||
fp->_p += resid;
|
||||
}
|
||||
@ -261,7 +261,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
|
||||
#ifndef _REENT_ONLY
|
||||
size_t
|
||||
_DEFUN(fread, (buf, size, count, fp),
|
||||
_PTR __restrict buf,
|
||||
void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE *__restrict fp)
|
||||
|
@ -221,7 +221,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
|
||||
|
||||
fp->_flags = flags;
|
||||
fp->_file = f;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
fp->_read = __sread;
|
||||
fp->_write = __swrite;
|
||||
fp->_seek = __sseek;
|
||||
|
@ -99,7 +99,7 @@ _DEFUN(_fseeko_r, (ptr, fp, offset, whence),
|
||||
_off_t offset,
|
||||
int whence)
|
||||
{
|
||||
_fpos_t _EXFNPTR(seekfn, (struct _reent *, _PTR, _fpos_t, int));
|
||||
_fpos_t _EXFNPTR(seekfn, (struct _reent *, void *, _fpos_t, int));
|
||||
_fpos_t target;
|
||||
_fpos_t curoff = 0;
|
||||
size_t n;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "fvwrite.h"
|
||||
|
||||
#define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#define COPY(n) _CAST_VOID memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (n))
|
||||
#define COPY(n) _CAST_VOID memmove ((void *) fp->_p, (void *) p, (size_t) (n))
|
||||
|
||||
#define GETIOV(extra_work) \
|
||||
while (len == 0) \
|
||||
@ -219,7 +219,7 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
|
||||
GETIOV (nlknown = 0);
|
||||
if (!nlknown)
|
||||
{
|
||||
nl = memchr ((_PTR) p, '\n', len);
|
||||
nl = memchr ((void *) p, '\n', len);
|
||||
nldist = nl ? nl + 1 - p : len + 1;
|
||||
nlknown = 1;
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
* I/O descriptors for __sfvwrite_r().
|
||||
*/
|
||||
struct __siov {
|
||||
const _PTR iov_base;
|
||||
const void *iov_base;
|
||||
size_t iov_len;
|
||||
};
|
||||
struct __suio {
|
||||
|
@ -110,7 +110,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
|
||||
size_t
|
||||
_DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
|
||||
struct _reent * ptr,
|
||||
const _PTR __restrict buf,
|
||||
const void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE * __restrict fp)
|
||||
@ -171,7 +171,7 @@ ret:
|
||||
#ifndef _REENT_ONLY
|
||||
size_t
|
||||
_DEFUN(fwrite, (buf, size, count, fp),
|
||||
const _PTR __restrict buf,
|
||||
const void *__restrict buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE * fp)
|
||||
|
@ -39,7 +39,7 @@ _DEFUN(__smakebuf_r, (ptr, fp),
|
||||
struct _reent *ptr,
|
||||
register FILE *fp)
|
||||
{
|
||||
register _PTR p;
|
||||
register void *p;
|
||||
int flags;
|
||||
size_t size;
|
||||
int couldbetty;
|
||||
|
@ -239,7 +239,7 @@ _DEFUN(__ssputs_r, (ptr, fp, buf, len),
|
||||
if (len < w)
|
||||
w = len;
|
||||
|
||||
(void)memmove ((_PTR) fp->_p, (_PTR) buf, (size_t) (w));
|
||||
(void)memmove ((void *) fp->_p, (void *) buf, (size_t) (w));
|
||||
fp->_w -= w;
|
||||
fp->_p += w;
|
||||
return 0;
|
||||
@ -331,7 +331,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
|
||||
if (len < w)
|
||||
w = len;
|
||||
|
||||
(void)memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (w));
|
||||
(void)memmove ((void *) fp->_p, (void *) p, (size_t) (w));
|
||||
fp->_w -= w;
|
||||
fp->_p += w;
|
||||
/* Pretend we copied all. */
|
||||
|
@ -114,7 +114,7 @@ extern char *_dtoa_r (struct _reent *, double, int,
|
||||
#define u_quad_t unsigned long
|
||||
|
||||
typedef quad_t * quad_ptr_t;
|
||||
typedef _PTR void_ptr_t;
|
||||
typedef void *void_ptr_t;
|
||||
typedef char * char_ptr_t;
|
||||
typedef long * long_ptr_t;
|
||||
typedef int * int_ptr_t;
|
||||
|
@ -264,7 +264,7 @@ _DEFUN(__ssrefill_r, (ptr, fp),
|
||||
#else
|
||||
int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *));
|
||||
int _EXFUN (__ssrefill_r, (struct _reent *, register FILE *));
|
||||
size_t _EXFUN (_sfread_r, (struct _reent *, _PTR buf, size_t, size_t, FILE *));
|
||||
size_t _EXFUN (_sfread_r, (struct _reent *, void *buf, size_t, size_t, FILE *));
|
||||
#endif /* !STRING_ONLY. */
|
||||
|
||||
int
|
||||
|
@ -123,7 +123,7 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
|
||||
FREEUB(reent, fp);
|
||||
fp->_r = fp->_lbfsize = 0;
|
||||
if (fp->_flags & __SMBF)
|
||||
_free_r (reent, (_PTR) fp->_bf._base);
|
||||
_free_r (reent, (void *) fp->_bf._base);
|
||||
fp->_flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
|
||||
|
||||
if (mode == _IONBF)
|
||||
|
@ -65,7 +65,7 @@ _DEFUN(__sread, (ptr, cookie, buf, n),
|
||||
_READ_WRITE_RETURN_TYPE
|
||||
_DEFUN(__seofread, (ptr, cookie, buf, len),
|
||||
struct _reent *_ptr,
|
||||
_PTR cookie,
|
||||
void *cookie,
|
||||
char *buf,
|
||||
_READ_WRITE_BUFSIZE_TYPE len)
|
||||
{
|
||||
|
@ -100,10 +100,10 @@ _DEFUN(__submore, (rptr, fp),
|
||||
return 0;
|
||||
}
|
||||
i = fp->_ub._size;
|
||||
p = (unsigned char *) _realloc_r (rptr, (_PTR) (fp->_ub._base), i << 1);
|
||||
p = (unsigned char *) _realloc_r (rptr, (void *) (fp->_ub._base), i << 1);
|
||||
if (p == NULL)
|
||||
return EOF;
|
||||
_CAST_VOID memcpy ((_PTR) (p + i), (_PTR) p, (size_t) i);
|
||||
_CAST_VOID memcpy ((void *) (p + i), (void *) p, (size_t) i);
|
||||
fp->_p = p + i;
|
||||
fp->_ub._base = p;
|
||||
fp->_ub._size = i << 1;
|
||||
|
@ -254,7 +254,7 @@ _DEFUN(__ssputs_r, (ptr, fp, buf, len),
|
||||
}
|
||||
if (len < w)
|
||||
w = len;
|
||||
(void)memmove ((_PTR) fp->_p, (_PTR) buf, (size_t) (w));
|
||||
(void)memmove ((void *) fp->_p, (void *) buf, (size_t) (w));
|
||||
fp->_w -= w;
|
||||
fp->_p += w;
|
||||
|
||||
@ -339,7 +339,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
|
||||
}
|
||||
if (len < w)
|
||||
w = len;
|
||||
(void)memmove ((_PTR) fp->_p, (_PTR) p, (size_t) (w));
|
||||
(void)memmove ((void *) fp->_p, (void *) p, (size_t) (w));
|
||||
fp->_w -= w;
|
||||
fp->_p += w;
|
||||
w = len; /* pretend we copied all */
|
||||
@ -571,7 +571,7 @@ static int exponent(char *, int, int);
|
||||
#endif
|
||||
|
||||
typedef quad_t * quad_ptr_t;
|
||||
typedef _PTR void_ptr_t;
|
||||
typedef void *void_ptr_t;
|
||||
typedef char * char_ptr_t;
|
||||
typedef long * long_ptr_t;
|
||||
typedef int * int_ptr_t;
|
||||
@ -1175,7 +1175,7 @@ reswitch: switch (ch) {
|
||||
if (ch == 'C' || (flags & LONGINT)) {
|
||||
mbstate_t ps;
|
||||
|
||||
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&ps, '\0', sizeof (mbstate_t));
|
||||
if ((size = (int)_wcrtomb_r (data, cp,
|
||||
(wchar_t)GET_ARG (N, ap, wint_t),
|
||||
&ps)) == -1) {
|
||||
@ -1463,7 +1463,7 @@ string:
|
||||
|
||||
wcp = (const wchar_t *)cp;
|
||||
size = m = 0;
|
||||
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&ps, '\0', sizeof (mbstate_t));
|
||||
|
||||
/* Count number of bytes needed for multibyte
|
||||
string that will be produced from widechar
|
||||
@ -1509,7 +1509,7 @@ string:
|
||||
cp = buf;
|
||||
|
||||
/* Convert widechar string to multibyte string. */
|
||||
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&ps, '\0', sizeof (mbstate_t));
|
||||
if (_wcsrtombs_r (data, cp, &wcp, size, &ps)
|
||||
!= size) {
|
||||
fp->_flags |= __SERR;
|
||||
|
@ -349,7 +349,7 @@ _DEFUN(__ssrefill_r, (ptr, fp),
|
||||
size_t
|
||||
_DEFUN(_sfread_r, (ptr, buf, size, count, fp),
|
||||
struct _reent * ptr,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t size,
|
||||
size_t count,
|
||||
FILE * fp)
|
||||
@ -367,7 +367,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
|
||||
|
||||
while (resid > (r = fp->_r))
|
||||
{
|
||||
_CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, (size_t) r);
|
||||
_CAST_VOID memcpy ((void *) p, (void *) fp->_p, (size_t) r);
|
||||
fp->_p += r;
|
||||
fp->_r = 0;
|
||||
p += r;
|
||||
@ -378,7 +378,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
|
||||
return (total - resid) / size;
|
||||
}
|
||||
}
|
||||
_CAST_VOID memcpy ((_PTR) p, (_PTR) fp->_p, resid);
|
||||
_CAST_VOID memcpy ((void *) p, (void *) fp->_p, resid);
|
||||
fp->_r -= resid;
|
||||
fp->_p += resid;
|
||||
return count;
|
||||
@ -386,7 +386,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
|
||||
#else /* !STRING_ONLY || !INTEGER_ONLY */
|
||||
int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *));
|
||||
int _EXFUN (__ssrefill_r, (struct _reent *, register FILE *));
|
||||
size_t _EXFUN (_sfread_r, (struct _reent *, _PTR buf, size_t, size_t, FILE *));
|
||||
size_t _EXFUN (_sfread_r, (struct _reent *, void *buf, size_t, size_t, FILE *));
|
||||
#endif /* !STRING_ONLY || !INTEGER_ONLY */
|
||||
|
||||
static inline int
|
||||
|
@ -289,7 +289,7 @@ static int wexponent(wchar_t *, int, int);
|
||||
#endif
|
||||
|
||||
typedef quad_t * quad_ptr_t;
|
||||
typedef _PTR void_ptr_t;
|
||||
typedef void *void_ptr_t;
|
||||
typedef char * char_ptr_t;
|
||||
typedef wchar_t* wchar_ptr_t;
|
||||
typedef long * long_ptr_t;
|
||||
@ -1199,7 +1199,7 @@ string:
|
||||
|
||||
if (prec >= 0) {
|
||||
char *p = arg;
|
||||
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&ps, '\0', sizeof (mbstate_t));
|
||||
while (nchars < (size_t)prec) {
|
||||
nconv = mbrlen (p, MB_CUR_MAX, &ps);
|
||||
if (nconv == 0 || nconv == (size_t)-1 ||
|
||||
@ -1224,7 +1224,7 @@ string:
|
||||
cp = malloc_buf;
|
||||
} else
|
||||
cp = buf;
|
||||
memset ((_PTR)&ps, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&ps, '\0', sizeof (mbstate_t));
|
||||
p = cp;
|
||||
while (insize != 0) {
|
||||
nconv = _mbrtowc_r (data, p, arg, insize, &ps);
|
||||
|
@ -936,7 +936,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
|
||||
else
|
||||
mbp = GET_ARG(N, ap, char *);
|
||||
n = 0;
|
||||
memset ((_PTR)&mbs, '\0', sizeof (mbstate_t));
|
||||
memset ((void *)&mbs, '\0', sizeof (mbstate_t));
|
||||
while (width != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF)
|
||||
{
|
||||
nconv = _wcrtomb_r (rptr, mbp, wi, &mbs);
|
||||
@ -1028,7 +1028,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
|
||||
else
|
||||
mbp = GET_ARG(N, ap, char *);
|
||||
n = 0;
|
||||
memset ((_PTR) &mbs, '\0', sizeof (mbstate_t));
|
||||
memset ((void *) &mbs, '\0', sizeof (mbstate_t));
|
||||
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
|
||||
&& width != 0 && INCCL (wi))
|
||||
{
|
||||
@ -1117,7 +1117,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
|
||||
#endif
|
||||
else
|
||||
mbp = GET_ARG(N, ap, char *);
|
||||
memset ((_PTR) &mbs, '\0', sizeof (mbstate_t));
|
||||
memset ((void *) &mbs, '\0', sizeof (mbstate_t));
|
||||
while ((wi = _fgetwc_r (rptr, fp)) != WEOF
|
||||
&& width != 0 && !iswspace (wi))
|
||||
{
|
||||
|
@ -76,7 +76,7 @@ _DEFUN (_fdopen64_r, (ptr, fd, mode),
|
||||
_fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND);
|
||||
#endif
|
||||
fp->_file = fd;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
|
||||
#undef _read
|
||||
#undef _write
|
||||
|
@ -93,7 +93,7 @@ _DEFUN (_fopen64_r, (ptr, file, mode),
|
||||
|
||||
fp->_file = f;
|
||||
fp->_flags = flags;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
fp->_read = __sread;
|
||||
fp->_write = __swrite64;
|
||||
fp->_seek = __sseek;
|
||||
|
@ -222,7 +222,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
|
||||
|
||||
fp->_flags = flags;
|
||||
fp->_file = f;
|
||||
fp->_cookie = (_PTR) fp;
|
||||
fp->_cookie = (void *) fp;
|
||||
fp->_read = __sread;
|
||||
fp->_write = __swrite64;
|
||||
fp->_seek = __sseek;
|
||||
|
@ -66,7 +66,7 @@ register_fini(void)
|
||||
|
||||
void
|
||||
_DEFUN (__call_exitprocs, (code, d),
|
||||
int code, _PTR d)
|
||||
int code, void *d)
|
||||
{
|
||||
register struct _atexit *p;
|
||||
struct _atexit **lastp;
|
||||
@ -119,9 +119,9 @@ _DEFUN (__call_exitprocs, (code, d),
|
||||
if (!args || (args->_fntypes & i) == 0)
|
||||
fn ();
|
||||
else if ((args->_is_cxa & i) == 0)
|
||||
(*((void (*)(int, _PTR)) fn))(code, args->_fnargs[n]);
|
||||
(*((void (*)(int, void *)) fn))(code, args->_fnargs[n]);
|
||||
else
|
||||
(*((void (*)(_PTR)) fn))(args->_fnargs[n]);
|
||||
(*((void (*)(void *)) fn))(args->_fnargs[n]);
|
||||
|
||||
/* The function we called call atexit and registered another
|
||||
function (or functions). Call these new functions before
|
||||
|
@ -9,6 +9,6 @@ enum __atexit_types
|
||||
__et_cxa
|
||||
};
|
||||
|
||||
void __call_exitprocs (int, _PTR);
|
||||
int __register_exitproc (int, void (*fn) (void), _PTR, _PTR);
|
||||
void __call_exitprocs (int, void *);
|
||||
int __register_exitproc (int, void (*fn) (void), void *, void *);
|
||||
|
||||
|
@ -45,7 +45,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (calloc, (n, size),
|
||||
size_t n,
|
||||
size_t size)
|
||||
|
@ -30,7 +30,7 @@ _DEFUN (__cxa_atexit,
|
||||
{
|
||||
#ifdef _LITE_EXIT
|
||||
/* Refer to comments in __atexit.c for more details of lite exit. */
|
||||
int __register_exitproc (int, void (*fn) (void), _PTR, _PTR)
|
||||
int __register_exitproc (int, void (*fn) (void), void *, void *)
|
||||
__attribute__ ((weak));
|
||||
|
||||
if (!__register_exitproc)
|
||||
|
@ -55,7 +55,7 @@ _DEFUN (exit, (code),
|
||||
{
|
||||
#ifdef _LITE_EXIT
|
||||
/* Refer to comments in __atexit.c for more details of lite exit. */
|
||||
void __call_exitprocs (int, _PTR)) __attribute__((weak);
|
||||
void __call_exitprocs (int, void *)) __attribute__((weak);
|
||||
if (__call_exitprocs)
|
||||
#endif
|
||||
__call_exitprocs (code, NULL);
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (memalign, (align, nbytes),
|
||||
size_t align,
|
||||
size_t nbytes)
|
||||
|
@ -158,7 +158,7 @@ Supporting OS subroutines required: <<sbrk>>. */
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (malloc, (nbytes),
|
||||
size_t nbytes) /* get a block */
|
||||
{
|
||||
@ -167,7 +167,7 @@ _DEFUN (malloc, (nbytes),
|
||||
|
||||
void
|
||||
_DEFUN (free, (aptr),
|
||||
_PTR aptr)
|
||||
void *aptr)
|
||||
{
|
||||
_free_r (_REENT, aptr);
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
size_t
|
||||
_DEFUN (malloc_usable_size, (ptr),
|
||||
_PTR ptr)
|
||||
void *ptr)
|
||||
{
|
||||
return _malloc_usable_size_r (_REENT, ptr);
|
||||
}
|
||||
|
@ -68,8 +68,8 @@ const void * const __on_exit_dummy = &__on_exit_args;
|
||||
int
|
||||
_DEFUN (on_exit,
|
||||
(fn, arg),
|
||||
_VOID _EXFNPTR(fn, (int, _PTR)),
|
||||
_PTR arg)
|
||||
_VOID _EXFNPTR(fn, (int, void *)),
|
||||
void *arg)
|
||||
{
|
||||
return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL);
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ int _dummy_realloc = 1;
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (realloc, (ap, nbytes),
|
||||
_PTR ap,
|
||||
void *ap,
|
||||
size_t nbytes)
|
||||
{
|
||||
return _realloc_r (_REENT, ap, nbytes);
|
||||
|
@ -30,10 +30,10 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (_reallocf_r, (reentptr, ptr, size),
|
||||
struct _reent *reentptr,
|
||||
_PTR ptr,
|
||||
void *ptr,
|
||||
size_t size)
|
||||
{
|
||||
void *nptr;
|
||||
@ -45,9 +45,9 @@ _DEFUN (_reallocf_r, (reentptr, ptr, size),
|
||||
}
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (reallocf, (ptr, size),
|
||||
_PTR ptr,
|
||||
void *ptr,
|
||||
size_t size)
|
||||
{
|
||||
return _reallocf_r(_REENT, ptr, size);
|
||||
|
@ -8,14 +8,14 @@
|
||||
|
||||
#ifndef _REENT_ONLY
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (valloc, (nbytes),
|
||||
size_t nbytes)
|
||||
{
|
||||
return _valloc_r (_REENT, nbytes);
|
||||
}
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (pvalloc, (nbytes),
|
||||
size_t nbytes)
|
||||
{
|
||||
|
@ -55,16 +55,16 @@ PORTABILITY
|
||||
#endif
|
||||
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (memccpy, (dst0, src0, endchar, len0),
|
||||
_PTR __restrict dst0,
|
||||
const _PTR __restrict src0,
|
||||
void *__restrict dst0,
|
||||
const void *__restrict src0,
|
||||
int endchar0,
|
||||
size_t len0)
|
||||
{
|
||||
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
_PTR ptr = NULL;
|
||||
void *ptr = NULL;
|
||||
char *dst = (char *) dst0;
|
||||
char *src = (char *) src0;
|
||||
char endchar = endchar0 & 0xff;
|
||||
@ -80,7 +80,7 @@ _DEFUN (memccpy, (dst0, src0, endchar, len0),
|
||||
|
||||
return ptr;
|
||||
#else
|
||||
_PTR ptr = NULL;
|
||||
void *ptr = NULL;
|
||||
char *dst = dst0;
|
||||
const char *src = src0;
|
||||
long *aligned_dst;
|
||||
|
@ -61,9 +61,9 @@ QUICKREF
|
||||
to fill (long)MASK. */
|
||||
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (memchr, (src_void, c, length),
|
||||
const _PTR src_void,
|
||||
const void *src_void,
|
||||
int c,
|
||||
size_t length)
|
||||
{
|
||||
|
@ -44,8 +44,8 @@ QUICKREF
|
||||
|
||||
int
|
||||
_DEFUN (memcmp, (m1, m2, n),
|
||||
const _PTR m1,
|
||||
const _PTR m2,
|
||||
const void *m1,
|
||||
const void *m2,
|
||||
size_t n)
|
||||
{
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
|
@ -43,17 +43,17 @@ QUICKREF
|
||||
/* Threshhold for punting to the byte copier. */
|
||||
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (memcpy, (dst0, src0, len0),
|
||||
_PTR __restrict dst0,
|
||||
const _PTR __restrict src0,
|
||||
void *__restrict dst0,
|
||||
const void *__restrict src0,
|
||||
size_t len0)
|
||||
{
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
char *dst = (char *) dst0;
|
||||
char *src = (char *) src0;
|
||||
|
||||
_PTR save = dst0;
|
||||
void *save = dst0;
|
||||
|
||||
while (len0--)
|
||||
{
|
||||
|
@ -48,11 +48,11 @@ QUICKREF
|
||||
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
|
||||
|
||||
/*SUPPRESS 20*/
|
||||
_PTR
|
||||
void *
|
||||
__inhibit_loop_to_libcall
|
||||
_DEFUN (memmove, (dst_void, src_void, length),
|
||||
_PTR dst_void,
|
||||
const _PTR src_void,
|
||||
void *dst_void,
|
||||
const void *src_void,
|
||||
size_t length)
|
||||
{
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
|
@ -42,10 +42,10 @@ PORTABILITY
|
||||
/* Threshhold for punting to the byte copier. */
|
||||
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (mempcpy, (dst0, src0, len0),
|
||||
_PTR dst0,
|
||||
const _PTR src0,
|
||||
void *dst0,
|
||||
const void *src0,
|
||||
size_t len0)
|
||||
{
|
||||
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
|
||||
|
@ -61,9 +61,9 @@ QUICKREF
|
||||
to fill (long)MASK. */
|
||||
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (memrchr, (src_void, c, length),
|
||||
const _PTR src_void,
|
||||
const void *src_void,
|
||||
int c,
|
||||
size_t length)
|
||||
{
|
||||
|
@ -33,10 +33,10 @@ QUICKREF
|
||||
#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
|
||||
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
|
||||
|
||||
_PTR
|
||||
void *
|
||||
__inhibit_loop_to_libcall
|
||||
_DEFUN (memset, (m, c, n),
|
||||
_PTR m,
|
||||
void *m,
|
||||
int c,
|
||||
size_t n)
|
||||
{
|
||||
|
@ -60,9 +60,9 @@ QUICKREF
|
||||
to fill (long)MASK. */
|
||||
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
|
||||
|
||||
_PTR
|
||||
void *
|
||||
_DEFUN (rawmemchr, (src_void, c),
|
||||
const _PTR src_void,
|
||||
const void *src_void,
|
||||
int c)
|
||||
{
|
||||
const unsigned char *src = (const unsigned char *) src_void;
|
||||
|
@ -9,7 +9,7 @@ ssize_t
|
||||
_DEFUN (_pread_r, (rptr, fd, buf, n, off),
|
||||
struct _reent *rptr,
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
@ -35,7 +35,7 @@ _DEFUN (_pread_r, (rptr, fd, buf, n, off),
|
||||
ssize_t
|
||||
_DEFUN (__libc_pread, (fd, buf, n, off),
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ Supporting OS subroutine required: <<read>>, <<lseek64>>.
|
||||
ssize_t
|
||||
_DEFUN (__libc_pread64, (fd, buf, n, off),
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
loff_t off)
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ ssize_t
|
||||
_DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
|
||||
struct _reent *rptr,
|
||||
int fd,
|
||||
const _PTR buf,
|
||||
const void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
@ -35,7 +35,7 @@ _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
|
||||
ssize_t
|
||||
_DEFUN (__libc_pwrite, (fd, buf, n, off),
|
||||
int fd,
|
||||
const _PTR buf,
|
||||
const void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
|
@ -32,7 +32,7 @@ Supporting OS subroutine required: <<write>>, <<lseek64>>.
|
||||
ssize_t
|
||||
_DEFUN (__libc_pwrite64, (fd, buf, n, off),
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
loff_t off)
|
||||
{
|
||||
|
@ -30,7 +30,7 @@ ret func body
|
||||
RTEMS_STUB(void *,malloc(size_t s), { return 0; })
|
||||
RTEMS_STUB(void *,realloc(void* p, size_t s), { return 0; })
|
||||
RTEMS_STUB(void, free(void* ptr), { })
|
||||
RTEMS_STUB(_PTR, calloc(size_t s1, size_t s2), { return 0; })
|
||||
RTEMS_STUB(void *, calloc(size_t s1, size_t s2), { return 0; })
|
||||
RTEMS_STUB(int, posix_memalign(void **p, size_t si, size_t s2), { return -1; })
|
||||
|
||||
/* Stubs for routines from RTEMS <sys/lock.h> */
|
||||
@ -186,10 +186,10 @@ RTEMS_STUB(int, issetugid (void), { return 0; })
|
||||
#endif
|
||||
|
||||
/* stdlib.h */
|
||||
RTEMS_STUB(_PTR, _realloc_r(struct _reent *r, _PTR p, size_t s), { return 0; })
|
||||
RTEMS_STUB(_PTR, _calloc_r(struct _reent *r, size_t s1, size_t s2), { return 0; })
|
||||
RTEMS_STUB(_PTR, _malloc_r(struct _reent * r, size_t s), { return 0; })
|
||||
RTEMS_STUB(_VOID, _free_r(struct _reent *r, _PTR *p), { })
|
||||
RTEMS_STUB(void *, _realloc_r(struct _reent *r, void *p, size_t s), { return 0; })
|
||||
RTEMS_STUB(void *, _calloc_r(struct _reent *r, size_t s1, size_t s2), { return 0; })
|
||||
RTEMS_STUB(void *, _malloc_r(struct _reent * r, size_t s), { return 0; })
|
||||
RTEMS_STUB(_VOID, _free_r(struct _reent *r, void **p), { })
|
||||
|
||||
/* stubs for functions required by libc/stdlib */
|
||||
RTEMS_STUB(void, __assert_func(const char *file, int line, const char *failedexpr), { })
|
||||
|
@ -41,7 +41,7 @@ ssize_t
|
||||
_DEFUN (_pread_r, (rptr, fd, buf, n, off),
|
||||
struct _reent *rptr,
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
@ -67,7 +67,7 @@ _DEFUN (_pread_r, (rptr, fd, buf, n, off),
|
||||
ssize_t
|
||||
_DEFUN (pread, (fd, buf, n, off),
|
||||
int fd,
|
||||
_PTR buf,
|
||||
void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
|
@ -42,7 +42,7 @@ ssize_t
|
||||
_DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
|
||||
struct _reent *rptr,
|
||||
int fd,
|
||||
const _PTR buf,
|
||||
const void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
@ -68,7 +68,7 @@ _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
|
||||
ssize_t
|
||||
_DEFUN (pwrite, (fd, buf, n, off),
|
||||
int fd,
|
||||
const _PTR buf,
|
||||
const void *buf,
|
||||
size_t n,
|
||||
off_t off)
|
||||
{
|
||||
|
@ -144,7 +144,7 @@ _DEFUN (x_putint32, (xdrs, int32p),
|
||||
unsigned long
|
||||
_DEFUN (xdr_sizeof, (func, data),
|
||||
xdrproc_t func,
|
||||
_PTR data)
|
||||
void *data)
|
||||
{
|
||||
XDR x;
|
||||
struct xdr_ops ops;
|
||||
|
@ -45,9 +45,9 @@ int posix_openpt (int);
|
||||
#define _unsetenv_r UNUSED__unsetenv_r
|
||||
#endif
|
||||
|
||||
extern _PTR memalign (size_t, size_t);
|
||||
extern void *memalign (size_t, size_t);
|
||||
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
|
||||
extern _PTR valloc (size_t);
|
||||
extern void *valloc (size_t);
|
||||
#endif
|
||||
|
||||
#undef _malloc_r
|
||||
|
Loading…
x
Reference in New Issue
Block a user