From a334e5ef7267195d7ee285c89e9e4fa4d57347da Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Thu, 24 Aug 2000 16:11:59 +0000 Subject: [PATCH] 2000-08-23 Werner Almesberger * libc/stdlib/envlock.c: changed documented "__env_lock" and "__env_unlock" prototype from "void *" or "char *" to "struct _reent *" to match real function. Also added include of envlock.h. * libc/stdlib/mlock.c: changed documented "__malloc_lock" and "__malloc_unlock" prototype from "void *" or "char *" to "struct _reent *" to match real function. * libc/stdlib/envlock.h: added "__env_lock" and "__env_unlock" prototypes (for getenv_r.c and setenv_r.c). --- newlib/ChangeLog | 12 ++++++++++++ newlib/libc/stdlib/envlock.c | 11 +++++++---- newlib/libc/stdlib/envlock.h | 3 +++ newlib/libc/stdlib/mlock.c | 8 ++++---- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index f2a6693b9..a9350e8b8 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,15 @@ +2000-08-23 Werner Almesberger + + * libc/stdlib/envlock.c: changed documented "__env_lock" and + "__env_unlock" prototype from "void *" or "char *" to + "struct _reent *" to match real function. Also added include + of envlock.h. + * libc/stdlib/mlock.c: changed documented "__malloc_lock" and + "__malloc_unlock" prototype from "void *" or "char *" to + "struct _reent *" to match real function. + * libc/stdlib/envlock.h: added "__env_lock" and "__env_unlock" + prototypes (for getenv_r.c and setenv_r.c). + 2000-08-22 Werner Almesberger * libc/unix/getut.c (utmpname): added _CONST to reflect common use diff --git a/newlib/libc/stdlib/envlock.c b/newlib/libc/stdlib/envlock.c index 85bb868e4..8e55de288 100644 --- a/newlib/libc/stdlib/envlock.c +++ b/newlib/libc/stdlib/envlock.c @@ -9,15 +9,15 @@ INDEX ANSI_SYNOPSIS #include "envlock.h" - void __env_lock (void *<[reent]>); - void __env_unlock (void *<[reent]>); + void __env_lock (struct _reent *<[reent]>); + void __env_unlock (struct _reent *<[reent]>); TRAD_SYNOPSIS void __env_lock(<[reent]>) - char *<[reent]>; + struct _reent *<[reent]>; void __env_unlock(<[reent]>) - char *<[reent]>; + struct _reent *<[reent]>; DESCRIPTION The <> family of routines call these functions when they need @@ -35,6 +35,9 @@ routines must be careful to avoid causing a thread to wait for a lock that it already holds. */ +#include "envlock.h" + + void __env_lock (ptr) struct _reent *ptr; diff --git a/newlib/libc/stdlib/envlock.h b/newlib/libc/stdlib/envlock.h index df3a0ba58..9bb6a813e 100644 --- a/newlib/libc/stdlib/envlock.h +++ b/newlib/libc/stdlib/envlock.h @@ -9,4 +9,7 @@ #define ENV_LOCK __env_lock(reent_ptr) #define ENV_UNLOCK __env_unlock(reent_ptr) +void _EXFUN(__env_lock,(struct _reent *reent)); +void _EXFUN(__env_unlock,(struct _reent *reent)); + #endif /* _INCLUDE_ENVLOCK_H_ */ diff --git a/newlib/libc/stdlib/mlock.c b/newlib/libc/stdlib/mlock.c index e7f7242ce..485d0d5c9 100644 --- a/newlib/libc/stdlib/mlock.c +++ b/newlib/libc/stdlib/mlock.c @@ -9,15 +9,15 @@ INDEX ANSI_SYNOPSIS #include - void __malloc_lock (void *<[reent]>); - void __malloc_unlock (void *<[reent]>); + void __malloc_lock (struct _reent *<[reent]>); + void __malloc_unlock (struct _reent *<[reent]>); TRAD_SYNOPSIS void __malloc_lock(<[reent]>) - char *<[reent]>; + struct _reent *<[reent]>; void __malloc_unlock(<[reent]>) - char *<[reent]>; + struct _reent *<[reent]>; DESCRIPTION The <> family of routines call these functions when they need -- 2.43.5