mstat.c patch

J. Johnston jjohnstn@redhat.com
Fri Sep 5 06:26:00 GMT 2003


Ben Elliston wrote:
> The following patch fixes some preprocessor directives in mstat.c that
> I only noticed because I built newlib with `make -s'.  GCC warned that
> it was ignoring everything from `||' and beyond on the offending
> lines.  Okay to commit?
> 
> Ben
>

Yes, please go ahead.

-- Jeff J.

> 2003-09-04  Ben Elliston  <bje@wasabisystems.com>
> 
>        * libc/stdlib/mstats.c[_ELIX_LEVEL]: Fix guards.  #ifndef FOO ||
>        FOO >= 2 is invalid; use #if !defined (FOO) || FOO >= 2 instead.
> 
> Index: libc/stdlib/mstats.c
> ===================================================================
> RCS file: /cvs/src/src/newlib/libc/stdlib/mstats.c,v
> retrieving revision 1.3
> diff -u -r1.3 mstats.c
> --- libc/stdlib/mstats.c        26 Aug 2002 18:56:07 -0000      1.3
> +++ libc/stdlib/mstats.c        4 Sep 2003 06:12:13 -0000
> @@ -110,7 +110,7 @@
>    return _mallinfo_r (_REENT);
>  }
> 
> -#ifndef _ELIX_LEVEL || _ELIX_LEVEL >= 2
> +#if !defined (_ELIX_LEVEL) || _ELIX_LEVEL >= 2
>  void
>  _DEFUN_VOID (malloc_stats)
>  {
> @@ -129,7 +129,7 @@
> 
>  #endif
> 
> -#ifndef _ELIX_LEVEL || _ELIX_LEVEL >= 2
> +#if !defined (_ELIX_LEVEL) || _ELIX_LEVEL >= 2
> 
>  /* mstats is now compatibility code.  It used to be real, for a
>     previous version of the malloc routines.  It now just calls
> 



More information about the Newlib mailing list