diff options
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/_ansi.h | 2 | ||||
-rw-r--r-- | newlib/libc/include/stdlib.h | 2 | ||||
-rw-r--r-- | newlib/libc/include/sys/reent.h | 22 | ||||
-rw-r--r-- | newlib/libc/include/sys/unistd.h | 14 |
4 files changed, 21 insertions, 19 deletions
diff --git a/newlib/libc/include/_ansi.h b/newlib/libc/include/_ansi.h index 5b2da4e4b..e584ec385 100644 --- a/newlib/libc/include/_ansi.h +++ b/newlib/libc/include/_ansi.h @@ -61,10 +61,12 @@ #define _EXFUN_NOTHROW(name, proto) __cdecl name proto _NOTHROW #define _EXFUN(name, proto) __cdecl name proto #define _EXPARM(name, proto) (* __cdecl name) proto +#define _EXFNPTR(name, proto) (__cdecl * name) proto #else #define _EXFUN_NOTHROW(name, proto) name proto _NOTHROW #define _EXFUN(name, proto) name proto #define _EXPARM(name, proto) (* name) proto +#define _EXFNPTR(name, proto) (* name) proto #endif #define _DEFUN(name, arglist, args) name(args) #define _DEFUN_VOID(name) name(_NOARGS) diff --git a/newlib/libc/include/stdlib.h b/newlib/libc/include/stdlib.h index ed39546ee..82a2207f5 100644 --- a/newlib/libc/include/stdlib.h +++ b/newlib/libc/include/stdlib.h @@ -74,7 +74,7 @@ _PTR _EXFUN(bsearch,(const _PTR __key, const _PTR __base, size_t __nmemb, size_t __size, - int _EXPARM(_compar,(const _PTR, const _PTR)))); + int _EXFNPTR(_compar,(const _PTR, const _PTR)))); _PTR _EXFUN_NOTHROW(calloc,(size_t __nmemb, size_t __size)); div_t _EXFUN(div,(int __numer, int __denom)); _VOID _EXFUN(exit,(int __status) _ATTRIBUTE ((noreturn))); diff --git a/newlib/libc/include/sys/reent.h b/newlib/libc/include/sys/reent.h index ed3d9aa01..12ac6b216 100644 --- a/newlib/libc/include/sys/reent.h +++ b/newlib/libc/include/sys/reent.h @@ -182,12 +182,12 @@ struct __sFILE { /* operations */ _PTR _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFUN((*_read),(struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, char *, int)); - _READ_WRITE_RETURN_TYPE _EXFUN((*_write),(struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, const char *, int)); - _fpos_t _EXFUN((*_seek),(struct _reent *, _PTR, _fpos_t, int)); - int _EXFUN((*_close),(struct _reent *, _PTR)); + _fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); + int _EXFNPTR(_close, (struct _reent *, _PTR)); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -237,12 +237,12 @@ struct __sFILE64 { /* operations */ _PTR _cookie; /* cookie passed to io functions */ - _READ_WRITE_RETURN_TYPE _EXFUN((*_read),(struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE _EXFNPTR(_read, (struct _reent *, _PTR, char *, int)); - _READ_WRITE_RETURN_TYPE _EXFUN((*_write),(struct _reent *, _PTR, + _READ_WRITE_RETURN_TYPE _EXFNPTR(_write, (struct _reent *, _PTR, const char *, int)); - _fpos_t _EXFUN((*_seek),(struct _reent *, _PTR, _fpos_t, int)); - int _EXFUN((*_close),(struct _reent *, _PTR)); + _fpos_t _EXFNPTR(_seek, (struct _reent *, _PTR, _fpos_t, int)); + int _EXFNPTR(_close, (struct _reent *, _PTR)); /* separate buffer for long sequences of ungetc() */ struct __sbuf _ub; /* ungetc buffer */ @@ -261,7 +261,7 @@ struct __sFILE64 { int _flags2; /* for future use */ _off64_t _offset; /* current lseek offset */ - _fpos64_t _EXFUN((*_seek64),(struct _reent *, _PTR, _fpos64_t, int)); + _fpos64_t _EXFNPTR(_seek64, (struct _reent *, _PTR, _fpos64_t, int)); #ifndef __SINGLE_THREAD__ _flock_t _lock; /* for thread-safety locking */ @@ -376,7 +376,7 @@ struct _reent struct _mprec *_mp; - void _EXFUN((*__cleanup),(struct _reent *)); + void _EXFNPTR(__cleanup, (struct _reent *)); int _gamma_signgam; @@ -593,7 +593,7 @@ struct _reent int __sdidinit; /* 1 means stdio has been init'd */ - void _EXFUN((*__cleanup),(struct _reent *)); + void _EXFNPTR(__cleanup, (struct _reent *)); /* used by mprec routines */ struct _Bigint *_result; diff --git a/newlib/libc/include/sys/unistd.h b/newlib/libc/include/sys/unistd.h index 5abe5f709..80c35daf3 100644 --- a/newlib/libc/include/sys/unistd.h +++ b/newlib/libc/include/sys/unistd.h @@ -30,8 +30,8 @@ int _EXFUN(close, (int __fildes )); #if defined(__CYGWIN__) size_t _EXFUN(confstr, (int __name, char *__buf, size_t __len)); #endif -char _EXFUN(*ctermid, (char *__s )); -char _EXFUN(*cuserid, (char *__s )); +char * _EXFUN(ctermid, (char *__s )); +char * _EXFUN(cuserid, (char *__s )); #if defined(__CYGWIN__) int _EXFUN(daemon, (int nochdir, int noclose)); #endif @@ -67,7 +67,7 @@ pid_t _EXFUN(fork, (void )); long _EXFUN(fpathconf, (int __fd, int __name )); int _EXFUN(fsync, (int __fd)); int _EXFUN(fdatasync, (int __fd)); -char _EXFUN(*getcwd, (char *__buf, size_t __size )); +char * _EXFUN(getcwd, (char *__buf, size_t __size )); #if defined(__CYGWIN__) int _EXFUN(getdomainname ,(char *__name, size_t __len)); #endif @@ -80,11 +80,11 @@ int _EXFUN(getgroups, (int __gidsetsize, gid_t __grouplist[] )); #if defined(__CYGWIN__) long _EXFUN(gethostid, (void)); #endif -char _EXFUN(*getlogin, (void )); +char * _EXFUN(getlogin, (void )); #if defined(_POSIX_THREAD_SAFE_FUNCTIONS) int _EXFUN(getlogin_r, (char *name, size_t namesize) ); #endif -char _EXFUN(*getpass, (const char *__prompt)); +char * _EXFUN(getpass, (const char *__prompt)); int _EXFUN(getpagesize, (void)); #if defined(__CYGWIN__) int _EXFUN(getpeereid, (int, uid_t *, gid_t *)); @@ -101,7 +101,7 @@ uid_t _EXFUN(getuid, (void )); #endif #ifdef __CYGWIN__ char * _EXFUN(getusershell, (void)); -char _EXFUN(*getwd, (char *__buf )); +char * _EXFUN(getwd, (char *__buf )); int _EXFUN(iruserok, (unsigned long raddr, int superuser, const char *ruser, const char *luser)); #endif int _EXFUN(isatty, (int __fildes )); @@ -169,7 +169,7 @@ void _EXFUN(swab, (const void *, void *, ssize_t)); long _EXFUN(sysconf, (int __name )); pid_t _EXFUN(tcgetpgrp, (int __fildes )); int _EXFUN(tcsetpgrp, (int __fildes, pid_t __pgrp_id )); -char _EXFUN(*ttyname, (int __fildes )); +char * _EXFUN(ttyname, (int __fildes )); #if defined(__CYGWIN__) || defined(__rtems__) int _EXFUN(ttyname_r, (int, char *, size_t)); #endif |