ansification: remove _PTR

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
Yaakov Selkowitz 2017-12-03 20:53:22 -06:00
parent 0403b9c8c4
commit e6321aa6a6
72 changed files with 228 additions and 230 deletions

View File

@ -47,7 +47,6 @@
#endif #endif
#ifdef _HAVE_STDC #ifdef _HAVE_STDC
#define _PTR void *
#define _VOLATILE volatile #define _VOLATILE volatile
#define _SIGNED signed #define _SIGNED signed
#define _VOID void #define _VOID void
@ -69,7 +68,6 @@
#define _LONG_DOUBLE long double #define _LONG_DOUBLE long double
#endif #endif
#else #else
#define _PTR char *
#define _VOLATILE #define _VOLATILE
#define _SIGNED #define _SIGNED
#define _VOID void #define _VOID void

View File

@ -34,44 +34,44 @@ struct mallinfo {
/* The routines. */ /* The routines. */
extern _PTR malloc (size_t); extern void *malloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_r #undef _malloc_r
#define _malloc_r(r, s) malloc (s) #define _malloc_r(r, s) malloc (s)
#else #else
extern _PTR _malloc_r (struct _reent *, size_t); extern void *_malloc_r (struct _reent *, size_t);
#endif #endif
extern _VOID free (_PTR); extern _VOID free (void *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _free_r #undef _free_r
#define _free_r(r, p) free (p) #define _free_r(r, p) free (p)
#else #else
extern _VOID _free_r (struct _reent *, _PTR); extern _VOID _free_r (struct _reent *, void *);
#endif #endif
extern _PTR realloc (_PTR, size_t); extern void *realloc (void *, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _realloc_r #undef _realloc_r
#define _realloc_r(r, p, s) realloc (p, s) #define _realloc_r(r, p, s) realloc (p, s)
#else #else
extern _PTR _realloc_r (struct _reent *, _PTR, size_t); extern void *_realloc_r (struct _reent *, void *, size_t);
#endif #endif
extern _PTR calloc (size_t, size_t); extern void *calloc (size_t, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _calloc_r #undef _calloc_r
#define _calloc_r(r, s1, s2) calloc (s1, s2); #define _calloc_r(r, s1, s2) calloc (s1, s2);
#else #else
extern _PTR _calloc_r (struct _reent *, size_t, size_t); extern void *_calloc_r (struct _reent *, size_t, size_t);
#endif #endif
extern _PTR memalign (size_t, size_t); extern void *memalign (size_t, size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _memalign_r #undef _memalign_r
#define _memalign_r(r, s1, s2) memalign (s1, s2); #define _memalign_r(r, s1, s2) memalign (s1, s2);
#else #else
extern _PTR _memalign_r (struct _reent *, size_t, size_t); extern void *_memalign_r (struct _reent *, size_t, size_t);
#endif #endif
extern struct mallinfo mallinfo (void); extern struct mallinfo mallinfo (void);
@ -98,31 +98,31 @@ extern int mallopt (int, int);
extern int _mallopt_r (struct _reent *, int, int); extern int _mallopt_r (struct _reent *, int, int);
#endif #endif
extern size_t malloc_usable_size (_PTR); extern size_t malloc_usable_size (void *);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _malloc_usable_size_r #undef _malloc_usable_size_r
#define _malloc_usable_size_r(r, p) malloc_usable_size (p) #define _malloc_usable_size_r(r, p) malloc_usable_size (p)
#else #else
extern size_t _malloc_usable_size_r (struct _reent *, _PTR); extern size_t _malloc_usable_size_r (struct _reent *, void *);
#endif #endif
/* These aren't too useful on an embedded system, but we define them /* These aren't too useful on an embedded system, but we define them
anyhow. */ anyhow. */
extern _PTR valloc (size_t); extern void *valloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _valloc_r #undef _valloc_r
#define _valloc_r(r, s) valloc (s) #define _valloc_r(r, s) valloc (s)
#else #else
extern _PTR _valloc_r (struct _reent *, size_t); extern void *_valloc_r (struct _reent *, size_t);
#endif #endif
extern _PTR pvalloc (size_t); extern void *pvalloc (size_t);
#ifdef __CYGWIN__ #ifdef __CYGWIN__
#undef _pvalloc_r #undef _pvalloc_r
#define _pvalloc_r(r, s) pvalloc (s) #define _pvalloc_r(r, s) pvalloc (s)
#else #else
extern _PTR _pvalloc_r (struct _reent *, size_t); extern void *_pvalloc_r (struct _reent *, size_t);
#endif #endif
extern int malloc_trim (size_t); extern int malloc_trim (size_t);
@ -159,7 +159,7 @@ extern _VOID _mstats_r (struct _reent *, char *);
#ifndef __CYGWIN__ #ifndef __CYGWIN__
/* Some systems provide this, so do too for compatibility. */ /* Some systems provide this, so do too for compatibility. */
extern void cfree (_PTR); extern void cfree (void *);
#endif /* __CYGWIN__ */ #endif /* __CYGWIN__ */
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -220,8 +220,8 @@ int _EXFUN(putc, (int, FILE *));
int _EXFUN(putchar, (int)); int _EXFUN(putchar, (int));
int _EXFUN(puts, (const char *)); int _EXFUN(puts, (const char *));
int _EXFUN(ungetc, (int, FILE *)); int _EXFUN(ungetc, (int, FILE *));
size_t _EXFUN(fread, (_PTR __restrict, size_t _size, size_t _n, FILE *__restrict)); size_t _EXFUN(fread, (void *__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(fwrite, (const void *__restrict , size_t _size, size_t _n, FILE *));
#ifdef _COMPILING_NEWLIB #ifdef _COMPILING_NEWLIB
int _EXFUN(fgetpos, (FILE *, _fpos_t *)); int _EXFUN(fgetpos, (FILE *, _fpos_t *));
#else #else
@ -434,8 +434,8 @@ int _EXFUN(_fputc_r, (struct _reent *, int, FILE *));
int _EXFUN(_fputc_unlocked_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_r, (struct _reent *, const char *__restrict, FILE *__restrict));
int _EXFUN(_fputs_unlocked_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_r, (struct _reent *, void *__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_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, ...) int _EXFUN(_fscanf_r, (struct _reent *, FILE *__restrict, const char *__restrict, ...)
_ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); _ATTRIBUTE ((__format__ (__scanf__, 3, 4))));
int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); 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 *)); long _EXFUN(_ftell_r, (struct _reent *, FILE *));
_off_t _EXFUN(_ftello_r,(struct _reent *, FILE *)); _off_t _EXFUN(_ftello_r,(struct _reent *, FILE *));
void _EXFUN(_rewind_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_r, (struct _reent *, const void *__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_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_r, (struct _reent *, FILE *));
int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *)); int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *));
int _EXFUN(_getchar_r, (struct _reent *)); int _EXFUN(_getchar_r, (struct _reent *));
@ -539,8 +539,8 @@ int _EXFUN(fileno_unlocked, (FILE *));
int _EXFUN(fflush_unlocked, (FILE *)); int _EXFUN(fflush_unlocked, (FILE *));
int _EXFUN(fgetc_unlocked, (FILE *)); int _EXFUN(fgetc_unlocked, (FILE *));
int _EXFUN(fputc_unlocked, (int, 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(fread_unlocked, (void *__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(fwrite_unlocked, (const void *__restrict , size_t _size, size_t _n, FILE *));
#endif #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
@ -583,35 +583,35 @@ int _EXFUN(__swbuf_r, (struct _reent *, int, FILE *));
#if __BSD_VISIBLE #if __BSD_VISIBLE
# ifdef __LARGE64_FILES # ifdef __LARGE64_FILES
FILE *_EXFUN(funopen,(const _PTR __cookie, FILE *_EXFUN(funopen,(const void *__cookie,
int (*__readfn)(_PTR __c, char *__buf, int (*__readfn)(void *__c, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __c, const char *__buf, int (*__writefn)(void *__c, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c))); int (*__closefn)(void *__c)));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, FILE *_EXFUN(_funopen_r,(struct _reent *, const void *__cookie,
int (*__readfn)(_PTR __c, char *__buf, int (*__readfn)(void *__c, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __c, const char *__buf, int (*__writefn)(void *__c, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
_fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), _fpos64_t (*__seekfn)(void *__c, _fpos64_t __off, int __whence),
int (*__closefn)(_PTR __c))); int (*__closefn)(void *__c)));
# else # else
FILE *_EXFUN(funopen,(const _PTR __cookie, FILE *_EXFUN(funopen,(const void *__cookie,
int (*__readfn)(_PTR __cookie, char *__buf, int (*__readfn)(void *__cookie, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __cookie, const char *__buf, int (*__writefn)(void *__cookie, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie))); int (*__closefn)(void *__cookie)));
FILE *_EXFUN(_funopen_r,(struct _reent *, const _PTR __cookie, FILE *_EXFUN(_funopen_r,(struct _reent *, const void *__cookie,
int (*__readfn)(_PTR __cookie, char *__buf, int (*__readfn)(void *__cookie, char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
int (*__writefn)(_PTR __cookie, const char *__buf, int (*__writefn)(void *__cookie, const char *__buf,
_READ_WRITE_BUFSIZE_TYPE __n), _READ_WRITE_BUFSIZE_TYPE __n),
fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), fpos_t (*__seekfn)(void *__cookie, fpos_t __off, int __whence),
int (*__closefn)(_PTR __cookie))); int (*__closefn)(void *__cookie)));
# endif /* !__LARGE64_FILES */ # endif /* !__LARGE64_FILES */
# define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \

View File

@ -54,7 +54,7 @@ typedef struct
#ifndef __compar_fn_t_defined #ifndef __compar_fn_t_defined
#define __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 #endif
#define EXIT_FAILURE 1 #define EXIT_FAILURE 1
@ -82,15 +82,15 @@ int _EXFUN(atoi,(const char *__nptr));
int _EXFUN(_atoi_r,(struct _reent *, const char *__nptr)); int _EXFUN(_atoi_r,(struct _reent *, const char *__nptr));
long _EXFUN(atol,(const char *__nptr)); long _EXFUN(atol,(const char *__nptr));
long _EXFUN(_atol_r,(struct _reent *, const char *__nptr)); long _EXFUN(_atol_r,(struct _reent *, const char *__nptr));
_PTR _EXFUN(bsearch,(const _PTR __key, void * _EXFUN(bsearch,(const void *__key,
const _PTR __base, const void *__base,
size_t __nmemb, size_t __nmemb,
size_t __size, size_t __size,
__compar_fn_t _compar)); __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)); div_t _EXFUN(div,(int __numer, int __denom));
_VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((__noreturn__))); _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,(const char *__string));
char * _EXFUN(_getenv_r,(struct _reent *, const char *__string)); char * _EXFUN(_getenv_r,(struct _reent *, const char *__string));
char * _EXFUN(_findenv,(const char *, int *)); char * _EXFUN(_findenv,(const char *, int *));
@ -101,7 +101,7 @@ int _EXFUN(getsubopt,(char **, char * const *, char **));
#endif #endif
long _EXFUN(labs,(long)); long _EXFUN(labs,(long));
ldiv_t _EXFUN(ldiv,(long __numer, long __denom)); 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,(const char *, size_t));
int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *)); int _EXFUN(_mblen_r,(struct _reent *, const char *, size_t, _mbstate_t *));
int _EXFUN(mbtowc,(wchar_t *__restrict, const char *__restrict, size_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(_mkstemp_r, (struct _reent *, char *));
int _EXFUN(_mkstemps_r, (struct _reent *, char *, int)); 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")))); 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)); 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 #if __BSD_VISIBLE
void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2)
__alloc_size(3); __alloc_size(3);
_PTR _EXFUN(reallocf,(_PTR __r, size_t __size)); void * _EXFUN(reallocf,(void *__r, size_t __size));
#endif #endif
#if __BSD_VISIBLE || __XSI_VISIBLE >= 4 #if __BSD_VISIBLE || __XSI_VISIBLE >= 4
char * _EXFUN(realpath, (const char *__restrict path, char *__restrict resolved_path)); 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)); char * _EXFUN(_l64a_r,(struct _reent *,long __input));
#endif #endif
#if __MISC_VISIBLE #if __MISC_VISIBLE
int _EXFUN(on_exit,(_VOID (*__func)(int, _PTR),_PTR __arg)); int _EXFUN(on_exit,(_VOID (*__func)(int, void *),void *__arg));
#endif #endif
#if __ISO_C_VISIBLE >= 1999 #if __ISO_C_VISIBLE >= 1999
_VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__))); _VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
@ -202,7 +202,7 @@ _VOID _EXFUN(_Exit,(int __status) _ATTRIBUTE ((__noreturn__)));
int _EXFUN(putenv,(char *__string)); int _EXFUN(putenv,(char *__string));
#endif #endif
int _EXFUN(_putenv_r,(struct _reent *, char *__string)); 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 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite)); int _EXFUN(setenv,(const char *__string, const char *__value, int __overwrite));
#endif #endif
@ -273,7 +273,7 @@ unsigned long long _EXFUN(_strtoull_r,(struct _reent *, const char *__restrict _
#ifndef __CYGWIN__ #ifndef __CYGWIN__
#if __MISC_VISIBLE #if __MISC_VISIBLE
_VOID _EXFUN(cfree,(_PTR)); _VOID _EXFUN(cfree,(void *));
#endif #endif
#if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112 #if __BSD_VISIBLE || __POSIX_VISIBLE >= 200112
int _EXFUN(unsetenv,(const char *__string)); 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**)); char * _EXFUN(_dtoa_r,(struct _reent *, double, int, int, int *, int*, char**));
#ifndef __CYGWIN__ #ifndef __CYGWIN__
_PTR _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t)); void * _EXFUN_NOTHROW(_malloc_r,(struct _reent *, size_t));
_PTR _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t)); void * _EXFUN_NOTHROW(_calloc_r,(struct _reent *, size_t, size_t));
_VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, _PTR)); _VOID _EXFUN_NOTHROW(_free_r,(struct _reent *, void *));
_PTR _EXFUN_NOTHROW(_realloc_r,(struct _reent *, _PTR, size_t)); void * _EXFUN_NOTHROW(_realloc_r,(struct _reent *, void *, size_t));
_VOID _EXFUN(_mstats_r,(struct _reent *, char *)); _VOID _EXFUN(_mstats_r,(struct _reent *, char *));
#endif #endif
int _EXFUN(_system_r,(struct _reent *, const char *)); 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 version. We want that #undef qsort_r will still let you
invoke the underlying function, but that requires gcc support. */ invoke the underlying function, but that requires gcc support. */
#if __GNU_VISIBLE #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 #elif __BSD_VISIBLE
# ifdef __GNUC__ # 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")); __asm__ (__ASMNAME ("__bsd_qsort_r"));
# else # 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 # define qsort_r __bsd_qsort_r
# endif # endif
#endif #endif

View File

@ -26,11 +26,11 @@
_BEGIN_STD_C _BEGIN_STD_C
_PTR _EXFUN(memchr,(const _PTR, int, size_t)); void * _EXFUN(memchr,(const void *, int, size_t));
int _EXFUN(memcmp,(const _PTR, const _PTR, size_t)); int _EXFUN(memcmp,(const void *, const void *, size_t));
_PTR _EXFUN(memcpy,(_PTR __restrict, const _PTR __restrict, size_t)); void * _EXFUN(memcpy,(void *__restrict, const void *__restrict, size_t));
_PTR _EXFUN(memmove,(_PTR, const _PTR, size_t)); void * _EXFUN(memmove,(void *, const void *, size_t));
_PTR _EXFUN(memset,(_PTR, int, size_t)); void * _EXFUN(memset,(void *, int, size_t));
char *_EXFUN(strcat,(char *__restrict, const char *__restrict)); char *_EXFUN(strcat,(char *__restrict, const char *__restrict));
char *_EXFUN(strchr,(const char *, int)); char *_EXFUN(strchr,(const char *, int));
int _EXFUN(strcmp,(const char *, const char *)); 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)); int _EXFUN(timingsafe_memcmp,(const void *, const void *, size_t));
#endif #endif
#if __MISC_VISIBLE || __POSIX_VISIBLE #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 #endif
#if __GNU_VISIBLE #if __GNU_VISIBLE
_PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); void * _EXFUN(mempcpy,(void *, const void *, size_t));
_PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); void * _EXFUN(memmem, (const void *, size_t, const void *, size_t));
_PTR _EXFUN(memrchr,(const _PTR, int, size_t)); void * _EXFUN(memrchr,(const void *, int, size_t));
_PTR _EXFUN(rawmemchr,(const _PTR, int)); void * _EXFUN(rawmemchr,(const void *, int));
#endif #endif
#if __POSIX_VISIBLE >= 200809 #if __POSIX_VISIBLE >= 200809
char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict));

View File

@ -192,15 +192,15 @@ struct __sFILE {
#endif #endif
/* operations */ /* 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)); 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 *, const char *,
_READ_WRITE_BUFSIZE_TYPE)); _READ_WRITE_BUFSIZE_TYPE));
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); _fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int));
int _EXFNPTR(_close, (struct _reent *, _PTR)); int _EXFNPTR(_close, (struct _reent *, void *));
/* separate buffer for long sequences of ungetc() */ /* separate buffer for long sequences of ungetc() */
struct __sbuf _ub; /* ungetc buffer */ struct __sbuf _ub; /* ungetc buffer */
@ -248,15 +248,15 @@ struct __sFILE64 {
struct _reent *_data; struct _reent *_data;
/* operations */ /* 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)); 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 *, const char *,
_READ_WRITE_BUFSIZE_TYPE)); _READ_WRITE_BUFSIZE_TYPE));
_fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); _fpos_t _EXFNPTR(_seek, (struct _reent *, void *, _fpos_t, int));
int _EXFNPTR(_close, (struct _reent *, _PTR)); int _EXFNPTR(_close, (struct _reent *, void *));
/* separate buffer for long sequences of ungetc() */ /* separate buffer for long sequences of ungetc() */
struct __sbuf _ub; /* ungetc buffer */ struct __sbuf _ub; /* ungetc buffer */
@ -275,7 +275,7 @@ struct __sFILE64 {
int _flags2; /* for future use */ int _flags2; /* for future use */
_off64_t _offset; /* current lseek offset */ _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__ #ifndef __SINGLE_THREAD__
_flock_t _lock; /* for thread-safety locking */ _flock_t _lock; /* for thread-safety locking */

View File

@ -3,14 +3,14 @@
# if defined(__ALTIVEC__) # if defined(__ALTIVEC__)
_PTR _EXFUN(vec_calloc,(size_t __nmemb, size_t __size)); void *_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_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
_VOID _EXFUN(vec_free,(_PTR)); _VOID _EXFUN(vec_free,(void *));
#define _vec_freer _freer #define _vec_freer _freer
_PTR _EXFUN(vec_malloc,(size_t __size)); void *_EXFUN(vec_malloc,(size_t __size));
#define _vec_mallocr _memalign_r #define _vec_mallocr _memalign_r
_PTR _EXFUN(vec_realloc,(_PTR __r, size_t __size)); void *_EXFUN(vec_realloc,(void *__r, size_t __size));
_PTR _EXFUN(_vec_realloc_r,(struct _reent *, _PTR __r, size_t __size)); void *_EXFUN(_vec_realloc_r,(struct _reent *, void *__r, size_t __size));
# endif /* __ALTIVEC__ */ # endif /* __ALTIVEC__ */

View File

@ -5,14 +5,14 @@
# if defined(__ALTIVEC__) # if defined(__ALTIVEC__)
_PTR _EXFUN(vec_calloc,(size_t __nmemb, size_t __size)); void *_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_calloc_r,(struct _reent *, size_t __nmemb, size_t __size));
_VOID _EXFUN(vec_free,(_PTR)); _VOID _EXFUN(vec_free,(void *));
#define _vec_freer _freer #define _vec_freer _freer
_PTR _EXFUN(vec_malloc,(size_t __size)); void *_EXFUN(vec_malloc,(size_t __size));
#define _vec_mallocr _memalign_r #define _vec_mallocr _memalign_r
_PTR _EXFUN(vec_realloc,(_PTR __r, size_t __size)); void *_EXFUN(vec_realloc,(void *__r, size_t __size));
_PTR _EXFUN(_vec_realloc_r,(struct _reent *, _PTR __r, size_t __size)); void *_EXFUN(_vec_realloc_r,(struct _reent *, void *__r, size_t __size));
# endif /* __ALTIVEC__ */ # endif /* __ALTIVEC__ */

View File

@ -43,7 +43,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (vec_calloc, (n, size), _DEFUN (vec_calloc, (n, size),
size_t n, size_t n,
size_t size) size_t size)

View File

@ -7,7 +7,7 @@
void void
_DEFUN (vec_free, (aptr), _DEFUN (vec_free, (aptr),
_PTR aptr) void *aptr)
{ {
_free_r (_REENT, aptr); _free_r (_REENT, aptr);
} }

View File

@ -95,7 +95,7 @@ Supporting OS subroutines required: <<sbrk>>. */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (vec_malloc, (nbytes), _DEFUN (vec_malloc, (nbytes),
size_t nbytes) /* get a block */ size_t nbytes) /* get a block */
{ {

View File

@ -6,9 +6,9 @@
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (vec_realloc, (ap, nbytes), _DEFUN (vec_realloc, (ap, nbytes),
_PTR ap, void *ap,
size_t nbytes) size_t nbytes)
{ {
return _vec_realloc_r (_REENT, ap, nbytes); return _vec_realloc_r (_REENT, ap, nbytes);

View File

@ -928,7 +928,7 @@ __svfscanf_r (rptr, fp, fmt0, ap)
*p = 0; *p = 0;
res = (*ccfn) (rptr, buf, (char **) NULL, base); res = (*ccfn) (rptr, buf, (char **) NULL, base);
if ((flags & POINTER) && !(flags & VECTOR)) 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) else if (flags & SHORT)
{ {
if (!(flags & VECTOR)) if (!(flags & VECTOR))

View File

@ -50,7 +50,7 @@ typedef struct
size_t size_t
_DEFUN (fread, (buf, size, count, fp), _DEFUN (fread, (buf, size, count, fp),
_PTR __restrict buf, void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE *__restrict fp) FILE *__restrict fp)

View File

@ -50,7 +50,7 @@ typedef struct
size_t size_t
_DEFUN (fwrite, (buf, size, count, fp), _DEFUN (fwrite, (buf, size, count, fp),
const _PTR __restrict buf, const void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE * fp) FILE * fp)

View File

@ -1,7 +1,7 @@
#include <malloc.h> #include <malloc.h>
#ifdef DEFINE_MALLOC #ifdef DEFINE_MALLOC
_PTR void *
_malloc_r (struct _reent *r, size_t sz) _malloc_r (struct _reent *r, size_t sz)
{ {
return malloc (sz); return malloc (sz);
@ -9,7 +9,7 @@ _malloc_r (struct _reent *r, size_t sz)
#endif #endif
#ifdef DEFINE_CALLOC #ifdef DEFINE_CALLOC
_PTR void *
_calloc_r (struct _reent *r, size_t a, size_t b) _calloc_r (struct _reent *r, size_t a, size_t b)
{ {
return calloc (a, b); return calloc (a, b);
@ -18,15 +18,15 @@ _calloc_r (struct _reent *r, size_t a, size_t b)
#ifdef DEFINE_FREE #ifdef DEFINE_FREE
void void
_free_r (struct _reent *r, _PTR x) _free_r (struct _reent *r, void *x)
{ {
free (x); free (x);
} }
#endif #endif
#ifdef DEFINE_REALLOC #ifdef DEFINE_REALLOC
_PTR void *
_realloc_r (struct _reent *r, _PTR x, size_t sz) _realloc_r (struct _reent *r, void *x, size_t sz)
{ {
return realloc (x, sz); return realloc (x, sz);
} }

View File

@ -41,7 +41,7 @@ _ssize_t
_DEFUN (_read_r, (ptr, fd, buf, cnt), _DEFUN (_read_r, (ptr, fd, buf, cnt),
struct _reent *ptr, struct _reent *ptr,
int fd, int fd,
_PTR buf, void *buf,
size_t cnt) size_t cnt)
{ {
_ssize_t ret; _ssize_t ret;

View File

@ -41,7 +41,7 @@ _ssize_t
_DEFUN (_write_r, (ptr, fd, buf, cnt), _DEFUN (_write_r, (ptr, fd, buf, cnt),
struct _reent *ptr, struct _reent *ptr,
int fd, int fd,
const _PTR buf, const void *buf,
size_t cnt) size_t cnt)
{ {
_ssize_t ret; _ssize_t ret;

View File

@ -55,15 +55,15 @@ No supporting OS subroutines are required.
#include <stdlib.h> #include <stdlib.h>
_PTR void *
_DEFUN (bsearch, (key, base, nmemb, size, compar), _DEFUN (bsearch, (key, base, nmemb, size, compar),
const _PTR key, const void *key,
const _PTR base, const void *base,
size_t nmemb, size_t nmemb,
size_t size, 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 lower = 0;
size_t upper = nmemb; size_t upper = nmemb;
size_t index; size_t index;
@ -75,7 +75,7 @@ _DEFUN (bsearch, (key, base, nmemb, size, compar),
while (lower < upper) while (lower < upper)
{ {
index = (lower + upper) / 2; index = (lower + upper) / 2;
current = (_PTR) (((char *) base) + (index * size)); current = (void *) (((char *) base) + (index * size));
result = compar (key, current); result = compar (key, current);

View File

@ -94,7 +94,7 @@ _DEFUN(_fdopen_r, (ptr, fd, mode),
_fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND); _fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND);
#endif #endif
fp->_file = fd; fp->_file = fd;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
#undef _read #undef _read
#undef _write #undef _write

View File

@ -164,20 +164,20 @@ _DEFUN(_fgets_r, (ptr, buf, n, fp),
*/ */
if (len > n) if (len > n)
len = n; len = n;
t = (unsigned char *) memchr ((_PTR) p, '\n', len); t = (unsigned char *) memchr ((void *) p, '\n', len);
if (t != 0) if (t != 0)
{ {
len = ++t - p; len = ++t - p;
fp->_r -= len; fp->_r -= len;
fp->_p = t; fp->_p = t;
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len); _CAST_VOID memcpy ((void *) s, (void *) p, len);
s[len] = 0; s[len] = 0;
_newlib_flockfile_exit (fp); _newlib_flockfile_exit (fp);
return (buf); return (buf);
} }
fp->_r -= len; fp->_r -= len;
fp->_p += len; fp->_p += len;
_CAST_VOID memcpy ((_PTR) s, (_PTR) p, len); _CAST_VOID memcpy ((void *) s, (void *) p, len);
s += len; s += len;
} }
while ((n -= len) != 0); while ((n -= len) != 0);

View File

@ -142,7 +142,7 @@ _DEFUN(_fopen_r, (ptr, file, mode),
fp->_file = f; fp->_file = f;
fp->_flags = flags; fp->_flags = flags;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
fp->_read = __sread; fp->_read = __sread;
fp->_write = __swrite; fp->_write = __swrite;
fp->_seek = __sseek; fp->_seek = __sseek;

View File

@ -144,7 +144,7 @@ _DEFUN(crlf_r, (ptr, fp, buf, count, eof),
size_t size_t
_DEFUN(_fread_r, (ptr, buf, size, count, fp), _DEFUN(_fread_r, (ptr, buf, size, count, fp),
struct _reent * ptr, struct _reent * ptr,
_PTR __restrict buf, void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE * __restrict fp) FILE * __restrict fp)
@ -173,7 +173,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
{ {
/* First copy any available characters from ungetc buffer. */ /* First copy any available characters from ungetc buffer. */
int copy_size = resid > fp->_r ? fp->_r : resid; 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->_p += copy_size;
fp->_r -= copy_size; fp->_r -= copy_size;
p += copy_size; p += copy_size;
@ -222,7 +222,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
{ {
while (resid > (r = fp->_r)) 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->_p += r;
/* fp->_r = 0 ... done in __srefill */ /* fp->_r = 0 ... done in __srefill */
p += r; p += r;
@ -241,7 +241,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
return (total - resid) / size; 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->_r -= resid;
fp->_p += resid; fp->_p += resid;
} }
@ -261,7 +261,7 @@ _DEFUN(_fread_r, (ptr, buf, size, count, fp),
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
size_t size_t
_DEFUN(fread, (buf, size, count, fp), _DEFUN(fread, (buf, size, count, fp),
_PTR __restrict buf, void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE *__restrict fp) FILE *__restrict fp)

View File

@ -221,7 +221,7 @@ _DEFUN(_freopen_r, (ptr, file, mode, fp),
fp->_flags = flags; fp->_flags = flags;
fp->_file = f; fp->_file = f;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
fp->_read = __sread; fp->_read = __sread;
fp->_write = __swrite; fp->_write = __swrite;
fp->_seek = __sseek; fp->_seek = __sseek;

View File

@ -99,7 +99,7 @@ _DEFUN(_fseeko_r, (ptr, fp, offset, whence),
_off_t offset, _off_t offset,
int whence) 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 target;
_fpos_t curoff = 0; _fpos_t curoff = 0;
size_t n; size_t n;

View File

@ -26,7 +26,7 @@
#include "fvwrite.h" #include "fvwrite.h"
#define MIN(a, b) ((a) < (b) ? (a) : (b)) #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) \ #define GETIOV(extra_work) \
while (len == 0) \ while (len == 0) \
@ -219,7 +219,7 @@ _DEFUN(__sfvwrite_r, (ptr, fp, uio),
GETIOV (nlknown = 0); GETIOV (nlknown = 0);
if (!nlknown) if (!nlknown)
{ {
nl = memchr ((_PTR) p, '\n', len); nl = memchr ((void *) p, '\n', len);
nldist = nl ? nl + 1 - p : len + 1; nldist = nl ? nl + 1 - p : len + 1;
nlknown = 1; nlknown = 1;
} }

View File

@ -22,7 +22,7 @@
* I/O descriptors for __sfvwrite_r(). * I/O descriptors for __sfvwrite_r().
*/ */
struct __siov { struct __siov {
const _PTR iov_base; const void *iov_base;
size_t iov_len; size_t iov_len;
}; };
struct __suio { struct __suio {

View File

@ -110,7 +110,7 @@ static char sccsid[] = "%W% (Berkeley) %G%";
size_t size_t
_DEFUN(_fwrite_r, (ptr, buf, size, count, fp), _DEFUN(_fwrite_r, (ptr, buf, size, count, fp),
struct _reent * ptr, struct _reent * ptr,
const _PTR __restrict buf, const void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE * __restrict fp) FILE * __restrict fp)
@ -171,7 +171,7 @@ ret:
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
size_t size_t
_DEFUN(fwrite, (buf, size, count, fp), _DEFUN(fwrite, (buf, size, count, fp),
const _PTR __restrict buf, const void *__restrict buf,
size_t size, size_t size,
size_t count, size_t count,
FILE * fp) FILE * fp)

View File

@ -39,7 +39,7 @@ _DEFUN(__smakebuf_r, (ptr, fp),
struct _reent *ptr, struct _reent *ptr,
register FILE *fp) register FILE *fp)
{ {
register _PTR p; register void *p;
int flags; int flags;
size_t size; size_t size;
int couldbetty; int couldbetty;

View File

@ -239,7 +239,7 @@ _DEFUN(__ssputs_r, (ptr, fp, buf, len),
if (len < w) if (len < w)
w = len; 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->_w -= w;
fp->_p += w; fp->_p += w;
return 0; return 0;
@ -331,7 +331,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
if (len < w) if (len < w)
w = len; 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->_w -= w;
fp->_p += w; fp->_p += w;
/* Pretend we copied all. */ /* Pretend we copied all. */

View File

@ -114,7 +114,7 @@ extern char *_dtoa_r (struct _reent *, double, int,
#define u_quad_t unsigned long #define u_quad_t unsigned long
typedef quad_t * quad_ptr_t; typedef quad_t * quad_ptr_t;
typedef _PTR void_ptr_t; typedef void *void_ptr_t;
typedef char * char_ptr_t; typedef char * char_ptr_t;
typedef long * long_ptr_t; typedef long * long_ptr_t;
typedef int * int_ptr_t; typedef int * int_ptr_t;

View File

@ -264,7 +264,7 @@ _DEFUN(__ssrefill_r, (ptr, fp),
#else #else
int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *)); int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *));
int _EXFUN (__ssrefill_r, (struct _reent *, 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. */ #endif /* !STRING_ONLY. */
int int

View File

@ -123,7 +123,7 @@ _DEFUN(setvbuf, (fp, buf, mode, size),
FREEUB(reent, fp); FREEUB(reent, fp);
fp->_r = fp->_lbfsize = 0; fp->_r = fp->_lbfsize = 0;
if (fp->_flags & __SMBF) 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); fp->_flags &= ~(__SLBF | __SNBF | __SMBF | __SOPT | __SNPT | __SEOF);
if (mode == _IONBF) if (mode == _IONBF)

View File

@ -65,7 +65,7 @@ _DEFUN(__sread, (ptr, cookie, buf, n),
_READ_WRITE_RETURN_TYPE _READ_WRITE_RETURN_TYPE
_DEFUN(__seofread, (ptr, cookie, buf, len), _DEFUN(__seofread, (ptr, cookie, buf, len),
struct _reent *_ptr, struct _reent *_ptr,
_PTR cookie, void *cookie,
char *buf, char *buf,
_READ_WRITE_BUFSIZE_TYPE len) _READ_WRITE_BUFSIZE_TYPE len)
{ {

View File

@ -100,10 +100,10 @@ _DEFUN(__submore, (rptr, fp),
return 0; return 0;
} }
i = fp->_ub._size; 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) if (p == NULL)
return EOF; 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->_p = p + i;
fp->_ub._base = p; fp->_ub._base = p;
fp->_ub._size = i << 1; fp->_ub._size = i << 1;

View File

@ -254,7 +254,7 @@ _DEFUN(__ssputs_r, (ptr, fp, buf, len),
} }
if (len < w) if (len < w)
w = len; 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->_w -= w;
fp->_p += w; fp->_p += w;
@ -339,7 +339,7 @@ _DEFUN(__ssprint_r, (ptr, fp, uio),
} }
if (len < w) if (len < w)
w = len; 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->_w -= w;
fp->_p += w; fp->_p += w;
w = len; /* pretend we copied all */ w = len; /* pretend we copied all */
@ -571,7 +571,7 @@ static int exponent(char *, int, int);
#endif #endif
typedef quad_t * quad_ptr_t; typedef quad_t * quad_ptr_t;
typedef _PTR void_ptr_t; typedef void *void_ptr_t;
typedef char * char_ptr_t; typedef char * char_ptr_t;
typedef long * long_ptr_t; typedef long * long_ptr_t;
typedef int * int_ptr_t; typedef int * int_ptr_t;
@ -1175,7 +1175,7 @@ reswitch: switch (ch) {
if (ch == 'C' || (flags & LONGINT)) { if (ch == 'C' || (flags & LONGINT)) {
mbstate_t ps; mbstate_t ps;
memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); memset ((void *)&ps, '\0', sizeof (mbstate_t));
if ((size = (int)_wcrtomb_r (data, cp, if ((size = (int)_wcrtomb_r (data, cp,
(wchar_t)GET_ARG (N, ap, wint_t), (wchar_t)GET_ARG (N, ap, wint_t),
&ps)) == -1) { &ps)) == -1) {
@ -1463,7 +1463,7 @@ string:
wcp = (const wchar_t *)cp; wcp = (const wchar_t *)cp;
size = m = 0; size = m = 0;
memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); memset ((void *)&ps, '\0', sizeof (mbstate_t));
/* Count number of bytes needed for multibyte /* Count number of bytes needed for multibyte
string that will be produced from widechar string that will be produced from widechar
@ -1509,7 +1509,7 @@ string:
cp = buf; cp = buf;
/* Convert widechar string to multibyte string. */ /* 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) if (_wcsrtombs_r (data, cp, &wcp, size, &ps)
!= size) { != size) {
fp->_flags |= __SERR; fp->_flags |= __SERR;

View File

@ -349,7 +349,7 @@ _DEFUN(__ssrefill_r, (ptr, fp),
size_t size_t
_DEFUN(_sfread_r, (ptr, buf, size, count, fp), _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
struct _reent * ptr, struct _reent * ptr,
_PTR buf, void *buf,
size_t size, size_t size,
size_t count, size_t count,
FILE * fp) FILE * fp)
@ -367,7 +367,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
while (resid > (r = fp->_r)) 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->_p += r;
fp->_r = 0; fp->_r = 0;
p += r; p += r;
@ -378,7 +378,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
return (total - resid) / size; 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->_r -= resid;
fp->_p += resid; fp->_p += resid;
return count; return count;
@ -386,7 +386,7 @@ _DEFUN(_sfread_r, (ptr, buf, size, count, fp),
#else /* !STRING_ONLY || !INTEGER_ONLY */ #else /* !STRING_ONLY || !INTEGER_ONLY */
int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *)); int _EXFUN (_sungetc_r, (struct _reent *, int, register FILE *));
int _EXFUN (__ssrefill_r, (struct _reent *, 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 */ #endif /* !STRING_ONLY || !INTEGER_ONLY */
static inline int static inline int

View File

@ -289,7 +289,7 @@ static int wexponent(wchar_t *, int, int);
#endif #endif
typedef quad_t * quad_ptr_t; typedef quad_t * quad_ptr_t;
typedef _PTR void_ptr_t; typedef void *void_ptr_t;
typedef char * char_ptr_t; typedef char * char_ptr_t;
typedef wchar_t* wchar_ptr_t; typedef wchar_t* wchar_ptr_t;
typedef long * long_ptr_t; typedef long * long_ptr_t;
@ -1199,7 +1199,7 @@ string:
if (prec >= 0) { if (prec >= 0) {
char *p = arg; char *p = arg;
memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); memset ((void *)&ps, '\0', sizeof (mbstate_t));
while (nchars < (size_t)prec) { while (nchars < (size_t)prec) {
nconv = mbrlen (p, MB_CUR_MAX, &ps); nconv = mbrlen (p, MB_CUR_MAX, &ps);
if (nconv == 0 || nconv == (size_t)-1 || if (nconv == 0 || nconv == (size_t)-1 ||
@ -1224,7 +1224,7 @@ string:
cp = malloc_buf; cp = malloc_buf;
} else } else
cp = buf; cp = buf;
memset ((_PTR)&ps, '\0', sizeof (mbstate_t)); memset ((void *)&ps, '\0', sizeof (mbstate_t));
p = cp; p = cp;
while (insize != 0) { while (insize != 0) {
nconv = _mbrtowc_r (data, p, arg, insize, &ps); nconv = _mbrtowc_r (data, p, arg, insize, &ps);

View File

@ -936,7 +936,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
else else
mbp = GET_ARG(N, ap, char *); mbp = GET_ARG(N, ap, char *);
n = 0; 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) while (width != 0 && (wi = _fgetwc_r (rptr, fp)) != WEOF)
{ {
nconv = _wcrtomb_r (rptr, mbp, wi, &mbs); nconv = _wcrtomb_r (rptr, mbp, wi, &mbs);
@ -1028,7 +1028,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
else else
mbp = GET_ARG(N, ap, char *); mbp = GET_ARG(N, ap, char *);
n = 0; n = 0;
memset ((_PTR) &mbs, '\0', sizeof (mbstate_t)); memset ((void *) &mbs, '\0', sizeof (mbstate_t));
while ((wi = _fgetwc_r (rptr, fp)) != WEOF while ((wi = _fgetwc_r (rptr, fp)) != WEOF
&& width != 0 && INCCL (wi)) && width != 0 && INCCL (wi))
{ {
@ -1117,7 +1117,7 @@ _DEFUN(__SVFWSCANF_R, (rptr, fp, fmt0, ap),
#endif #endif
else else
mbp = GET_ARG(N, ap, char *); 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 while ((wi = _fgetwc_r (rptr, fp)) != WEOF
&& width != 0 && !iswspace (wi)) && width != 0 && !iswspace (wi))
{ {

View File

@ -76,7 +76,7 @@ _DEFUN (_fdopen64_r, (ptr, fd, mode),
_fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND); _fcntl_r (ptr, fd, F_SETFL, fdflags | O_APPEND);
#endif #endif
fp->_file = fd; fp->_file = fd;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
#undef _read #undef _read
#undef _write #undef _write

View File

@ -93,7 +93,7 @@ _DEFUN (_fopen64_r, (ptr, file, mode),
fp->_file = f; fp->_file = f;
fp->_flags = flags; fp->_flags = flags;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
fp->_read = __sread; fp->_read = __sread;
fp->_write = __swrite64; fp->_write = __swrite64;
fp->_seek = __sseek; fp->_seek = __sseek;

View File

@ -222,7 +222,7 @@ _DEFUN (_freopen64_r, (ptr, file, mode, fp),
fp->_flags = flags; fp->_flags = flags;
fp->_file = f; fp->_file = f;
fp->_cookie = (_PTR) fp; fp->_cookie = (void *) fp;
fp->_read = __sread; fp->_read = __sread;
fp->_write = __swrite64; fp->_write = __swrite64;
fp->_seek = __sseek; fp->_seek = __sseek;

View File

@ -66,7 +66,7 @@ register_fini(void)
void void
_DEFUN (__call_exitprocs, (code, d), _DEFUN (__call_exitprocs, (code, d),
int code, _PTR d) int code, void *d)
{ {
register struct _atexit *p; register struct _atexit *p;
struct _atexit **lastp; struct _atexit **lastp;
@ -119,9 +119,9 @@ _DEFUN (__call_exitprocs, (code, d),
if (!args || (args->_fntypes & i) == 0) if (!args || (args->_fntypes & i) == 0)
fn (); fn ();
else if ((args->_is_cxa & i) == 0) else if ((args->_is_cxa & i) == 0)
(*((void (*)(int, _PTR)) fn))(code, args->_fnargs[n]); (*((void (*)(int, void *)) fn))(code, args->_fnargs[n]);
else else
(*((void (*)(_PTR)) fn))(args->_fnargs[n]); (*((void (*)(void *)) fn))(args->_fnargs[n]);
/* The function we called call atexit and registered another /* The function we called call atexit and registered another
function (or functions). Call these new functions before function (or functions). Call these new functions before

View File

@ -9,6 +9,6 @@ enum __atexit_types
__et_cxa __et_cxa
}; };
void __call_exitprocs (int, _PTR); void __call_exitprocs (int, void *);
int __register_exitproc (int, void (*fn) (void), _PTR, _PTR); int __register_exitproc (int, void (*fn) (void), void *, void *);

View File

@ -45,7 +45,7 @@ Supporting OS subroutines required: <<close>>, <<fstat>>, <<isatty>>,
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (calloc, (n, size), _DEFUN (calloc, (n, size),
size_t n, size_t n,
size_t size) size_t size)

View File

@ -30,7 +30,7 @@ _DEFUN (__cxa_atexit,
{ {
#ifdef _LITE_EXIT #ifdef _LITE_EXIT
/* Refer to comments in __atexit.c for more details of 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)); __attribute__ ((weak));
if (!__register_exitproc) if (!__register_exitproc)

View File

@ -55,7 +55,7 @@ _DEFUN (exit, (code),
{ {
#ifdef _LITE_EXIT #ifdef _LITE_EXIT
/* Refer to comments in __atexit.c for more details of 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) if (__call_exitprocs)
#endif #endif
__call_exitprocs (code, NULL); __call_exitprocs (code, NULL);

View File

@ -8,7 +8,7 @@
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (memalign, (align, nbytes), _DEFUN (memalign, (align, nbytes),
size_t align, size_t align,
size_t nbytes) size_t nbytes)

View File

@ -158,7 +158,7 @@ Supporting OS subroutines required: <<sbrk>>. */
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (malloc, (nbytes), _DEFUN (malloc, (nbytes),
size_t nbytes) /* get a block */ size_t nbytes) /* get a block */
{ {
@ -167,7 +167,7 @@ _DEFUN (malloc, (nbytes),
void void
_DEFUN (free, (aptr), _DEFUN (free, (aptr),
_PTR aptr) void *aptr)
{ {
_free_r (_REENT, aptr); _free_r (_REENT, aptr);
} }

View File

@ -10,7 +10,7 @@
size_t size_t
_DEFUN (malloc_usable_size, (ptr), _DEFUN (malloc_usable_size, (ptr),
_PTR ptr) void *ptr)
{ {
return _malloc_usable_size_r (_REENT, ptr); return _malloc_usable_size_r (_REENT, ptr);
} }

View File

@ -68,8 +68,8 @@ const void * const __on_exit_dummy = &__on_exit_args;
int int
_DEFUN (on_exit, _DEFUN (on_exit,
(fn, arg), (fn, arg),
_VOID _EXFNPTR(fn, (int, _PTR)), _VOID _EXFNPTR(fn, (int, void *)),
_PTR arg) void *arg)
{ {
return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL); return __register_exitproc (__et_onexit, (void (*)(void)) fn, arg, NULL);
} }

View File

@ -10,9 +10,9 @@ int _dummy_realloc = 1;
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (realloc, (ap, nbytes), _DEFUN (realloc, (ap, nbytes),
_PTR ap, void *ap,
size_t nbytes) size_t nbytes)
{ {
return _realloc_r (_REENT, ap, nbytes); return _realloc_r (_REENT, ap, nbytes);

View File

@ -30,10 +30,10 @@
#include <stdlib.h> #include <stdlib.h>
_PTR void *
_DEFUN (_reallocf_r, (reentptr, ptr, size), _DEFUN (_reallocf_r, (reentptr, ptr, size),
struct _reent *reentptr, struct _reent *reentptr,
_PTR ptr, void *ptr,
size_t size) size_t size)
{ {
void *nptr; void *nptr;
@ -45,9 +45,9 @@ _DEFUN (_reallocf_r, (reentptr, ptr, size),
} }
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (reallocf, (ptr, size), _DEFUN (reallocf, (ptr, size),
_PTR ptr, void *ptr,
size_t size) size_t size)
{ {
return _reallocf_r(_REENT, ptr, size); return _reallocf_r(_REENT, ptr, size);

View File

@ -8,14 +8,14 @@
#ifndef _REENT_ONLY #ifndef _REENT_ONLY
_PTR void *
_DEFUN (valloc, (nbytes), _DEFUN (valloc, (nbytes),
size_t nbytes) size_t nbytes)
{ {
return _valloc_r (_REENT, nbytes); return _valloc_r (_REENT, nbytes);
} }
_PTR void *
_DEFUN (pvalloc, (nbytes), _DEFUN (pvalloc, (nbytes),
size_t nbytes) size_t nbytes)
{ {

View File

@ -55,16 +55,16 @@ PORTABILITY
#endif #endif
_PTR void *
_DEFUN (memccpy, (dst0, src0, endchar, len0), _DEFUN (memccpy, (dst0, src0, endchar, len0),
_PTR __restrict dst0, void *__restrict dst0,
const _PTR __restrict src0, const void *__restrict src0,
int endchar0, int endchar0,
size_t len0) size_t len0)
{ {
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
_PTR ptr = NULL; void *ptr = NULL;
char *dst = (char *) dst0; char *dst = (char *) dst0;
char *src = (char *) src0; char *src = (char *) src0;
char endchar = endchar0 & 0xff; char endchar = endchar0 & 0xff;
@ -80,7 +80,7 @@ _DEFUN (memccpy, (dst0, src0, endchar, len0),
return ptr; return ptr;
#else #else
_PTR ptr = NULL; void *ptr = NULL;
char *dst = dst0; char *dst = dst0;
const char *src = src0; const char *src = src0;
long *aligned_dst; long *aligned_dst;

View File

@ -61,9 +61,9 @@ QUICKREF
to fill (long)MASK. */ to fill (long)MASK. */
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK)) #define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
_PTR void *
_DEFUN (memchr, (src_void, c, length), _DEFUN (memchr, (src_void, c, length),
const _PTR src_void, const void *src_void,
int c, int c,
size_t length) size_t length)
{ {

View File

@ -44,8 +44,8 @@ QUICKREF
int int
_DEFUN (memcmp, (m1, m2, n), _DEFUN (memcmp, (m1, m2, n),
const _PTR m1, const void *m1,
const _PTR m2, const void *m2,
size_t n) size_t n)
{ {
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)

View File

@ -43,17 +43,17 @@ QUICKREF
/* Threshhold for punting to the byte copier. */ /* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE) #define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
_PTR void *
_DEFUN (memcpy, (dst0, src0, len0), _DEFUN (memcpy, (dst0, src0, len0),
_PTR __restrict dst0, void *__restrict dst0,
const _PTR __restrict src0, const void *__restrict src0,
size_t len0) size_t len0)
{ {
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)
char *dst = (char *) dst0; char *dst = (char *) dst0;
char *src = (char *) src0; char *src = (char *) src0;
_PTR save = dst0; void *save = dst0;
while (len0--) while (len0--)
{ {

View File

@ -48,11 +48,11 @@ QUICKREF
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE) #define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
/*SUPPRESS 20*/ /*SUPPRESS 20*/
_PTR void *
__inhibit_loop_to_libcall __inhibit_loop_to_libcall
_DEFUN (memmove, (dst_void, src_void, length), _DEFUN (memmove, (dst_void, src_void, length),
_PTR dst_void, void *dst_void,
const _PTR src_void, const void *src_void,
size_t length) size_t length)
{ {
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)

View File

@ -42,10 +42,10 @@ PORTABILITY
/* Threshhold for punting to the byte copier. */ /* Threshhold for punting to the byte copier. */
#define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE) #define TOO_SMALL(LEN) ((LEN) < BIGBLOCKSIZE)
_PTR void *
_DEFUN (mempcpy, (dst0, src0, len0), _DEFUN (mempcpy, (dst0, src0, len0),
_PTR dst0, void *dst0,
const _PTR src0, const void *src0,
size_t len0) size_t len0)
{ {
#if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__) #if defined(PREFER_SIZE_OVER_SPEED) || defined(__OPTIMIZE_SIZE__)

View File

@ -61,9 +61,9 @@ QUICKREF
to fill (long)MASK. */ to fill (long)MASK. */
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK)) #define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
_PTR void *
_DEFUN (memrchr, (src_void, c, length), _DEFUN (memrchr, (src_void, c, length),
const _PTR src_void, const void *src_void,
int c, int c,
size_t length) size_t length)
{ {

View File

@ -33,10 +33,10 @@ QUICKREF
#define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1)) #define UNALIGNED(X) ((long)X & (LBLOCKSIZE - 1))
#define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE) #define TOO_SMALL(LEN) ((LEN) < LBLOCKSIZE)
_PTR void *
__inhibit_loop_to_libcall __inhibit_loop_to_libcall
_DEFUN (memset, (m, c, n), _DEFUN (memset, (m, c, n),
_PTR m, void *m,
int c, int c,
size_t n) size_t n)
{ {

View File

@ -60,9 +60,9 @@ QUICKREF
to fill (long)MASK. */ to fill (long)MASK. */
#define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK)) #define DETECTCHAR(X,MASK) (DETECTNULL(X ^ MASK))
_PTR void *
_DEFUN (rawmemchr, (src_void, c), _DEFUN (rawmemchr, (src_void, c),
const _PTR src_void, const void *src_void,
int c) int c)
{ {
const unsigned char *src = (const unsigned char *) src_void; const unsigned char *src = (const unsigned char *) src_void;

View File

@ -9,7 +9,7 @@ ssize_t
_DEFUN (_pread_r, (rptr, fd, buf, n, off), _DEFUN (_pread_r, (rptr, fd, buf, n, off),
struct _reent *rptr, struct _reent *rptr,
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {
@ -35,7 +35,7 @@ _DEFUN (_pread_r, (rptr, fd, buf, n, off),
ssize_t ssize_t
_DEFUN (__libc_pread, (fd, buf, n, off), _DEFUN (__libc_pread, (fd, buf, n, off),
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {

View File

@ -32,7 +32,7 @@ Supporting OS subroutine required: <<read>>, <<lseek64>>.
ssize_t ssize_t
_DEFUN (__libc_pread64, (fd, buf, n, off), _DEFUN (__libc_pread64, (fd, buf, n, off),
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
loff_t off) loff_t off)
{ {

View File

@ -9,7 +9,7 @@ ssize_t
_DEFUN (_pwrite_r, (rptr, fd, buf, n, off), _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
struct _reent *rptr, struct _reent *rptr,
int fd, int fd,
const _PTR buf, const void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {
@ -35,7 +35,7 @@ _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
ssize_t ssize_t
_DEFUN (__libc_pwrite, (fd, buf, n, off), _DEFUN (__libc_pwrite, (fd, buf, n, off),
int fd, int fd,
const _PTR buf, const void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {

View File

@ -32,7 +32,7 @@ Supporting OS subroutine required: <<write>>, <<lseek64>>.
ssize_t ssize_t
_DEFUN (__libc_pwrite64, (fd, buf, n, off), _DEFUN (__libc_pwrite64, (fd, buf, n, off),
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
loff_t off) loff_t off)
{ {

View File

@ -30,7 +30,7 @@ ret func body
RTEMS_STUB(void *,malloc(size_t s), { return 0; }) RTEMS_STUB(void *,malloc(size_t s), { return 0; })
RTEMS_STUB(void *,realloc(void* p, size_t s), { return 0; }) RTEMS_STUB(void *,realloc(void* p, size_t s), { return 0; })
RTEMS_STUB(void, free(void* ptr), { }) 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; }) RTEMS_STUB(int, posix_memalign(void **p, size_t si, size_t s2), { return -1; })
/* Stubs for routines from RTEMS <sys/lock.h> */ /* Stubs for routines from RTEMS <sys/lock.h> */
@ -186,10 +186,10 @@ RTEMS_STUB(int, issetugid (void), { return 0; })
#endif #endif
/* stdlib.h */ /* stdlib.h */
RTEMS_STUB(_PTR, _realloc_r(struct _reent *r, _PTR p, size_t s), { return 0; }) RTEMS_STUB(void *, _realloc_r(struct _reent *r, void *p, size_t s), { return 0; })
RTEMS_STUB(_PTR, _calloc_r(struct _reent *r, size_t s1, size_t s2), { return 0; }) RTEMS_STUB(void *, _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 *, _malloc_r(struct _reent * r, size_t s), { return 0; })
RTEMS_STUB(_VOID, _free_r(struct _reent *r, _PTR *p), { }) RTEMS_STUB(_VOID, _free_r(struct _reent *r, void **p), { })
/* stubs for functions required by libc/stdlib */ /* stubs for functions required by libc/stdlib */
RTEMS_STUB(void, __assert_func(const char *file, int line, const char *failedexpr), { }) RTEMS_STUB(void, __assert_func(const char *file, int line, const char *failedexpr), { })

View File

@ -41,7 +41,7 @@ ssize_t
_DEFUN (_pread_r, (rptr, fd, buf, n, off), _DEFUN (_pread_r, (rptr, fd, buf, n, off),
struct _reent *rptr, struct _reent *rptr,
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {
@ -67,7 +67,7 @@ _DEFUN (_pread_r, (rptr, fd, buf, n, off),
ssize_t ssize_t
_DEFUN (pread, (fd, buf, n, off), _DEFUN (pread, (fd, buf, n, off),
int fd, int fd,
_PTR buf, void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {

View File

@ -42,7 +42,7 @@ ssize_t
_DEFUN (_pwrite_r, (rptr, fd, buf, n, off), _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
struct _reent *rptr, struct _reent *rptr,
int fd, int fd,
const _PTR buf, const void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {
@ -68,7 +68,7 @@ _DEFUN (_pwrite_r, (rptr, fd, buf, n, off),
ssize_t ssize_t
_DEFUN (pwrite, (fd, buf, n, off), _DEFUN (pwrite, (fd, buf, n, off),
int fd, int fd,
const _PTR buf, const void *buf,
size_t n, size_t n,
off_t off) off_t off)
{ {

View File

@ -144,7 +144,7 @@ _DEFUN (x_putint32, (xdrs, int32p),
unsigned long unsigned long
_DEFUN (xdr_sizeof, (func, data), _DEFUN (xdr_sizeof, (func, data),
xdrproc_t func, xdrproc_t func,
_PTR data) void *data)
{ {
XDR x; XDR x;
struct xdr_ops ops; struct xdr_ops ops;

View File

@ -45,9 +45,9 @@ int posix_openpt (int);
#define _unsetenv_r UNUSED__unsetenv_r #define _unsetenv_r UNUSED__unsetenv_r
#endif #endif
extern _PTR memalign (size_t, size_t); extern void *memalign (size_t, size_t);
#if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112) #if __BSD_VISIBLE || (__XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112)
extern _PTR valloc (size_t); extern void *valloc (size_t);
#endif #endif
#undef _malloc_r #undef _malloc_r