diff options
Diffstat (limited to 'newlib/libc/include')
-rw-r--r-- | newlib/libc/include/reent.h | 3 | ||||
-rw-r--r-- | newlib/libc/include/stdio.h | 28 | ||||
-rw-r--r-- | newlib/libc/include/sys/lock.h | 22 | ||||
-rw-r--r-- | newlib/libc/include/sys/stdio.h | 4 | ||||
-rw-r--r-- | newlib/libc/include/sys/time.h | 2 |
5 files changed, 43 insertions, 16 deletions
diff --git a/newlib/libc/include/reent.h b/newlib/libc/include/reent.h index 9430e7557..50b0b5746 100644 --- a/newlib/libc/include/reent.h +++ b/newlib/libc/include/reent.h @@ -137,7 +137,7 @@ struct timezone; /* Reentrant versions of system calls. */ extern int _close_r _PARAMS ((struct _reent *, int)); -extern int _execve_r _PARAMS ((struct _reent *, char *, char **, char **)); +extern int _execve_r _PARAMS ((struct _reent *, const char *, char *const *, char *const *)); extern int _fcntl_r _PARAMS ((struct _reent *, int, int, int)); extern int _fork_r _PARAMS ((struct _reent *)); extern int _fstat_r _PARAMS ((struct _reent *, int, struct stat *)); @@ -170,6 +170,7 @@ struct stat64; extern _off64_t _lseek64_r _PARAMS ((struct _reent *, int, _off64_t, int)); extern int _fstat64_r _PARAMS ((struct _reent *, int, struct stat64 *)); extern int _open64_r _PARAMS ((struct _reent *, const char *, int, int)); +extern int _stat64_r _PARAMS ((struct _reent *, const char *, struct stat64 *)); #endif #endif diff --git a/newlib/libc/include/stdio.h b/newlib/libc/include/stdio.h index 95bceed34..a55dd6969 100644 --- a/newlib/libc/include/stdio.h +++ b/newlib/libc/include/stdio.h @@ -371,13 +371,22 @@ int _EXFUN(_fclose_r, (struct _reent *, FILE *)); int _EXFUN(_fcloseall_r, (struct _reent *)); FILE * _EXFUN(_fdopen_r, (struct _reent *, int, const char *)); int _EXFUN(_fflush_r, (struct _reent *, FILE *)); +int _EXFUN(_fgetc_r, (struct _reent *, FILE *)); char * _EXFUN(_fgets_r, (struct _reent *, char *, int, FILE *)); +#ifdef _COMPILING_NEWLIB +int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, _fpos_t *)); +int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const _fpos_t *)); +#else +int _EXFUN(_fgetpos_r, (struct _reent *, FILE *, fpos_t *)); +int _EXFUN(_fsetpos_r, (struct _reent *, FILE *, const fpos_t *)); +#endif int _EXFUN(_fiprintf_r, (struct _reent *, FILE *, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); int _EXFUN(_fiscanf_r, (struct _reent *, FILE *, const char *, ...) _ATTRIBUTE ((__format__ (__scanf__, 3, 4)))); FILE * _EXFUN(_fmemopen_r, (struct _reent *, void *, size_t, const char *)); FILE * _EXFUN(_fopen_r, (struct _reent *, const char *, const char *)); +FILE * _EXFUN(_freopen_r, (struct _reent *, const char *, const char *, FILE *)); int _EXFUN(_fprintf_r, (struct _reent *, FILE *, const char *, ...) _ATTRIBUTE ((__format__ (__printf__, 3, 4)))); int _EXFUN(_fputc_r, (struct _reent *, int, FILE *)); @@ -389,6 +398,7 @@ int _EXFUN(_fseek_r, (struct _reent *, FILE *, long, int)); 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 , size_t _size, size_t _n, FILE *)); int _EXFUN(_getc_r, (struct _reent *, FILE *)); int _EXFUN(_getc_unlocked_r, (struct _reent *, FILE *)); @@ -479,6 +489,7 @@ ssize_t _EXFUN(__getline, (char **, size_t *, FILE *)); #if !defined(__CYGWIN__) || defined(_COMPILING_NEWLIB) FILE * _EXFUN(fdopen64, (int, const char *)); FILE * _EXFUN(fopen64, (const char *, const char *)); +FILE * _EXFUN(freopen64, (_CONST char *, _CONST char *, FILE *)); _off64_t _EXFUN(ftello64, (FILE *)); _off64_t _EXFUN(fseeko64, (FILE *, _off64_t, int)); int _EXFUN(fgetpos64, (FILE *, _fpos64_t *)); @@ -487,6 +498,7 @@ FILE * _EXFUN(tmpfile64, (void)); FILE * _EXFUN(_fdopen64_r, (struct _reent *, int, const char *)); FILE * _EXFUN(_fopen64_r, (struct _reent *,const char *, const char *)); +FILE * _EXFUN(_freopen64_r, (struct _reent *, _CONST char *, _CONST char *, FILE *)); _off64_t _EXFUN(_ftello64_r, (struct _reent *, FILE *)); _off64_t _EXFUN(_fseeko64_r, (struct _reent *, FILE *, _off64_t, int)); int _EXFUN(_fgetpos64_r, (struct _reent *, FILE *, _fpos64_t *)); @@ -513,12 +525,22 @@ FILE *_EXFUN(funopen,(const _PTR __cookie, int (*__writefn)(_PTR __c, const char *__buf, int __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, int __n), + int (*__writefn)(_PTR __c, const char *__buf, int __n), + _fpos64_t (*__seekfn)(_PTR __c, _fpos64_t __off, int __whence), + int (*__closefn)(_PTR __c))); # else FILE *_EXFUN(funopen,(const _PTR __cookie, int (*__readfn)(_PTR __cookie, char *__buf, int __n), int (*__writefn)(_PTR __cookie, const char *__buf, int __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, int __n), + int (*__writefn)(_PTR __cookie, const char *__buf, int __n), + fpos_t (*__seekfn)(_PTR __cookie, fpos_t __off, int __whence), + int (*__closefn)(_PTR __cookie))); # endif /* !__LARGE64_FILES */ # define fropen(__cookie, __fn) funopen(__cookie, __fn, (int (*)())0, \ @@ -545,8 +567,10 @@ typedef struct cookie_seek_function_t *seek; cookie_close_function_t *close; } cookie_io_functions_t; -FILE *_EXFUN(fopencookie,(void *__cookie, const char *__mode, - cookie_io_functions_t __functions)); +FILE *_EXFUN(fopencookie,(void *__cookie, + const char *__mode, cookie_io_functions_t __functions)); +FILE *_EXFUN(_fopencookie_r,(struct _reent *, void *__cookie, + const char *__mode, cookie_io_functions_t __functions)); #endif /* ! __STRICT_ANSI__ */ #ifndef __CUSTOM_FILE_IO__ diff --git a/newlib/libc/include/sys/lock.h b/newlib/libc/include/sys/lock.h index c05814a2a..9075e35c9 100644 --- a/newlib/libc/include/sys/lock.h +++ b/newlib/libc/include/sys/lock.h @@ -5,18 +5,20 @@ typedef int _LOCK_T; typedef int _LOCK_RECURSIVE_T; + +#include <_ansi.h> #define __LOCK_INIT(class,lock) static int lock = 0; #define __LOCK_INIT_RECURSIVE(class,lock) static int lock = 0; -#define __lock_init(lock) (0) -#define __lock_init_recursive(lock) (0) -#define __lock_close(lock) (0) -#define __lock_close_recursive(lock) (0) -#define __lock_acquire(lock) (0) -#define __lock_acquire_recursive(lock) (0) -#define __lock_try_acquire(lock) (0) -#define __lock_try_acquire_recursive(lock) (0) -#define __lock_release(lock) (0) -#define __lock_release_recursive(lock) (0) +#define __lock_init(lock) (_CAST_VOID 0) +#define __lock_init_recursive(lock) (_CAST_VOID 0) +#define __lock_close(lock) (_CAST_VOID 0) +#define __lock_close_recursive(lock) (_CAST_VOID 0) +#define __lock_acquire(lock) (_CAST_VOID 0) +#define __lock_acquire_recursive(lock) (_CAST_VOID 0) +#define __lock_try_acquire(lock) (_CAST_VOID 0) +#define __lock_try_acquire_recursive(lock) (_CAST_VOID 0) +#define __lock_release(lock) (_CAST_VOID 0) +#define __lock_release_recursive(lock) (_CAST_VOID 0) #endif /* __SYS_LOCK_H__ */ diff --git a/newlib/libc/include/sys/stdio.h b/newlib/libc/include/sys/stdio.h index fa9cd5d0a..5ead79462 100644 --- a/newlib/libc/include/sys/stdio.h +++ b/newlib/libc/include/sys/stdio.h @@ -12,7 +12,7 @@ #ifndef __SINGLE_THREAD__ # define _flockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_acquire_recursive((fp)->_lock)) #else -# define _flockfile(fp) +# define _flockfile(fp) (_CASTVOID 0) #endif #endif @@ -20,7 +20,7 @@ #ifndef __SINGLE_THREAD__ # define _funlockfile(fp) (((fp)->_flags & __SSTR) ? 0 : __lock_release_recursive((fp)->_lock)) #else -# define _funlockfile(fp) +# define _funlockfile(fp) (_CASTVOID 0) #endif #endif diff --git a/newlib/libc/include/sys/time.h b/newlib/libc/include/sys/time.h index 26346056a..9edd70185 100644 --- a/newlib/libc/include/sys/time.h +++ b/newlib/libc/include/sys/time.h @@ -70,7 +70,7 @@ struct itimerval { } while (0) #endif /* defined (__rtems__) || defined (__CYGWIN__) */ -int _EXFUN(gettimeofday, (struct timeval *__p, void *__tz)); +int _EXFUN(gettimeofday, (struct timeval *__p, struct timezone *__tz)); int _EXFUN(settimeofday, (const struct timeval *, const struct timezone *)); int _EXFUN(utimes, (const char *__path, const struct timeval *__tvp)); int _EXFUN(getitimer, (int __which, struct itimerval *__value)); |